Ok so here is a map of our simulator:

CDU_-_Simulator_Interface.png

  • 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 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0Valid 7 Bit ASCII Character (Keyboard)
1000BCD from Mode Switch
1001BCD from Display Switch
1010BCD from DEST thumb wheel
1011BCD from FLY-TO thumb wheel
11xxData 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 0Byte 1Byte 2Byte 3
START BYTEDispaly - DigitASCII CharAttributes
FF0010 - 0011360

 

  1. Is the START Byte this will contain a hex FF.
  2. Has two (2) nibbles which are encoded:
    1. Is which display you wish to write to: Target,  Left,  Right,  Center,  Both,  LED.*
    2. Is the digit to be displayed (with 0 offset)
  3. Is the DATA for the display position selected (ASCII).
  4. 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.

 

 

keep tuned in more to come

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.