Nigel's LCD routines

Status
Not open for further replies.

hantto

Member
I'm a bit confused how he sets up the LCD.

He sends "Display Shift is On (0x28)" to lcd which is 101000 binary, the MSB is the 5th one, which points to that he modifies the "Function Set" register (according to the table he has on his LCD tutorial page). But there is nothing in this register that has to do with shifting, only the bits for selecting 8 or 4 bit interface, 2 or 1 line mode and the dot format.

The register he should be modifying is the "Character Entry Mode" with the value 111 which is 0x07 to turn shifting on. Despite my observations his routines work. WHAT am I missing here?
 
If you send 0x28 then you tell the display that you will send subsequent data as 4 bit. I'm sorry, but I don't understand your other comment.

Are you maybe reading the table incorrectly?

Mike.
 
Possibly. I will go and read some more on LCDs.

But what should be sent to the LCD if I want to turn shifting off?
 
Nigel's tutorial works with the assumption that the LCD has correctly powered On self reset and ready to accept command.

However, this self reset will only occur if the power supply line rises to correct voltage within 10mS max. according to the HD44780 datasheet.

In all other cases, you are better off following the manufacturer's Init. procedure to the word.
 

Attachments

  • hd44780_init.gif
    25.2 KB · Views: 386
To set the display shifting you need to set bit 2 to 1.

I'll try to attach a data sheet.

Mike.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…