I2c Command sequence to Initialize and write data to the BATRON I2c LCD display
===============================================================================
I bought a Batron I2C LCD display for testing. However i am not succeeding in getting
something on the LCD screen. It stays blank. Only the LED back light is illuminated.
There is NO contrast adjustment possible on this LCD display, at least i did not
see any reference to it.
I have read the application note found on Avrfreaks concerning driving a Batron
LCD display with I2C. They use a different batron LCD display BT21605V-SRE-I2C-COG.
My configuration
----------------
LCD-Type BATRON BTHQ 21605AV-YETF-LED04-I2C-5V
AVR Processor ATMEGA16 running on ext cristal 3,6864MHz.
TWBR = 0x0C;
TWSR |= 0x01;
Implemented I2C Command sequence, Interrupt driven.
---------------------------------------------------
- Read LCD Control Byte to check Busy State LCD Display
- Init LCD I2c Command sequence.
- - - - - - - - - - - - - - - - -
I2C-START
SLA_W 0x76;
FUNC_SET 0x00; Selcet function setting
0x34; 2 by 16 display
0x0C; Turn display on with no cursor
0x06; Inc cursor adr for each write to DDRAM
0x01; CLR_LCD Clear display and set DDRAM adr counter to 0
I2C-STOP
- Read LCD Control Byte to check Busy State LCD Display
- Write Data to the LCD
- - - - - - - - - - - - -
I2C-START
SLA_W 0x76
FUNC_SET 0x00 Selcet function setting
0x80 Write to DDRAM AC, set DDRAM Adr on 0
I2C-START
SLA_W 0x76
0x40 Write to DDRAM
0x50 Write Data, Character "P" Ascii-0x50 (Note_1)
I2C-START
SLA_W 0x76
0x80 Register Select Control Write
0x02 Clear_Adr
I2C-STOP
The LCD Screen is BLANK after this sequence. I expect a Character "P" on the screen.
All I2C return Codes are OK.
Has someone an idee what is missing in the I2C command stream?
Note_1
------
In the Application_Note they say we need to add an Character_Offset 0X80 to the written
characters. I tried to write 0xD0, with the same result, blank screen.
Thanks for help,
Fabrizio