Difference between revisions of "DsPIC Block/Tx Output"
m (LubinKerhuel moved page Block/Tx Output to DsPIC Block/Tx Output: Block is a special page, creates many issues)
Latest revision as of 18: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.
Dialog Box Parameters
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)