Professional Documents
Culture Documents
Port City International University: Mid-Term Lab Report
Port City International University: Mid-Term Lab Report
Submitted To : Submitted By :
void main ()
{
Lcd_Init(); //Initializes LCD module.
Lcd_Out(1,1,"Hello"); // display the text in row =1 and columns = 1
}
// Pin direction
char text[6];
void main ()
2) Code For turn on/ off LED alternately and show the status of the
LED in the LCD:
sbit LCD_RS at RB4_bit;
// Pin direction
sbit LCD_RS_Direction at TRISB4_bit;
void main ()
while(1)
PORTB = 0b00001000;
LCD_out(1,1,"LED1 ON");
LCD_out(1,1,"LED2 OFF");
delay-ms(1000);
PORTB = 0b00010000;
LCD_out(1,1,"LED1 Off");
LCD_out(2,1,"LED2 On");
delay-ms(1000);