Professional Documents
Culture Documents
Nursultan Urmatbek
***************************/
#include<ez8.h>
//function prototype
void init_ports(void);
void init_LCD(void);
void main(void)
init_ports();
init_LCD();
//cmd_write(0x40);
while (*pmsg != '\0') // loops through the string until it reaches null
//watch = *pmsg;
data_write(*pmsg++);
//delay(50);
delay(20);
//watch = *pmsg2;
data_write(*pmsg2++);
//delay(50);
delay(20);
//delay(20);
return;
} // end of main
void init_ports(void)
PDADDR = 0x02;
PDCTL = 0x00;
PDADDR = 0x01;
PDCTL = 0x00;
PDADDR = 0x03;
PDCTL = 0x00;
PDADDR = 0x00;
PEADDR = 0x02;
PECTL = 0x00;
PEADDR = 0x01;
PECTL = 0x00;
PEADDR = 0x03;
PECTL = 0x00;
PEADDR = 0x00;
return;
void init_LCD(void)
return;
void cmd_write(unsigned char cmd) // RS is set low, command is stored on the bus, enable is pulsed
high for a short duration
//strobe E
return;
}
unsigned int t;
for(;dtime>0;dtime--)
for(t=220;t>0;t--);
return;
void data_write(unsigned char data) // RS is set high, data is stored on the bus, enable is pulsed high for
a short duration
// strobe E
return;