21.08.2013 Views

Embedded Systems Design with the Atmel AVR Microcontroller Part II

Embedded Systems Design with the Atmel AVR Microcontroller Part II

Embedded Systems Design with the Atmel AVR Microcontroller Part II

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PORTD = PORTD | 0xef; //R/W-=0<br />

PORTD = PORTD & 0xfd; //E=0<br />

PORTD = PORTD & 0xfb; //CS1=0<br />

PORTD = PORTD & 0xf7; //CS2=0<br />

PORTD = PORTD & 0xdf; //RST-=0<br />

delay(10);<br />

PORTD = PORTD & 0x20; //RST-=1;<br />

lcd_select_side(left);<br />

lcd_instruction_write(display_off);<br />

lcd_instruction_write(start_line);<br />

lcd_instruction_write(x_address);<br />

lcd_instruction_write(y_address);<br />

lcd_instruction_write(display_on);<br />

lcd_select_side(right);<br />

lcd_instruction_write(display_off);<br />

lcd_instruction_write(start_line);<br />

lcd_instruction_write(x_address);<br />

lcd_instruction_write(y_address);<br />

lcd_instruction_write(display_on);<br />

cls_lcd();<br />

}<br />

7.4. OUTPUT DEVICES 215<br />

//*************************************************************************<br />

void cls_lcd (void)<br />

{<br />

unsigned char page, column;<br />

for(page=0; page

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!