Serial I/O Blocks

From NewEagleWiki
Revision as of 21:47, 19 November 2012 by Tdougan (talk | contribs) (→‎Example Model)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

MotoHawk:Blocks:Serial I/O Definition

This MotoHawk® block defines and initializes the serial port. Only one of these blocks is allowed. Each direction, Transmit and Receive, may have a queue attached. Specify a queue size or 0 if no queue is desired. Note that the existence of this block disables the MotoTune protocol via RS-485.

MotoHawk:Blocks:Serial Receive

When this MotoHawk® block executes, the Trigger output port fires once for each character in the receive queue (if attached). The Character output port is set to the corresponding read character.

If no characters are available to be read, the Trigger will not fire.

MotoHawk:Blocks:Serial Transmit

When triggered, this MotoHawk® block places a single character into the serial port transmit queue (if attached), and schedules immediate transmission. Input a uint8 character.

Example Model

If you want an example of how to use the serial block set look at the example Serial Demo. . This example will receive data at a baud rate of 9600 for RS485 on the 112 pin controller. It will display the last 6 characters sent. The subsystem that displays characters will also have a counter run every time it is enabled. That will allow the user to know that the serial values are being received.


RS-485 Baud Rates

The maximum validated rate for communication is 57.6K. Newer versions of the 128 pin modules Hard Boot and Soft Boot support communication rates up to 115K and have been used in service environments with diagnostic tools. The final decision about maximum rate to the end developer given considerations of the application and environment. Again, the maximum validated rate is 57.6k.