Microcontroller › AVR › Interfacing LCD with ATMEGA 8 › hello sir i modified the 4
March 1, 2013 at 11:15 am
#9212
prajwal
Participant
hello sir i modified the 4 bit mode code to atmega 8. the code is like this
#include<avr/io.h>
#include<util/delay.h>
#include<inttypes.h>
#define rs PB0
#define rw PB1
#define en PB2
void lcd_init();
void dis_cmd(char);
void dis_data(char);
void lcdcmd(char);
void lcddata(char);
int main(void)
{
unsigned char data0[11]=”ENGINEERS”;
unsigned char data1[10]=”GARAGE”;
int i=0;
DDRD=0xFF;
lcd_init();
while(data0!=’