NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » lcd.c file vs initialization by instructions???
March 09, 2011 by caballeroroberto |
On page 46 of the Hitachi LCD spec, the instructions are different than what you have in your lcd.c file, lcd_init() function. In particular, near the end for the last 5 instructions. I guess it works and thats all that matters, but I was just curious why? I appreciate your help. Roberto Caballero |
---|---|
March 10, 2011 by Rick_S |
I'm not 100% sure why they did what they did either. They somewhat follow the normal 4bit init but what is in the PDF isn't etched in stone. The main part that can't really be varied from is the three 0x03's followed by the nibble 0x02 and byte 0x28. This grabs the displays attention, and sets the data mode and character peramiters. The commands after that technially don't even have to be part of the initialization. They just set the cursor type, clear the display and reset the data pointer, etc... Rick |
March 10, 2011 by hevans (NerdKits Staff) |
Hi Roberto, Rick is right. The initialization the sheet provided is just a sample explaining one way of getting the LCD up and running. Humberto |
March 10, 2011 by caballeroroberto |
Awesome, thanks alot. Is it me or is there no clear LCD pin out described for the LCD hardware we receive from NerdKits. What I mean is that, there is a pin out for the processor, but no linkage to the hardware connector in the Hitachi specification. |
March 10, 2011 by Rick_S |
The hitachi datasheet is for the chipset on the LCD not the LCD assembly. While most character LCD's follow a standard layout the chipset datasheet doesn't dictate that. Rick |
March 10, 2011 by bretm |
The Hitachi HD44780 datasheet only describes the actual chip that controls the LCD. The hardware that houses these chips and the LCD itself is a different thing altogether, but it's so generic now that this Wikipedia article describing the pin-out will probably match for any given manufacturer. |
March 10, 2011 by caballeroroberto |
Thank you once again for everyones help. |
Please log in to post a reply.
Did you know that Pulse Width Modulation (PWM) can be used to control the speed of a motor digitally? Learn more...
|