FSIO Panel Hardware

FSIO Panel Hardware

A majority of panels need a mix of switches, push buttons, rotary encoders for input and a mix of LED and numeric displays. A few need servos, relays or can input analog signals.

Servos, relays and analog are not part of the connections made by the panel chain and need to be wired seperately.

I start with LED and Displays.

7-Segment Displays.

There are a number of chips on the market that can drive 7 segment displays. For FSIO I selected the Max7219. One chip drives 8 7-segment displays. The displays are Common Cathode.

The chip can decode bcd to 7-segments, but also allows to bypass the decode and allows addressing the individual segments. So the Max7219 can also be used to drive individual LEDs. One Max7219 can have a mix of 7-segment displays and LEDs. One digit = 8 LEDs. As the MCP does not use decimal point, the Max7219 decimal point outputs can also be used to drive 8 additional LED’s.

For the MCP with 23 7-segment displays and 16 LEDs, 3 Max7219 chips are sufficient. With 23 7-segment displays 24 + 8 LEDs can be connected (24 decimal points and one display), see Most complex panel unit MCP.

The MAX7219 chip has a serial interface, and multiple chips can be chained on one serial (SPI) interface.

Switches, Pushbuttons and Rotary encoders.

If you read about my first desing you know that I use the microprocessor to scan 64 switches. The decision I had to make was, do I continue with using matrix switch scanning? As there is no need for LED’s to be driven by the PIC processor, it would give me some freedom as to the placement of rotary encoders. This had long been an option. I could have removed the LED drivers from the IO-Card and add a serial interface to talk to the display chips.

Scanning is good for pushbuttons. What pleads against scanning are the switches and rotary encoders. Switches short-circuits row/column crossing, so diodes are needed to prevent a full row  becoming unsalable.

So I decided to use chips for switches and simplify the wiring at the same time. Switches, pushbuttons and rotary encoders in the FSIO design are connected to 74LS165 chips. The 74LS165 chip is a 8 input buffer shift register. Multiple 74LS165 chips can be chained and connected to a serial interface (SPI).

*NOTE: There are many types of 74xx165 chips. The next to the standard 74165 there are 74LS, 74LSA, 74HC, 74HCT just to mention a few. The 2 or 3 letters inbetween the 74 and the type number indicate the inside technology used.

You need 74xx165 chips with TTL compatible outputs as the PIC18F4550 inputs are TTL. Do not use 74HC165 chips, these are NOT TTL compatible and thus will give problems on the input interface to the CPU. My preference is 74LS165. Their characteristiscs, switching speed etc. fit our purpose.

Panel Unit

I see a cockpit as a set of panel units. E.g. the MCP, EFIS, RADIO to name a few.

Pictures can tell more than words, so look at the schematic drawing ‘Panel Unit”. It’s not a complete panel, however all important elements are present.


Starting on the left side is a connector for a 10 pin flat cable. The cable is connected to a separate Processor Card (PIC18F4550).

The even pins of the connector carry the supply voltage and ground. One extra pin carries a voltage between 0 and 5 volts that will be used to control (not drive) the background light of the panels. It will be connected to an analog output of the microprocessor.

The odd pins carry the logical signals of the serial (SPI) interface.

The SPI interface.

First of all there are the 3 main SPI signals:

  • CLK (clock)
  • DSO (output as seen from the PIC)
  • SDI  Input. I think they do speak for themselves

I need 2 additional control signals:.

  • CS  (Chip Select)

CS is connected to the Max7219 chips. When CS is High, the Max chips are in set in shift mode

The microcode will send a string of command/data over the SDO line to the chain of Max7219’s. The serial data will travel through all Max’s in series. The 2 bytes for device 0 (zero) will be send out last. Only the Max7219’s that need some data receive non 00 command/data bytes. When all data is send out, the microcode will set the CS to low. At that moment the Max7219s copy the data in the shift registers to their internal organs and display whatever is send to them.

  • SH/LD   (Shift / Load)

The SH/LD signal will be on (high) normally. When the signal is made LOW all inputs (A – H pins) of the 74165’s are copied into the internal shift registers. Then the PIC18F starts SPI read clocking. The data captured in the shift registers will travel through the chain of 74165 chips, received by the PIC SPI interface to be handled.

My current design of the microcode for the PIC allows for 8 Max7219’s and 32 74165’s chips in the chain.  I have testes the code for 16 Max7219s, but did not have that many connected. I do not anticipate problems with 16.

Inputs do not need debouncing capacitor as I incorporated software debouncing within the microcode.

Panel chain

A cockpit panel unit like e.g. the MCP will need 4 74LS165 input shift registers and 3 Max7219’s display drivers. That is why a panel unit will also have an output connector. A 10 pin flat cable will connect the next panel unit.

Let’s assume the EFIS panel. This panel does not have displays at all. It will need (I think) 4 input shift registers for buttons, rotary encoders and rotary switches. A next unit, e.g. the radio control will need more displays etc.

So a panel unit can have any number of input and display chips as long as the total chain does not have over 8 display chips and 32 input chips.

I did test with 6 meter total cable length. Without pull-up resistors at the last out plug. I think that pull-up resistors will eventually be needed. The way I use the cable is such that signal lines are separated by power lines. These form a shield to avoid crossover talk.

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