I’ve built a simple decoder circuit on some breadboard, using a PIC. The inputs to the decoder are +5v, 0v and the time code signal obtained from the receiver. The PIC has code running on it that decides whether each pulse is a 0 or a 1, it does this by using simple time delays and bit reads.
I started writing the PIC program in assembly language, but it became hideously complicated when trying to extract the time from the list of 1’s and 0’s, so I moved on to using a program called mikroBasic. This program allows me to write a PIC program in BASIC, which is then compiled into assembly language, which I feed to Winpic to program the PIC using the programmer I made.
The program I have made stores the current time in variables in the PIC’s memory. I then needed a way to somehow get the time out of some memory onto an LED display. I tried a few different chips for interfacing with an LED display, and finally settled on a Maxim MAX7219. This is a ‘Serially Interfaced, 8-Digit, LED Display Driver’, which essentially means that I connect this chip with up to 8 LED digits (I’ll only be using 6, hh:mm:ss) and then program the chip through a serial SPI BUS, telling it what numbers to display. There are three inputs on the MAX7219; CLK, SDA and CS’. These three inputs are connected to a PIC output port. I have then written code that accesses the SPI capability on the PIC, allowing us to send data to the MAX7219, telling it to display whatever digits we want.
I had originally stated that I was going to use a PIC 16LF84A, but I’ve now decided to use a PIC 16F88. This is because the 16LF84A doesn’t have a built in SPI capacility and the fact that the 16F88 has more memory and is cheaper.
The only problem I face now is finding an LED display to use! Farnell sell a perfect display (click), but you need to spend £20 before they ship anything to you, so that’s not really an option. I could use Maplin, but they only have red digits in stock (the green ones are in their catalogue but there is no stock in any store, work that one out), and I’d like the display to be green. Also, I’d like the seconds to be smaller than the hh:mm, and Maplin don’t have any small LED digits in stock, not very helpful at all really.
Looks like I have some hunting to do!
Note that I have decided to wait until I’ve finished this project before knocking up a circuit schematic or putting the code up, it doesn’t make sense to stick anything on the net until it’s final, as it changes so often.