??? 08/27/06 17:46 Read: times |
#123142 - does that mean they're all alike? Responding to: ???'s previous message |
Ashwin V said:
Russel Bull said:
Ashwin, apart from stating 'it works' - does it comply with the Hitachi datasheet? Ashwin.V said:
I have used the same code in many of my projects. Considering the fact that Arvind is from Delhi and also the fact that all electronic goods in bangalore (where i sourced my LCD) are sourced from Delhi, Yes the code will work for Arvind. Call it strange, but the LCDs which i'm using ARE Hitachi compatible. It took a bit of trial and error for delays and initialisations('entry_set_mode' used in my code) before i could get the LCD running. Are you saying that all LCDs coming from Delhi are necessarily alike just because they come from Delhi? Aren't there multiple manufacturers? Isn't is possible that they implement things differently, perhaps at different duty cycles (check the datasheets to see what this might do)? If you use the LCD correctly, meaning that you design your interface depending on the LCD controller, i.e. the HD44780, and if you determine the correct parameters from the datasheet, it shouldn't be a mystery requiring lots of tweaking. The minimal pulse width for 'E' is what it is. It doesn't change with MCU or with LCD batch or manufacturer. It depends only on the version of the HD44780, or clone thereof. Likewise, the execution time of the commands is well-defined, based on the IC version and the display duty cycle. Initialization timing is constant, regardless of the LCD, as it is a function only of the LCD controller. If you use the busy flag as shown in the datasheet, the timing will be determined by that. There are enough pins on the single 8-bit port to manage a 4-bit interface from it alone, including the R/W* signal. With a 12-clocker at 12 MHz or slower, you can set the 'E' bit and then clear it without any delay and still meet the minimal timing of all the HD44780 versions with which I'm familiar. If all the other signals are set up before and persist after 'E', you should have no trouble at all. You should, however, always operate the device as the HD44780 datasheet tells you. RE |