Serial Transmit - Configure Infineon C166 microcontroller for serial transmit

Library

Target Support Package IC1/ C166 Driver Library/ Asynchronous/Synchronous Serial Interface

Description

The Serial Transmit block transmits bytes over the Infineon C166 microcontroller Synchronous/Asynchronous Serial Interface ASC0. You can use it either to transmit a fixed number of bytes, or by enabling the second input, transmit a variable number of bytes each time this block is called.

When the block is called, the specified number of bytes are placed in a FIFO buffer that is internal to the device driver. If this buffer is already full, or if the number of spaces available is too few, then not all of the bytes requested will actually be queued for transmit; in this case, the number of bytes actually transmitted can be determined from block output.

Once bytes are queued for transmit, they will be sent as fast as possible by the serial interface hardware with no further intervention required by the main application. Note that after each byte is sent, a Peripheral Event Controller (PEC) interrupt is generated to fetch the next byte from the internal buffer. The PEC interrupts are extremely fast and have minimal effect on the rest of the application.

To configure the serial interface bit rate, buffer size, PEC interrupt priority, and other parameters, see Asynchronous/Synchronous Serial Interface Configuration Parameters.

Block Inputs and Outputs

The first input contains the data to be transmitted; this input signal may be either a vector or scalar with data type uint8.

The optional second input must be a scalar and may be used to control the number of bytes transmitted. The number of bytes to transmit should not be greater than the width of the first input signal.

The block output port actual number of bytes output gives the number of bytes queued for transmit. If there was sufficient space in the buffer, this number will be equal to the requested number of bytes to transmit.

Dialog Box

Sample time

The time interval between samples. To inherit the sample time, leave this parameter at the default -1. See "Specifying Sample Time" in the Simulink documentation for more information.

Show length input

Enable/disable the number of bytes to send. If not selected, the number of bytes sent is just the width of the first inport; if selected, the second input is enabled, which controls the number of bytes to send.

Show number of bytes sent

Enable/disable the number of bytes actually sent. If selected, this value is available from the first output.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS