/* Nom du Projet : LED_et_LCD Date de création : 06-12-2012 PIC / 16F877 */ char *text = "Salut"; void main() { Lcd_Config(&PORTB, 0, 1, WR, 5, 4, 3, 2); Lcd_Init(&PORTB); // Initialize LCD connected to PORTB Lcd_Cmd(Lcd_CLEAR); // Clear display Lcd_Cmd(Lcd_CURSOR_OFF); // Turn cursor off PORTD = 0; // Initialize PORTC TRISD = 0; // Configure PORTC as output while(1) { PORTD = ~PORTD; // toggle PORTD Delay_ms(1000); // one second delay Lcd_Out(1, 1, text); // Print text to LCD, 2nd row, 1st column } }