Ok so here is a map of our simulator:
- A small network.
- The CDU.
- The IO Processor #1.
- The Simulation Processor.
- A block diagram of the arduino and what's it doing.
- Interfaces to the display controllers via I2C.
- Ps2 keyboard Interface.
- The switches via some custom hardware.
- USB virtual serial port.
- Client Software.
- A Virtual Serial Port, from the arduino to the IOP#1.
- The Host software running on IOP#1
| The Client Software running on the arduino duemilanove will use a one byte protocol. Valid data can be any 7 bit ASCII character or one of four (4) switches and its associated BCD data value. |
| arduino 1 Byte Protocol to Host | |||||||
|---|---|---|---|---|---|---|---|
| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
| 0 | Valid 7 Bit ASCII Character (Keyboard) | ||||||
| 1 | 0 | 0 | 0 | BCD from Mode Switch | |||
| 1 | 0 | 0 | 1 | BCD from Display Switch | |||
| 1 | 0 | 1 | 0 | BCD from DEST thumb wheel | |||
| 1 | 0 | 1 | 1 | BCD from FLY-TO thumb wheel | |||
| 1 | 1 | x | x | Data Not Valid | |||
When Host Software running on the IOP receives a keystroke (one byte at a time) from the arduino the host shall respond with a 4 byte message which has the following format:
| Host 4 Byte Protocol to Client (arduino) | |||
| Byte 0 | Byte 1 | Byte 2 | Byte 3 |
|---|---|---|---|
| START BYTE | Dispaly - Digit | ASCII Char | Attributes |
| FF | 0010 - 0011 | 36 | 0 |
- Is the START Byte this will contain a hex FF.
- Has two (2) nibbles which are encoded:
- Is which display you wish to write to: Target, Left, Right, Center, Both, LED.*
- Is the digit to be displayed (with 0 offset)
- Is the DATA for the display position selected (ASCII).
- Is the attributes. Such as BLINK, Lamp Test, Cursor, etc. #
NOTE: * This should be a enumerated list with a 0 offset.
NOTE: # In this blog I will not go into the various attributes.
NOTE: This format is all so used when the CDU is listening to network traffic for updating the display with various parameters, such as Network Time, Stored Locations, Time To Destination (DME), etc.
NOTE: This blog eludes to communications between the Host Software and the Simulator, I have chosen not to talk about it at this time.
Cris ~
AFTER THOUGHT: This system was designed using an arduino duemilanove. I am now writing code on a stellaris arm LunchPad module to see if I can move the HOST software to this platform as well.


Top Comments