LCD initialisation in codevision avr

Status
Not open for further replies.

debby

Newbie level 3
Joined
Jan 31, 2010
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,306
Hi all...
To interface a 16x2 LCD to ATmega8 and program d chip im using CODEVISION AVR, i hav written d foll. code to initialise the lcd, however there's a declaration error in st.4 and 5... Please help me rectify it.. also wat is d need for st. 7
1 #include <mega8.h>
2 #include <lcd.h>
3 #include <delay.h>
4 void LCDbyte(uint8_t,uint8_t)
5 #define LCDcmd(c) (LCDbyte(c,0))
6 #define LCDcmd(d) (LCDbyte(d,1))
7 LCDcmd(0x30); //func set:8 bit interface
8 delay_ms(20);
9 LCDcmd(0x30); //func set:8 bit interface
10 delay_ms(20);
11 LCDcmd(0x30); //func set:8 bit interface
12 delay_ms(20);
13 LCDcmd(0x28); //func set:4 bit
14 LCDcmd(0x01); //clear cmd
15 LCDcmd(0x06); //set entry mode cmd
void main()
{
lcd_putsf("hello");
}
while (1);
}

MOD: What language is this? Nobody can understand your English.
 

change line 4 to :

void LCDbyte(uint8_t,uint8_t);
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…