Picture
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.

 
 
At last, it’s completed and this new programmer will make my life so much easier when it comes to PIC development.

This has been one of those projects that in some ways, I wished I’d not started as there seemed no end to it and everything just seemed to go wrong. I blame the fact that I never really had any time to just sit down and do this project from start to finish, but now it’s completed and working, I’m really pleased I stuck with it.

And here it is.
Ok, a bit of explanation as to what this lovely, beautiful piece of equipment can do.

Inside the case are six PCBs packed with electronics. There’s a PCB that contains a PSU with 5v regulator and an adjustable voltage regulator; set to around 7.3v that drives the LEDs in the push switches. Also on this board is a MAX232 and associated electronics that provide two RS232 interfaces; more on these in a second. There are four almost identical boards; one per output channel that contain a 16-bit shift register, driver chips and relays. The final board contains the PIC and driver logic that runs everything.

Also inside are two Microchip PICKIT programmers (a PICKIT2 and a PICKIT3).

On the front panel there are four 9-way D-Type connections that can be used to connect an ICSP cable to a project under development, or, in the case of this new programmer, up to four projects in development; this will make multi-PIC projects a lot simpler to develop and debug.

You can select which PICKIT is connected to which of the four ports and you can of course only connect each programmer to one port at a time. The unit also has in-built support for RS232 which I use for project debugging. My custom ICSP cable has provision for serial data to be set from the PIC to the outside world and this makes it possible to send any debugging information from the PIC, into my programmer which level shifts from TTL to RS232 and then out to a dumb terminal emulator. I’ve made provision for up to two serial ports and again, you can select which serial port is attached to which input. The serial ports are also available via four, 4mm banana sockets on the front panel for use within other projects.

The upshot of this is that you can connect one port to each PIC project under development, and allocate either of the internal programmers / serial ports on the fly to each port as required without the need to keep unplugging cables all the time.

The advantage of this new unit over my now obsolescent one (which only support up to three outputs and was very clunky), is that I could, in theory, expend the design to support as many output ports as required. It would be a lot of additional effort to increase the number of PICKIT programmers that can be supported. This was going to be a six port unit but I didn’t have a case large enough at the time. But now I’ve got all the hardware sorted out, it wouldn’t be too difficult to build a larger one if required. I’d need to tweak the PIC firmware that controls everything of course, but that’s no real hassle.

Oh yes, the reason I've used a PICKIT2 and a PICKIT3 is simple. I prefer the PICKIT2 as it's much faster than the 3, but the 3 supportes a couple of PICs that I've started to use that the 2 dosn't. I could have used any combination of programmers if desired, or even completly different programmers. It's just I rather like the Microchip ones.
 
 
I made a promise to myself to finish my PIC programmer over the holidays. This project, like a many of my projects contain a shift register chain, and this one is 64 bits long which isn’t really a lot, but the firmware controlling the project is quite complex and I’ve been having problems debugging everything. One thing that would be really useful is an external display that I could connect to a project and could give me a visual indication of the state of the shift register chain outpus in the project under construction.

So, I took another slight diversion and built a piece of test equipment that can help.

The analyser can connect to the set of control signals that control a shift register chain within a project, and display on several bar-LED displays, the status of the shift register chain being monitored.

The unit has two inputs so it can monitor two shift register chains in parallel, each of up to 56 bits, or by flicking a switch, combine the two displays together to monitor a single chain of up to 112 bits in length. The project is extendable and could be expanded to monitor shift register chains of any number of bits if required.

The unit is a bit of a compromise as I had to use parts and a case I had available, but it does employ fully buffered inputs so presents minimal external load to the project it’s being used to monitor, and has it’s own internal voltage regulator board which will accept a 9v AC/DC input. With all the LED's on, the unit draws just under an amp !!

At some point over the next few days, I’ll create a basic construction article and include the PCB foils and circuit diagrams etc.