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:

DsPIC Block/Rx Input

From - Simulink device driver Blockset for dsPIC / PIC24 / PIC32 Microcontrollers --[[User:LubinKerhuel|LubinKerhuel]] 12:40, 3 September 2009 (UTC)
< DsPIC Block(Redirected from Block/Rx Input)
Jump to navigation Jump to search
Block UART Rx Input

The Rx block require the 'Uart Config block' that will configure all parameters of the UART peripheral.

When no interruption are used, the Rx Input block can receive only one byte (uint8 scalar) at each step. If several bytes have been received during the previous time step, only the first one will be available in the current step execution time.

When interruption are enabled, the Rx Input block can receive as many data as there is some empty space in the buffer. When the buffer is full, last received data are lost. The block act as a FIFO stack. The block output in priority the first data logged. You can place as many Rx block as you want.

If no bytes have been received, the output is set to the default value. The block can be a blocking function : stop the step execution until one byte is received ( not recommended due to possible real-time constraint violation).

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

UART Rx Dialog

Multiple instance of this block are allowed to receive several bytes within one time-step.



Sample Time

-1 for inherited

Blocking Function

if checked, the block will stop execution of others blocks until one byte is received

Output Default

If no data has been received, the block will output the value defined here. The value must be within the range [0 255]. -1 mean that the last value received (by this block) is keept

Received Output Flag

If checked, one logical output appears. Its value is

  • 1 if one byte has been received,
  • 0 if no data has been received ; the output value is the "Output Default" value.

<comments \>