??? 10/01/09 05:14 Read: times |
#169320 - You can't avoid the study. Responding to: ???'s previous message |
Malik Martin said:
Or at least made an attempt to play around with them, that's why it kind of baffled me. I just assumed too much too early instead of reading on I guess.
Thanks. It's easy to be lulled into complacency and thence into making unwarranted assumptions about LCD's, since they appear to be so "generic." However, starting with the initialization, they can vary considerably from the "norm", the norm being the classic HD44780 interface controller. That's where the handshake timing has to be correct, and that's where the display data is stored. There are several ways in which small displays can be mapped into the 4x20 address-space that those interface IC's provide, and that, in turn, is why you really ought to have the datasheet for the specific LCD module that you're using. If you have only the datasheet for the HD44780, or whatever IC is used in its stead, you're reduced to guessing how the lines are mapped into that 80-character memory space. You're also left guessing as to instruction timing, since different display implementations alter the command timing, which is really only important if you are operating "open-loop" rather than monitoring the busy flag. Also, you have the choice of attaching the display to the external memory bus, if your MCU is slow enough, or driving it from port pins, as you apparently are doing at present. You can even memory-map your display, i.e. allow it to appear as external memory, with the RS signal coming from an address bit and the data lines when RS=1 coming the data bus and the data lines coming from AB(0..6) when sending a command. That, then, allows you to treat the LCD as a memory block, albeit one driven with discrete port signals rather than external memory bus. That way, you have external memory in the "character-generator RAM" in the LCD interface controller. Some of these "tricks" require a bit of external hardware, and therefore are a bit messy to implement. That's why they're seldom used. If you look at the spec for your LCD with an eye toward what will work best in your target application, it will quickly become apparent how you'll have to to use it to get the best fit. You can't avoid the study, however. RE |