FSIO keyboard

Keyboard and CDU

The CDU in the 737 has an 69 key keyboard and 5 (LED) indicators.
Although this keyboard could be connected to standard FSIO input chips this is not the way to do a keyboard. The number of chips we need would be 11 and the wiring to complex.

This is why I developed a special keyboard card that connect to IOControl  using a scan matrix. When a key is pressed FSIOKey will send a keycode to a SIOC variable.

This is how the card is configured in the SIOC script.

Var 0vvv, name Keyb, Link USB_KEYS, Device dd

When a key is pressed it’s position number in the matrix will be sent to SIOC variable vvv. When the key is released a 0 will be send to the variable vvv to clear it and allow for the next event.

The key code can be used within the script to send the right data to FS.

Note that I need to set a Device number. I could have chosen for a default (or no) device number for the keyboard, but I want to stay in line with the convention that all cards have their own device number. (Btw: This allows for more than one keyboard within the configuration.)

The design.

As I am familiar with the 18F4550 processor and have the basic microcode from the CPU card I use this processor for the FSIOKey card as well.

A friend that is building according to this design, got a CDU keyboard that uses a 13 * 9 scan matrix. (Yes, we know; the CDU has only 69 keys and a 9*8 matrix would be sufficient. (His keyboard does not use all possible codes.)

Never the less, the FSIOKey card needs to facilitate 13 * 9 matrix and 5 output signals for the LED’s. This just fills all available IO pins of the 18F4550. (lucky me)

The schematic below  is developed for that hardware keyboard. However the microcode is written in such a way, that in fact any combination of row/column matrix can be easily configured. As long as the total of row/columns is 22 or less. Any pin on the connectors on top can be configured as Column or Row.

Rows are output pins and need to have a pull up resistor .

The card is powered from the USB buss.

LED’s on the card are configured in SIOC with:

Var 0vv1, name LED_EXEC, Link IOCARD_OUT, Device dd, Output 5
Var 0vv2, name LED_FAIL, Link IOCARD_OUT, Device dd, Output 1
....

Needless to say (I hope) that the Device number is the device number of the FSIOKey card.

Schematic

The schematic is simple.

You find the normal components, like X-tal, indicator LEDs, reset switch and bootloader activation button.

If you think the wiring is strange, this reference design is made for the specific CDU keyboard. I made the connections to allow a single sided PCB design (One wire only).

FSIOKey-1

 

Name for the LED output pins are arbitrarily and given by the specific keyboard. In SIOC they are configured as Output 1 throug 5.

Again, any of the pins can be configured as row/column

 

FSIOKey_brd-1

 

Test Script

Below is a test script that I used. This test can be performed without FS running.

Var 0200, name keyb, Link USB_KEYS, Device 11
{
IF &keyb = 1
 {
 &LD_FAIL = 1
 }
IF &keyb = 2
 {
 &LD_OFST = 1
 } 
IF &keyb = 3
 {
 &LD_DSPY = 1
 } 
IF &keyb = 4
 {
 &LD_MSG = 1
 } 
IF &keyb = 5
 {
 &LD_EXEC = 1
 }
IF &keyb = 16
 {
 &LD_FAIL = 0
 &LD_OFST = 0
 &LD_DSPY = 0
 &LD_MSG = 0
 &LD_EXEC = 0
 }
}
Var 0201, Name LD_FAIL, Link IOCARD_OUT, Output 1, Device 11
Var 0202, Name LD_OFST, Link IOCARD_OUT, Output 2, Device 11
Var 0203, Name LD_DSPY, Link IOCARD_OUT, Output 3, Device 11
Var 0204, Name LD_MSG, Link IOCARD_OUT, Output 4, Device 11
Var 0205, Name LD_EXEC, Link IOCARD_OUT, Output 5, Device 11

Use as button input

This board can also be configured as switch (button) input card.

The difference is that, when configured as USB_KEYS the key’s value is sent to one variable in SIOC. When configured as IOCARD_SW every key must be assigned to it’s own variable as follows:

Var vvv1, Name Nnn1, Link IOCARD_SW, Input 1, Device dd
Var vvv2, Name Nnn2, Link IOCARD_SW, Input 2, Device dd
Var vvv3, Name Nnn3, Link IOCARD_SW, Input 3, Device dd
.....

Note:
In the present code it can be only one or the other. If in the SIOC script the same device is configured as USB_KEYS and also IOCARD_SW, the USB_KEY takes precedence. If you want to exeperiment, just use different device number and change the device number with IOControl to set one or the other.

If there is an application for it I could make a change to the code to allow both. Where keys that are assigned IOCARD_SW are used as SW and send to their own assigned var and other are send as key values to the assigned key var. Let me know.
(if the change as suggested above are made, I will change this page also)

This PDF will allow you to print the board copper layer FSIOkey_0

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s