Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top