The Micro Processor
I use the same microprocessor for the FSIO design as I used before.
For displays and inputs chain I only use a few pins. This means that any Microchip (18F4xxx processor?) that has a SPI and a USB interface could be used.
If you do not need the servo/analog feature, you can use an USBSTICK that costs only $11.80 + some shipping charge. This little board has a PIC18F2550 on board. Appart from having less IO pins, this processor is compatible with the one I used.
For FSIO the Microprocessor board can be very basic. See schematic.
As you can see, this is very basic PIC18F4550 setup. I made my firmware to be bootable with the HID bootloader. So once you have a PIC with the bootloader, you do not need a hardware programming device anymore.
The next schematic is the full processor card.
A schematics above shows all connections.
There are analog inputs and connection for the relay drivers on the left.
A special analog input is AN6. A voltage between 0V and 5V wil be used by the microcode to dim the displays. This voltage is carried to all panel units where it can be used as a reference for the backlight intensity.
On top the connections for the Servos. I suggest to have the servo suply voltage separate for noise reduction.
The board itself can be powered from the USB bus. Even with a few display chips added, this would not overload the USB. However I suggest to use a separate 5V supply. It is forbidden to backfeed the USB 5V bus, so that is why a jumper is added.
On the right there is the 10 pin header for the panel chain connections.
All very basic, for an electronics engineer not very exciting. The microcode is the more exciting part of it. I will write about that on a separate page.
I developed a CPU PC board from the schematic above.
In order to ease construction I accepted 5 wires on the top so I could use a single layer.
The PDF file that can be downloaded from here (CPU Board rev 1_0) can be used to make a PCB with the ‘toner transfer’ method as I did.
See the layout here: CPU Board rev 1_0 all
I know I could make the board a lot smaller, using SMD, smaller buttons and LED’s. But this size is not too bad.
I did not provide for a programming device connector as the microcode will be updated through a USB bootloader.
Note: The plug on the analog connector, it’s a quick and dirty to pull the analog inputs to GND as if I leave them open a lot of noise is picked up.
All software and firmware that I talk about on this site can be downloaded (free). You will find download links on my forum about FSIO . Each first item of a forum will hold the appropriate dowload link. The forum is members only, so you need to register.
Buidling the card
I designed the CPU card with one layer to allow building it using the toner transfer methode. I had to allow for 5 air wires. No big deal I think.
You will find a PDF in the downloads under hardware.
You can also find the eagle files in case you want to produce your own card.
When your card is ready, check all connections for continuity and or shorts.
The PIC18F4550 when purchased will do nothing as there is no program in it. You first need to program the BootLoader program into it. To do this, you need a PIC programmer like PicKit-2 or Pickit-3. Maybe you can borrow it from someone as you need it only once. (If you go to Aliexpress you can pick one up for less the €10)
I did not make a programmers connector on the board, but the PIC can easily programmed using a bread board. Or connect the 5 wires direct
Use the pictures above to make the connections.
Once you have programmed the PIC with the bootloader once, you do not need the PicKit anymore.
Now you can put your PIC18F4550 in the socket of your CPU board.
Press and hold the Boot button (the button close to the LED’s) and now connect to the USB of your computer. When everything is ok, both LED’s should now flash alternatavely about 4 times/sec.
Congratulate yourself as the PIC is connected to Windows and running the bootloader program.
Start ‘HID Bootloader.exe’. When HID Bootloader detects the PIC running the bootloader program it will enable buttons: .
- Click ‘Open Hex File” select the FSIOmc.hex file.
- Click Program/Verify
Now the FSIOmc microcode will be programmed in the PIC. This will take a few seconds.
- Click ‘Reset Device’
The processor will now be reset and (as you are not pressing the Boot button) will start the FSIO micro code. You will hear Windows recognise a new device. You’r done.
If you get new micro code and/or want to reprogram the device, just short press and hold the boot button now press and release RESET, release the boot button when the processor is started
A lot is good if you get this far. You can some more testing, even without having panel(s) connected.
Start the IOControl application. Here you will see the new device listed under USB Device. Read about the IOControl program here.
The device will be displayed as: XX:76.32.16.
XX – Device number
76 – MicroCode Software Level
32 – Number of input (74LS165) chips possible on the panel chain
16 – Number of output (max7219) chips possible on panel chain.
Each time after (re-)programming the processor with a new firmware the Device number is set to XX. You will have to assign this CPU a device number. You need to do this once.
Double click on the XX:76:32:16.
A little window wil open where you can enter the device number. Press [Set/Change] and you are done. The device number is now stored.
BTW: You can change the device number any time you whish.
Open the Log of IOControl by pressing L6.
- Press the Boot button on your CPU card.
The log window will show:
Sw: 14:239=1 Not Assigned Sw: 14:239=0 Not Assigned
Sw – Switch received from Device 14, switch number 239 =1 means pressed.
Sw – Switch received from Device 14, switch number 239 =0 means released.
When the FSIO microcode is running the Boot button is treated as INPUT button number 239, and will send a lamp test to all connected MAX7219 devices in the pannel chain.
For now this is all you can do. Your CPU is working. Poor in a glass with something and toast “Cheers”…..