I currently have a SerLCD 16x2, an accelerometer, and arduino. I want to make a graphical display (bar graph) of the g’s seen by the accelerometer. Right now I am spitting out a character display no problem. Any hints on how to generate a bar graph?
This display is character-oriented, so the short answer is you can’t. But when have any of us let mere ‘impossibility’ stop us before?
The display controller has a small memory with the bitmap shape of each character. Most of this memory is hard-coded (you can’t change it) but for characters 0-7 you can. What you do is make one of these characters a bar with the column on the left filled in and the rest blank, the next character with two columns filled in, etc. There already is a character with no bits filled in (space) and one with all the bits filled in (0xFF).
Now the SerLCD data sheet doesn’t say anything about this! how then can we do it when the SerLCD doesn’t even apparently support it? Read on.
SerLCD has a little microcontroller, a PIC16LF88 does serial to 4-bit parallel conversion to talk to an even smaller smaller microcontroller, an SD7066 which is hard-coded to be an LCD driver. (That’s right, there’s not one, but two, full-blown computers in each SerLCD/screen combo!) To send display text, you just send ASCII characters to the PIC, which forwards them to the data register on the LCD controller. To send special commands, you send the character 0xFE (254) followed by a 1-byte command. The PIC then pokes that into the instruction register LCD. So, if you get the SD7066 data sheet, you can send any command the SD7066 supports in this way.
So, read up the SD7066 data sheet (or the [HD44760 data sheet, since the SD7066 is a clone of that part), draw your characters, convert them to commands, send the commands, then use characters 0-7 to draw the bar graph.](http://web.media.mit.edu/~ayah/documents/hd44780u.pdf)