// projet sources de xlcdlib100 : Arlotto 2006 // pour générer une librairie : // enlever ce fichier du projet // compiler en utilisant le large memory model // et en invoquant MPLIB (menu build option) // ensuite récupérer les fichiers .lib et xlcd.h // renomer le .lib en xlcdVVV.lib et xlcd.h en xlcdVVV.h #include #include #include "XLCD/xlcd.h" void main (void) { char mybuffer[]="coucou"; int cpt=0; char b ; b = 0 ; TRISB = 0; PORTB = cpt; OpenXLCD(OPEN_PICDEM_LCD); //WriteCmdXLCD(1); clearXLCD(); stdout = _H_USER ; putsXLCD(mybuffer); gotoXLCD(LCD_LINE_TWO+3); printf ( "bonjour" ); while (1) { if (PORTAbits.RA4 == 0 ) { if (b==0) { cpt++; WriteCmdXLCD(GOTO_LINE_ONE+sizeof(mybuffer)+1); printf("cpt=%02d",cpt); PORTB = cpt; b=1; } } else { b = 0 ; } } } /* int _user_putc (char c) { WriteDataXLCD(c); return c ; }*/