NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Everything Else » Is the LCD able to use as a graphics screen?
December 29, 2010 by TLR |
As every one know that each letter is 8x8 pixel, can this be alter as a bit mapping, like graphics? I'm looking to design a simple scope to show a PWM wave.. TLR.... |
---|---|
December 29, 2010 by Hexorg |
TLR, trouble with NerdKit's screen is that it has white space between lines (and I think between letters too), so there might be some blank spaces in the image of your wave. However, I believe HD44780 standard supports custom caracters. It'll work something like this - based on your data you can calculate how a new character will look, e.g
The ones is a filled region. it kinda looks like a wave. Then you can send that data to the display. You would have to use some commands from the datasheet. I don't have access to it right now, but i'll let you know if I find anything. |
December 29, 2010 by TLR |
Yes, I can see it now. I just put together the first screen test, maybe this processor would work on a pixel screen better? What about using a Stamp2 to run this LCD screen instead? I would need to learn more about the power of this processor... |
December 29, 2010 by Hexorg |
Seems like Stamp2 is less powerful then ATmega168(the one that comes with the NerdKit). But really it doesn't matter much which processor you choose, it's the screen that matters, so yes, a graphic screen (or a pixel screen as you call it) will work better. But it is possible to make this one display your wave too. For example like this: |
December 29, 2010 by TLR |
Ya, thanks. I'm having a hard time to open this processor for programming. I try all the step and it seem none have worked. Don't know if I would waste any more time, when Stamps2 works with no problem at all.. |
December 30, 2010 by Hexorg |
Actually I need to write custom graphics to the character screen now too. A little search gave me some neat pages: Graphics calculator allows you to set virtual pixels and tells you the binary digits that represent those chars. That page also has a link to a giant HT44780 explanation, which tells you how to write the data that you got from the first page. Page 28 of the HD44780 datasheet also tells you how to manipulate pins to write that data. That's where I'm puzzled now and want to ask the rest of NerdKits community too - it seems you HAVE to use 8-bit interface of the protocol in order to write custom graphics to the screen, right? So lcd.c code that comes with nerdkit's becomes kinda obsolete too? Also, do you guys think it's possible to use two SIPO shift registers to control LCD with just SPI? |
December 30, 2010 by bretm |
You shouldn't need 8-bit interface to write custom graphics. The lcd.h that comes with NerdKits has functions for writing raw command bytes and data bytes and that's all you should need.
I haven't tried it, but from the datasheet it looks like that's how it works. |
December 30, 2010 by Hexorg |
bretm, you were almost correct, except for a 5x8 pattern you have to skip 8 bytes for every position, also command it not 0x80 but 0x40, so a working code (tested):
|
December 30, 2010 by Hexorg |
wait, that's a but messed up... the loop should be not i<7 but i<8, since we want to send 8 bytes total (8 rows) |
December 31, 2010 by bretm |
I did 7 rows on purpose to leave room for the blinking underline cursor. I already had the 8 in there. I had (charNum << 3) which is the same as charNum8. The shifting was more intuitive to me because the diagram in the datasheet shows the character number in bit columns shifted to the left of the row number. Good catch on the 0x40 instead of 0x80. |
December 31, 2010 by bretm |
Oops, didn't catch the italics instead of star in preview. |
January 04, 2011 by Steven |
0-indexing, good sir! You end up with 8 rows because you're starting your counter variable at 0:
|
Please log in to post a reply.
Did you know that you can connect to certain car computers via the OBD-II port with a microcontroller? Learn more...
|