I’ve been experimenting with using a PIC to control long chains of 7-segment LED displays, and to find an approach that I can use to replace the obsolete TIL311 displays. To that end, I’ve created a tech article that describes a simple way to do this. My prototype was 24 digits long; long enough for most applications I think, but could be extended. It’s all done with a PIC18F25K22 running from its own internal oscillator, accepts data from a serial device at 9600 baud, and supports 0 to 9, and A to F value display. The code is written in AMICUS18 BASIC which is free so you can change the software to suit your own application. All the fully documented source code is supplied as well as a schematic of the circuit.
The picure above shows 24 digits (6 x 4 digit modules). The display modules each contain a 4 x 7 segment Common Cathode display, a DIL resisor pack on the modules right-hand side, and there are 4 n-channel SMT MOSFETS underneath.
The advantage of using modules on breadboards is the vast amount of time, and wire that's saved. You can throw a quick circuit together in no-time if you already have the modules pre-built. It also saves a lot of breadboard space.
Many years ago, I constructed a Nixie tube based clock for a friend, and whilst it worked, it never really worked well. It had an MSF decoder so could automatically synchronise itself from the radio clock at Rugby in the UK (since moved to a new location). However, with all his computers, PSU’s and other radio equipment, the MSF receiver never worked properly. Also, I never gave the design that much thought. It required a cumbersome power supply arrangement to drive the logic and provide the high voltage for the Nixie tubes. I used a PIC microprocessor to control everything but I ran out of program space so the project never reached its full potential. I also ran out of time and enthusiasm which didn’t help.
However, since I’m now officially on vacation for a week or so, I thought it would be an interesting project to re-do, and this time, do it properly.
This time I’ll approach the project in a slightly different way. Instead of one large PCB attempting to house everything, I’ve gone for a modular approach. This will make hardware upgrades a lot simpler in the future and allows the project to be constructed and tested in blocks which will cut down on re-work time if a fault is found in a specific area.
The picture below shows the major building blocks of the project.
At the rear is a small PCB that contains a simple high voltage (HV) inverter. This is really just a prototype and will be re-worked into a complete PSU board for the final build. It’s running from a 9v DC output from my bench PSU and producing the 150v DC to drive the Nixie tubes. The output voltage is adjustable via an on-board variable resistor.
The large board in the middle is the completed display board. This contains a 64-bit shift register constructed from eight 74HC595, 8-bit shift register ICs. There are also 50 x MPSA42 High Voltage driver transistors on the board to control the Nixie tube cathodes; all the tube Anodes are connected to a common HV rail via 47K resistors. There are also 9 x LED’s mounted in strategic locations at the front edge of the display board and these will be used to display operating mode; date, time, temperature, alarm trigger etc.
In the picture foreground you can see a small breadboard that is currently home to an 18F25K22 PIC on a carrier PCB, and various connections to PIC programmers, and my Shift Register monitor device (described in previous blog entries).
The completed unit will contain a Maxim DS1302 Real-Time-Clock chip with battery backup, and a serial port interface for unit setup. There will be support for two temperature sensors (one internal, one external) and temperature / date/time alarms.
The possibilities are almost endless and I’m really only constrained by the amount of code I can squeeze into the PIC, which should be substantial as this PIC is a far cry from the previous one I used that had only 1K of program space.
The advantage of using the 74HC595 IC’s becomes apparent when you realise that you only need a total of five CPU I/O pins to control the shift register chain (and you can do it with less if you really want to). This leaves plenty of PIC I/O pins for other uses. Also, if an upgrade to the display board were ever required, the shift register chain can be lengthened without impacting on the rest of the hardware.
If you need to create a project that has a lot of inputs or outputs, the 74HC595 and 597 IC’s are perfect.
Nixie Clock running display test program.