PIC Programming - Take 2:
Driving a 128x64 graphic LCD with a PIC. Yep! A PIC!
I've bumped up the power to 5v and operating speed of 20MHz. Oh the places we'll go!
The 16F84 was great, but I ran out of I/O lines! I needed four ADC lines to drive the touch screen on my new LCD.
I bought a CFAX12864C with a touch screen and back light for $37 from crystalfontz.com. This thing is amazing!
It took me a month to get the interface up and running, but with pain comes gain. This thing rocks.
This was the original bread board. An 'A:' ribbon connects the important lines to the CFAX12864C eval board. My programmer up top, and a black serial line for debugging on the left.
The full deal.
Next I added a BL driver. I still can't believe this worked.
Next step was to proto board the thing. That means I got to learn how to wire wrap!
Here we have the goodies. See if you can find the: PIC, 20MHz xal, 4k EEProm, 5v regulator, Backlight driver, Temperature sensor. See below for a detailed explanation.
You bet it worked.
Ahh yea. You touch 'OPTs' - you get the options menu. Touch 'Elapsed' and the timer starts/stops. Touch up/down and - well nothing - it's not hooked up yet.
How does it work you ask? I know you didn't but just humor me.
The PIC decides it needs to print the letter 's' in the corner of the screen. So it yells at the 4k EEProm for the 5 data bytes that makeup the letter 's'.
Just send these bytes to the screen you say? Oh no.
The screen is in vertical mode. So all 5 bytes must be rotated 90 degrees into 5 new bytes. The 5x8 font is too small to read so the bytes must then be stretched to give a bold look (tho just in the y axis) .
But the screen only has 8 columns a byte wide (64 pixels wide). That means I can only print 8 individual letters. What if I want to print this letter across a column division? I guess we'd better split all the bytes.
But what if something is already there? We can't just write over it. We'd better read was is there and then mask onto it.
Blah blah blah. Did someone touch the screen while this was going on? Do a quick read of the temperature, increment the clock, turn off the BL if needed. My 4MHz crystal could almost cut it. But in the end, I had to go with the big boy.
I've even got an option for the BL to be on a timer (ie 'On Touch').
Ahh yea. I had to write that degree symbol myself. It was a tough one.
So thats it. Next step is to take everything down to SMD sizes and lay out a PCB. And I just learned how to wire wrap last week!
Know anyone who might want to buy this interface? I'm a poor, easily bribed, student.
Lemme know what you think! email@example.com