Hi Tony, > I am having trouble initializing my 2x8 optrex lcd w/hd44780a > controller > in 4 bit mode.I have tried everything I could glean from the FAQ's but > it just > does'nt shift to 4 bit mode and all subsequent writes cause the cursor > to move > two places.In the simulator the write routine 4 bit writes upper > nybble,lower > nybble with no extra loops and the character printed bears no relation > to the > one I was attempting.I am using bits <4..7>b for data & bits <1..3>b for > control > The rs & r/w bits are output with enable low then enable is toggled high > and the > 4 data bits are output then the enable bit is toggled low. You might have a look at the following I did in Pascal just to get an idea of the steps to take. The plan is to write the reset to 8 bit mode comand to the display 3 times as recommended in the data sheets and then send the set to 4 bit mode command once. All 4 of the above were single byte writes after the last one then you start to write nibble/nibble. http://www.ip.co.za/people/kalle/project.htm#lcd Cheers *<<<-| -- Kalle Pihlajasaari kalle@ip.co.za http://www.ip.co.za/ip Interface Products P O Box 15775, DOORNFONTEIN, 2028, South Africa + 27 (11) 402-7750 Fax: 402-7751 http://www.ip.co.za/people/kalle