wuchy143
Member
Hi All,
I"m trying to program Hantronix Inc's LCD(P/N: HDM24216L-2). Their spec isn't very helpfull and this is the first time I've needed to program a parallel LCD. My experience is the serial ones.
From what I've gathered you have 3 control lines. RS, R/W, and E. I want to display a "0" on the screen. So I set RS = "high" because I'm giving the LCD a data input. R/w = 0v because I'm writing data. Last is the E which on it's transition from High to Low the LCD starts to take in the data on it's data ports.(This is the enable pin)
I"m not sure why this isn't working. Does anyone have experience with parallel LCD's and know of some things I may be doing wrong? Or less ideal? I did read in the datasheet that you need to supply power a certain way but I checked that on my scope and I"m withing the allowable range. I"m stumped.....I appreciate the help. My code is below.
Regards,
-mike
I"m trying to program Hantronix Inc's LCD(P/N: HDM24216L-2). Their spec isn't very helpfull and this is the first time I've needed to program a parallel LCD. My experience is the serial ones.
From what I've gathered you have 3 control lines. RS, R/W, and E. I want to display a "0" on the screen. So I set RS = "high" because I'm giving the LCD a data input. R/w = 0v because I'm writing data. Last is the E which on it's transition from High to Low the LCD starts to take in the data on it's data ports.(This is the enable pin)
I"m not sure why this isn't working. Does anyone have experience with parallel LCD's and know of some things I may be doing wrong? Or less ideal? I did read in the datasheet that you need to supply power a certain way but I checked that on my scope and I"m withing the allowable range. I"m stumped.....I appreciate the help. My code is below.
Regards,
-mike
Code:
void main() {
ANSEL = 0; // Configure AN pins as digital
ANSELH = 0;
C1ON_bit = 0; // Disable comparators
C2ON_bit = 0;
TRISA = 0x00;
TRISB = 0x00;
TRISC = 0x00;
TRISD = 0x00;
PORTA = 0x00;
PORTB = 0x00;
PORTC = 0x00;
PORTD = 0x00;
PORTA = 0b00110000;
RB7_bit = 1;
Delay_ms(500);
RB5_bit = 1;
RB6_bit = 0;
Delay_ms(500);
RB7_bit = 0;
Delay_ms(500);
for(;;){}
Last edited by a moderator: