#include // include the LCD driver routines #include #asm .equ __lcd_port=0x1B ;PORTa #endasm /* include the LCD driver routines */ void delay_time(long tm); typedef unsigned char byte; unsigned char tmcnt; /* table for the user defined character arrow that points to the top right corner */ flash byte char0[8]={ 0b00010101, 0b00001010, 0b00010101, 0b00001010, 0b00010101, 0b00001010, 0b00010101, 0b00001010}; /* function used to define user characters */ void define_char(byte flash *pc,byte char_code) { byte i,a; a=(char_code<<3) | 0x40; for (i=0; i<8; i++) lcd_write_byte(a++,*pc++); } void main(void) { int i; tmcnt=0; DDRB=0xff; PORTB=0x01; /* initialize the LCD for 2 lines & 16 columns */ lcd_init(16); /* define user character 0 */ define_char(char0,0); /* switch to writing in Display RAM */ /* display used defined char 0 */ lcd_putchar(0); lcd_putchar(0x41); while (1) { TIMSK=0x01; TCCR0=0x05; TCNT0=0x1; SREG.7=1; lcd_clear(); lcd_gotoxy(0,1); lcd_putsf("LCD TESTING"); lcd_gotoxy(0,0); lcd_putsf("easy leanrning"); delay_time(100000); lcd_clear(); lcd_gotoxy(0,0); for(i=0;i<15;i++)lcd_putchar(0); lcd_gotoxy(0,1); for(i=0;i<15;i++)lcd_putchar(0); delay_time(100000); lcd_clear(); lcd_gotoxy(0,0); lcd_putsf("tel:61361234"); delay_time(100000); } } void delay_time(long tm) { long i; i=tm; for(i=0;i