I hooked everything up according to spec. When the VDO isnt plugged into the circuit its 1V but at the same point when I plug in the VDO its 2.5V, no idea why this is happening so thats first on the list. Secondly I followed the flow chart at the end of the data sheet to initialize the LCD and im running in on a MEGA16 and the code is below...I'll take any help here I can get!
//enable?
PORTC.2=1;
delay_us(5);
PORTC.2=1;
delay_us(5);
PORTC.2=0;
delay_us(5);
while (1)
{
//initialize?
if (initial==0)
{
delay_ms(15);
PORTB=0x30;
delay_ms(4);
PORTB=0x30;
delay_us(100);
PORTB=0x30;
PORTB=0x3C;
PORTB=0x08;
PORTB=0x01;
PORTB=0x06;
initial=1;
};
//place characters
PORTC.0=1;
PORTB=0x13;
PORTB=0x23;
PORTB=0xA3;
PORTB=0x53;
PORTB=0x93;
PORTB=0x08;
PORTB=0x05;
PORTB=0xD4;
PORTC.0=0;
PORTB=0xC0;
PORTC.0=1;
PORTB=0x35;
PORTB=0x56;
PORTB=0x47;
PORTB=0xF3;
PORTB=0x02;
PORTB=0x02;
};
//enable?
PORTC.2=1;
delay_us(5);
PORTC.2=1;
delay_us(5);
PORTC.2=0;
delay_us(5);
while (1)
{
//initialize?
if (initial==0)
{
delay_ms(15);
PORTB=0x30;
delay_ms(4);
PORTB=0x30;
delay_us(100);
PORTB=0x30;
PORTB=0x3C;
PORTB=0x08;
PORTB=0x01;
PORTB=0x06;
initial=1;
};
//place characters
PORTC.0=1;
PORTB=0x13;
PORTB=0x23;
PORTB=0xA3;
PORTB=0x53;
PORTB=0x93;
PORTB=0x08;
PORTB=0x05;
PORTB=0xD4;
PORTC.0=0;
PORTB=0xC0;
PORTC.0=1;
PORTB=0x35;
PORTB=0x56;
PORTB=0x47;
PORTB=0xF3;
PORTB=0x02;
PORTB=0x02;
};
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.