DEPRECATED: 1/23/2000
DESIGN GOALS: I have talked about the IOP before so I will review the design:
- The IOP can control multiple CDUs (dumb terminals) via an Ardunio's USB.
- The IOP listens to the NavGroup UDP broadcast for present position, etc.
- The IOP sends the PP/etc to be updated on the CDUs.
- All software will be written in C.
- We will standardize on the eclipse platform for software development.
CDU - IOP Software Protocol:
- The CDU sends one character to the IOP. The IOP will respond with character string.
- The IOP sends a command to the CDU. The IOP will respond with NAC.
CDU - IOP Software Review: This IOP is built on on Linux platorm which performs the following functions:
- handles all input via an internal command select(2)
- All of the CDU's fuctions via a program called nav_iop.c
- The software handles all keystrokes
- The software handles the all the switches
- The software handles the displays
- As well as
- listening to the NAV-GROUP network
- Updating present position
- Storing all the variables.
- Multiple CDUs can be handled by using a array of structures to hold them.
- this is the definitions:
- enum fd_index {
- RD,
- WR,
- FD_pair };
- struct cdu_s {
// device info
char * device_info; // something useful about the cdu
char * device_name; // in the form of "dev/xxxxxxxxx"
int fd[ fd_index ]; // file descriptors
// power flags
int power;
int power_48v;
int power_400hz;
int keybord_power;
// keyboard state info
unsigned short alpha_high;
unsigned short alpha_low;
unsigned short clear_flag;
unsigned short keypad_power;
unsigned short cursor;
unsigned short keystroke;
// switch state info
unsigned short power_flag;
unsigned short mode_sw;
unsigned short display_sw;
unsigned short dest_thumb_sw;
unsigned short fly2_thumb_sw;
// display info
short display_cntl;
short keyboard_cntl;
char chars[displays][display_max + 1];
};
And this is how we invoke it.
static struct cdu_s cdu[] = {
{ "Pilots", "dev/USBtty0", {O_R, O_W }, } // Please note the the O_ option are for demonstration purposes only and are not correct.
};
ARDUINO Software Review: The Arduino has the following things to do:
- One Arduino per CDU so each CDU has its own Device Name ie /dev/USBTTY0. This is important, so that the NAV-IOP O/S knows which CDU is requesting service.
- Ps2 keyboard decoder, for the Keypad interface. There is a good article in the Arduino Playground.
- One 16 bit I2C Bus expander, PCF8575C,
- four switches (2 thumbwheel and 2 rotary).
- Drive two relays:
- Main Power
- Keyboard Lights
- Use two (2) MAX6955 Display Controlers via the I2C Bus, which drives the 16 and 7 segment displays.
Processor Shoot Out | |||
---|---|---|---|
Devices | Pins | Duemilanove | Mega2560 |
USB Serial Device | 2 | 0 (RX) and 1 (TX) | 0 (RX) and 1 (TX) |
External Interrupts | 2 | 2 (INT0) and 3 (INT1) | 2 (INT0), 3 (INT1), 21 (INT2), 20 (INT3), 19 (INT4), 18 (INT5) |
Ps2 Keyboard | 2 | 3 (INT1) and 4 (DATA) | 3 (INT1) and 4 (DATA) |
I2C Interface | 2 | A4 (SDA) and A5 (SCL) | 20 (SDA) and 21 (SCL) |
Display Switch* | 4 | N/A* | 22, 23, 24, 25 |
Mode Switch* | 4 | 26, 27, 28, 29 | |
Thumbwheel Switch 1* | 4 | 30, 31, 32, 33 | |
Thumbwheel Switch 2* | 4 | 34, 35, 36, 37 | |
Keyboard Power Relay | 1 | 38 | |
Display Power | 1 | 39 | |
MEM LED, Red | 1 | 40 | |
MEM LED, Green | 1 | 41 | |
MAL LED, Red | 1 | 42 | |
MAL LED, Green | 1 | 43 | |
Arduino LED | 1 | 13 (LED) | 13 (LED) |
*If the Duemilanove is used we need to use several I2C I/O Expander.
IOP (Linux) Software Review: The software is written using the Linux/Unix async communications with several devices (file handles) at the same time, that will include the USBtty, and UDP and TCIP connections at the same time.
(MORE TO COME)