Blockset described on this wiki is deprecated since 2012.
For Model Based Design (MBD), use the free MPLAB Device Blocks for Simulink, tool from Microchip.
Updated Rapid Control Prototyping (RCP) custom projects are published at: https://lubin.kerhuel.eu.
Difference between revisions of "DsPIC Block/Tx Output"
LubinKerhuel (talk | contribs) (New page: The Tx Output Output block send the uint8 scalar or vector data throw the UART Tx pin of the microcontroller. The "UART Config" is needed to configure the UART parameters.This is a blockin...) |
LubinKerhuel (talk | contribs) m (LubinKerhuel moved page Block/Tx Output to DsPIC Block/Tx Output: Block is a special page, creates many issues) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | The Tx Output Output block send the uint8 scalar or vector data throw the UART Tx pin of the microcontroller. The "UART Config" is needed | + | [[Image:Block_UART_Tx_Output.png|thumb|rght|Block UART Tx Output]] |
+ | The Tx Output Output block send the uint8 '''scalar''' or '''vector''' data throw the UART Tx pin of the microcontroller. The "UART Config" is needed for configuration of the UART peripheral. This block act as a blocking function in the way that all its input will be placed in the UART Tx buffer. If the buffer is full, the function will wait for empty space until all data are placed inside the buffer. Thus, there is no data loss. | ||
− | To avoid real time violation, you should send throught the UART less than the max number of characteres that can be send within ont time step ( this value is computed in the UART Configuration dialog box). Also, note that when sending a vector with more than | + | When not using interruption (not recommended), the UART internal buffer length is 4 bytes. When using interrupt, you set the Tx buffer size in the UART Config block. |
+ | |||
+ | To avoid real time violation (i.e. waiting for some place in the Tx buffer), you should send throught the UART less than the max number of characteres that can be send within ont time step ( this value is computed in the UART Configuration dialog box). Also, note that when sending a vector with more character than the Tx buffer size (ie, uint8 or int8 values), the block will wait until all character can find a place into the buffer. You can use several Tx blocks. | ||
+ | |||
+ | For sending multiple data at once, use a mux block to create the vector that will feed the Tx block. | ||
+ | |||
+ | Multiple instance of this block are allowed to receive several bytes within one time-step. | ||
+ | |||
+ | |||
+ | Related blocks : [[Block/UART_Configuration]] [[Block/Rx_Input]] [[Block/Tx_Output]] [[Block/Tx_Output_Multiplexed_For_Matlab-Labview]] [[Block/Interface_Tx-Matlab]] | ||
=Dialog Box Parameters= | =Dialog Box Parameters= | ||
− | + | [[Image:Block_UARTTx_DialogBox.png|thumb|right|450px|UART Tx Dialog]] | |
===n° UART=== | ===n° UART=== | ||
UART Used | UART Used | ||
Line 10: | Line 20: | ||
===Block Ordering Input / Output=== | ===Block Ordering Input / Output=== | ||
Create one input and/or output port on simulink. This port is just used to set the order of execution between severals blocks. | Create one input and/or output port on simulink. This port is just used to set the order of execution between severals blocks. | ||
+ | |||
+ | |||
+ | ==Forum related discussions== | ||
+ | *http://www.kerhuel.eu/forum/viewtopic.php?f=6&t=143 | ||
+ | (please complete this list) | ||
+ | |||
+ | ---- | ||
+ | <comments \> |
Latest revision as of 19:30, 3 May 2015
The Tx Output Output block send the uint8 scalar or vector data throw the UART Tx pin of the microcontroller. The "UART Config" is needed for configuration of the UART peripheral. This block act as a blocking function in the way that all its input will be placed in the UART Tx buffer. If the buffer is full, the function will wait for empty space until all data are placed inside the buffer. Thus, there is no data loss.
When not using interruption (not recommended), the UART internal buffer length is 4 bytes. When using interrupt, you set the Tx buffer size in the UART Config block.
To avoid real time violation (i.e. waiting for some place in the Tx buffer), you should send throught the UART less than the max number of characteres that can be send within ont time step ( this value is computed in the UART Configuration dialog box). Also, note that when sending a vector with more character than the Tx buffer size (ie, uint8 or int8 values), the block will wait until all character can find a place into the buffer. You can use several Tx blocks.
For sending multiple data at once, use a mux block to create the vector that will feed the Tx block.
Multiple instance of this block are allowed to receive several bytes within one time-step.
Related blocks : Block/UART_Configuration Block/Rx_Input Block/Tx_Output Block/Tx_Output_Multiplexed_For_Matlab-Labview Block/Interface_Tx-Matlab
Contents
Dialog Box Parameters
n° UART
UART Used
Block Ordering Input / Output
Create one input and/or output port on simulink. This port is just used to set the order of execution between severals blocks.
(please complete this list)
<comments \>