Well I think I have read the 8042 datasheet enough times and browsed enough webpages to understand that it's quite similar to the 8048, a major difference being that the low byte of the address goes out on port 1 instead of being multiplexed on the data bus. This means to use port 1 I have to demux that, with a different latch because of the timing waveforms.
Another difference is the lack of an I pin. But I won't be using mains frequency as the clock reference anyway so it doesn't matter. I investigated the frequency divisor arithmetic and understood that I would have to use a crystal frequency that is a multiple of 3 so that there are an integral number of clock cycles in a second. Fortunately crystals are not expensive these days. I looked at ceramic resonators, but those are not accurate enough. Can I drive them at 12 MHz or will I have to settle for 6 MHz? It will depend on what the MCUs I have can do.
I can reuse the circuit design and code from my plasma clock project but I will have to design the cathode and anode drives. For the anode a PNP transistor driven off 4 port 2 pins should work. The pin will be pulled low to turn on the anode, just like the plasma clock. For the cathodes, I don't want to use discrete transistors. I could use a couple of 7406 hex open collector inveter ICs, these can sink 20 mA, which might be enough for 4 multiplexed digits as that's roughly equivalent to 5 mA constant current. Hmm, I don't have enough 7406 ICs in my junk box. Following a tip in a forum I'll use a 74LS244 8-bit line driver IC instead; I have a lot of these. This is non-inverting so means the line has to be pulled low to turn on. So I have to invert the font bits in the firmware.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.