Years ago I bought a graphical LCD display, way before oleds and whatnot were starting to become common in the hobbyist crowd. 128x64 pixels, monochrome white foreground on blue background. KS0107+KS0108 drivers. I never got it to work very good, I—with relative little experience at the time—were bound to bodge the connection of at least some of the 20 pins it needed power and signals on. Or get the timing wrong. Or both. Then there was the fact that not many of my few projects actually needed or could take advantage of a graphical display. A button and/or a RS232 connection to a computer usually were enough.
Now with the Arduino+Linux module, and for that matter, more experience, what if I tried to tackle the display again? I set out with the goal of reading the serial output from the Linux module and pushing it onto the LCD, effectively making the AVR+LCD a serial console for the Linux module.
After a very brief search it seemed that the Arduino was not made with writing a whole byte to a range of pins in paralell (like PORTD=0x2a) in mind, and at that time I decided that enough is enough, and purged the Arduino stack and switched to C. When writing this post I did some searching again, and of course it seems to be the case that one can use e.g. PORTD=0x2a in the Arduino stack. Oh well, switching to C is something I wanted to do in the first place, so it does not really matter.
Then came the second and third setback, the Arduino headers I wanted to use do not map to consecutive bits of the various AVR ports, mitigating the benefit of being able to write a byte to a port in one go. And for that matter, some of the pins I wanted to use were tied up in special nets connecting the AVR to the Linux module. This is the reason I dead-bugged the 74LS164 shift register in the previous post.
|It's so pretty! And neat! Hm, actually, for a random wiring job I think it's not that bad…|
|Pair programming, now it's the cat's turn at the keyboard.|
I also have the chance of getting my projects ESD tested. For free.
|It seems that the stereotypes are true…|
Very irritating, but if I tailor the font routine and offsets etc. I can make so it is at the part of the text matrix that is the space between letters and always off.
After a while of fiddling around with trying to find out the correct baud rate for communicating with the Linux module (it's 250k by the way) I figured that maybe the display updating routine was too slow to run each time a byte is received, and moved reception to an interrupt routine, left updating the display to the main loop. Success!