# 1 "main_feux_wc.c" # 12 #pragma config CP = ON #pragma config CCPMX = RB3 #pragma config DEBUG = OFF #pragma config WRT = OFF #pragma config CPD = ON #pragma config LVP = OFF #pragma config BOREN = OFF #pragma config MCLRE = OFF #pragma config PWRTE = ON #pragma config WDTE = OFF #pragma config FOSC = INTOSCIO # 49 "C:\Program Files (x86)\Microchip\xc8\v1.34\include\pic16f87.h" extern volatile unsigned char INDF @ 0x000; asm("INDF equ 00h"); extern volatile unsigned char TMR0 @ 0x001; asm("TMR0 equ 01h"); extern volatile unsigned char PCL @ 0x002; asm("PCL equ 02h"); extern volatile unsigned char STATUS @ 0x003; asm("STATUS equ 03h"); typedef union { struct { unsigned C :1; unsigned DC :1; unsigned Z :1; unsigned nPD :1; unsigned nTO :1; unsigned RP :2; unsigned IRP :1; }; struct { unsigned :5; unsigned RP0 :1; unsigned RP1 :1; }; struct { unsigned CARRY :1; }; struct { unsigned :2; unsigned ZERO :1; }; } STATUSbits_t; extern volatile STATUSbits_t STATUSbits @ 0x003; # 154 extern volatile unsigned char FSR @ 0x004; asm("FSR equ 04h"); extern volatile unsigned char PORTA @ 0x005; asm("PORTA equ 05h"); typedef union { struct { unsigned RA0 :1; unsigned RA1 :1; unsigned RA2 :1; unsigned RA3 :1; unsigned RA4 :1; unsigned RA5 :1; unsigned RA6 :1; unsigned RA7 :1; }; } PORTAbits_t; extern volatile PORTAbits_t PORTAbits @ 0x005; # 221 extern volatile unsigned char PORTB @ 0x006; asm("PORTB equ 06h"); typedef union { struct { unsigned RB0 :1; unsigned RB1 :1; unsigned RB2 :1; unsigned RB3 :1; unsigned RB4 :1; unsigned RB5 :1; unsigned RB6 :1; unsigned RB7 :1; }; } PORTBbits_t; extern volatile PORTBbits_t PORTBbits @ 0x006; # 282 extern volatile unsigned char PCLATH @ 0x00A; asm("PCLATH equ 0Ah"); typedef union { struct { unsigned PCLATH :5; }; } PCLATHbits_t; extern volatile PCLATHbits_t PCLATHbits @ 0x00A; # 301 extern volatile unsigned char INTCON @ 0x00B; asm("INTCON equ 0Bh"); typedef union { struct { unsigned RBIF :1; unsigned INT0IF :1; unsigned TMR0IF :1; unsigned RBIE :1; unsigned INT0IE :1; unsigned TMR0IE :1; unsigned PEIE :1; unsigned GIE :1; }; struct { unsigned :1; unsigned INTF :1; unsigned :2; unsigned INTE :1; }; } INTCONbits_t; extern volatile INTCONbits_t INTCONbits @ 0x00B; # 378 extern volatile unsigned char PIR1 @ 0x00C; asm("PIR1 equ 0Ch"); typedef union { struct { unsigned TMR1IF :1; unsigned TMR2IF :1; unsigned CCP1IF :1; unsigned SSPIF :1; unsigned TXIF :1; unsigned RCIF :1; }; } PIR1bits_t; extern volatile PIR1bits_t PIR1bits @ 0x00C; # 427 extern volatile unsigned char PIR2 @ 0x00D; asm("PIR2 equ 0Dh"); typedef union { struct { unsigned :4; unsigned EEIF :1; unsigned :1; unsigned CMIF :1; unsigned OSFIF :1; }; } PIR2bits_t; extern volatile PIR2bits_t PIR2bits @ 0x00D; # 460 extern volatile unsigned short TMR1 @ 0x00E; asm("TMR1 equ 0Eh"); extern volatile unsigned char TMR1L @ 0x00E; asm("TMR1L equ 0Eh"); extern volatile unsigned char TMR1H @ 0x00F; asm("TMR1H equ 0Fh"); extern volatile unsigned char T1CON @ 0x010; asm("T1CON equ 010h"); typedef union { struct { unsigned TMR1ON :1; unsigned TMR1CS :1; unsigned nT1SYNC :1; unsigned T1OSCEN :1; unsigned T1CKPS :2; unsigned T1RUN :1; }; struct { unsigned :2; unsigned T1INSYNC :1; unsigned :1; unsigned T1CKPS0 :1; unsigned T1CKPS1 :1; }; } T1CONbits_t; extern volatile T1CONbits_t T1CONbits @ 0x010; # 549 extern volatile unsigned char TMR2 @ 0x011; asm("TMR2 equ 011h"); extern volatile unsigned char T2CON @ 0x012; asm("T2CON equ 012h"); typedef union { struct { unsigned T2CKPS :2; unsigned TMR2ON :1; unsigned TOUTPS :4; }; struct { unsigned T2CKPS0 :1; unsigned T2CKPS1 :1; unsigned :1; unsigned TOUTPS0 :1; unsigned TOUTPS1 :1; unsigned TOUTPS2 :1; unsigned TOUTPS3 :1; }; } T2CONbits_t; extern volatile T2CONbits_t T2CONbits @ 0x012; # 625 extern volatile unsigned char SSPBUF @ 0x013; asm("SSPBUF equ 013h"); extern volatile unsigned char SSPCON @ 0x014; asm("SSPCON equ 014h"); typedef union { struct { unsigned SSPM :4; unsigned CKP :1; unsigned SSPEN :1; unsigned SSPOV :1; unsigned WCOL :1; }; struct { unsigned SSPM0 :1; unsigned SSPM1 :1; unsigned SSPM2 :1; unsigned SSPM3 :1; }; } SSPCONbits_t; extern volatile SSPCONbits_t SSPCONbits @ 0x014; # 700 extern volatile unsigned short CCPR1 @ 0x015; asm("CCPR1 equ 015h"); extern volatile unsigned char CCPR1L @ 0x015; asm("CCPR1L equ 015h"); extern volatile unsigned char CCPR1H @ 0x016; asm("CCPR1H equ 016h"); extern volatile unsigned char CCP1CON @ 0x017; asm("CCP1CON equ 017h"); typedef union { struct { unsigned CCP1M :4; unsigned CCP1Y :1; unsigned CCP1X :1; }; struct { unsigned CCP1M0 :1; unsigned CCP1M1 :1; unsigned CCP1M2 :1; unsigned CCP1M3 :1; }; } CCP1CONbits_t; extern volatile CCP1CONbits_t CCP1CONbits @ 0x017; # 775 extern volatile unsigned char RCSTA @ 0x018; asm("RCSTA equ 018h"); typedef union { struct { unsigned RX9D :1; unsigned OERR :1; unsigned FERR :1; unsigned ADDEN :1; unsigned CREN :1; unsigned SREN :1; unsigned RX9 :1; unsigned SPEN :1; }; struct { unsigned RCD8 :1; unsigned :5; unsigned RC9 :1; }; struct { unsigned :6; unsigned nRC8 :1; }; struct { unsigned :6; unsigned RC8_9 :1; }; } RCSTAbits_t; extern volatile RCSTAbits_t RCSTAbits @ 0x018; # 869 extern volatile unsigned char TXREG @ 0x019; asm("TXREG equ 019h"); extern volatile unsigned char RCREG @ 0x01A; asm("RCREG equ 01Ah"); extern volatile unsigned char OPTION_REG @ 0x081; asm("OPTION_REG equ 081h"); typedef union { struct { unsigned PS :3; unsigned PSA :1; unsigned T0SE :1; unsigned T0CS :1; unsigned INTEDG :1; unsigned nRBPU :1; }; struct { unsigned PS0 :1; unsigned PS1 :1; unsigned PS2 :1; }; } OPTION_REGbits_t; extern volatile OPTION_REGbits_t OPTION_REGbits @ 0x081; # 950 extern volatile unsigned char TRISA @ 0x085; asm("TRISA equ 085h"); typedef union { struct { unsigned TRISA0 :1; unsigned TRISA1 :1; unsigned TRISA2 :1; unsigned TRISA3 :1; unsigned TRISA4 :1; unsigned TRISA5 :1; unsigned TRISA6 :1; unsigned TRISA7 :1; }; } TRISAbits_t; extern volatile TRISAbits_t TRISAbits @ 0x085; # 1011 extern volatile unsigned char TRISB @ 0x086; asm("TRISB equ 086h"); typedef union { struct { unsigned TRISB0 :1; unsigned TRISB1 :1; unsigned TRISB2 :1; unsigned TRISB3 :1; unsigned TRISB4 :1; unsigned TRISB5 :1; unsigned TRISB6 :1; unsigned TRISB7 :1; }; } TRISBbits_t; extern volatile TRISBbits_t TRISBbits @ 0x086; # 1072 extern volatile unsigned char PIE1 @ 0x08C; asm("PIE1 equ 08Ch"); typedef union { struct { unsigned TMR1IE :1; unsigned TMR2IE :1; unsigned CCP1IE :1; unsigned SSPIE :1; unsigned TXIE :1; unsigned RCIE :1; }; } PIE1bits_t; extern volatile PIE1bits_t PIE1bits @ 0x08C; # 1121 extern volatile unsigned char PIE2 @ 0x08D; asm("PIE2 equ 08Dh"); typedef union { struct { unsigned :4; unsigned EEIE :1; unsigned :1; unsigned CMIE :1; unsigned OSFIE :1; }; } PIE2bits_t; extern volatile PIE2bits_t PIE2bits @ 0x08D; # 1154 extern volatile unsigned char PCON @ 0x08E; asm("PCON equ 08Eh"); typedef union { struct { unsigned nBOR :1; unsigned nPOR :1; }; struct { unsigned nBO :1; }; } PCONbits_t; extern volatile PCONbits_t PCONbits @ 0x08E; # 1187 extern volatile unsigned char OSCCON @ 0x08F; asm("OSCCON equ 08Fh"); typedef union { struct { unsigned SCS :2; unsigned IOFS :1; unsigned OSTS :1; unsigned IRCF :3; }; struct { unsigned SCS0 :1; unsigned SCS1 :1; unsigned :2; unsigned IRCF0 :1; unsigned IRCF1 :1; unsigned IRCF2 :1; }; } OSCCONbits_t; extern volatile OSCCONbits_t OSCCONbits @ 0x08F; # 1257 extern volatile unsigned char OSCTUNE @ 0x090; asm("OSCTUNE equ 090h"); typedef union { struct { unsigned TUN :6; }; struct { unsigned TUN0 :1; unsigned TUN1 :1; unsigned TUN2 :1; unsigned TUN3 :1; unsigned TUN4 :1; unsigned TUN5 :1; }; } OSCTUNEbits_t; extern volatile OSCTUNEbits_t OSCTUNEbits @ 0x090; # 1314 extern volatile unsigned char PR2 @ 0x092; asm("PR2 equ 092h"); extern volatile unsigned char SSPADD @ 0x093; asm("SSPADD equ 093h"); extern volatile unsigned char SSPSTAT @ 0x094; asm("SSPSTAT equ 094h"); typedef union { struct { unsigned BF :1; unsigned UA :1; unsigned R_nW :1; unsigned S :1; unsigned P :1; unsigned D_nA :1; unsigned CKE :1; unsigned SMP :1; }; struct { unsigned :2; unsigned R :1; unsigned :2; unsigned D :1; }; struct { unsigned :2; unsigned I2C_READ :1; unsigned I2C_START :1; unsigned I2C_STOP :1; unsigned I2C_DATA :1; }; struct { unsigned :2; unsigned nW :1; unsigned :2; unsigned nA :1; }; struct { unsigned :2; unsigned nWRITE :1; unsigned :2; unsigned nADDRESS :1; }; struct { unsigned :2; unsigned R_W :1; unsigned :2; unsigned D_A :1; }; struct { unsigned :2; unsigned READ_WRITE :1; unsigned :2; unsigned DATA_ADDRESS :1; }; } SSPSTATbits_t; extern volatile SSPSTATbits_t SSPSTATbits @ 0x094; # 1494 extern volatile unsigned char TXSTA @ 0x098; asm("TXSTA equ 098h"); typedef union { struct { unsigned TX9D :1; unsigned TRMT :1; unsigned BRGH :1; unsigned :1; unsigned SYNC :1; unsigned TXEN :1; unsigned TX9 :1; unsigned CSRC :1; }; struct { unsigned TXD8 :1; unsigned :5; unsigned nTX8 :1; }; struct { unsigned :6; unsigned TX8_9 :1; }; } TXSTAbits_t; extern volatile TXSTAbits_t TXSTAbits @ 0x098; # 1574 extern volatile unsigned char SPBRG @ 0x099; asm("SPBRG equ 099h"); extern volatile unsigned char CMCON @ 0x09C; asm("CMCON equ 09Ch"); typedef union { struct { unsigned CM :3; unsigned CIS :1; unsigned C1INV :1; unsigned C2INV :1; unsigned C1OUT :1; unsigned C2OUT :1; }; struct { unsigned CM0 :1; unsigned CM1 :1; unsigned CM2 :1; }; } CMCONbits_t; extern volatile CMCONbits_t CMCONbits @ 0x09C; # 1649 extern volatile unsigned char CVRCON @ 0x09D; asm("CVRCON equ 09Dh"); typedef union { struct { unsigned CVR :4; unsigned :1; unsigned CVRR :1; unsigned CVROE :1; unsigned CVREN :1; }; struct { unsigned CVR0 :1; unsigned CVR1 :1; unsigned CVR2 :1; unsigned CVR3 :1; }; } CVRCONbits_t; extern volatile CVRCONbits_t CVRCONbits @ 0x09D; # 1713 extern volatile unsigned char WDTCON @ 0x105; asm("WDTCON equ 0105h"); typedef union { struct { unsigned SWDTEN :1; unsigned WDTPS :4; }; struct { unsigned SWDTE :1; unsigned WDTPS0 :1; unsigned WDTPS1 :1; unsigned WDTPS2 :1; unsigned WDTPS3 :1; }; } WDTCONbits_t; extern volatile WDTCONbits_t WDTCONbits @ 0x105; # 1770 extern volatile unsigned char EEDATA @ 0x10C; asm("EEDATA equ 010Ch"); extern volatile unsigned char EEADR @ 0x10D; asm("EEADR equ 010Dh"); extern volatile unsigned char EEDATH @ 0x10E; asm("EEDATH equ 010Eh"); extern volatile unsigned char EEADRH @ 0x10F; asm("EEADRH equ 010Fh"); extern volatile unsigned char EECON1 @ 0x18C; asm("EECON1 equ 018Ch"); typedef union { struct { unsigned RD :1; unsigned WR :1; unsigned WREN :1; unsigned WRERR :1; unsigned FREE :1; unsigned :2; unsigned EEPGD :1; }; } EECON1bits_t; extern volatile EECON1bits_t EECON1bits @ 0x18C; # 1844 extern volatile unsigned char EECON2 @ 0x18D; asm("EECON2 equ 018Dh"); # 1856 extern volatile __bit ADDEN @ (((unsigned) &RCSTA)*8) + 3; extern volatile __bit BF @ (((unsigned) &SSPSTAT)*8) + 0; extern volatile __bit BRGH @ (((unsigned) &TXSTA)*8) + 2; extern volatile __bit C1INV @ (((unsigned) &CMCON)*8) + 4; extern volatile __bit C1OUT @ (((unsigned) &CMCON)*8) + 6; extern volatile __bit C2INV @ (((unsigned) &CMCON)*8) + 5; extern volatile __bit C2OUT @ (((unsigned) &CMCON)*8) + 7; extern volatile __bit CARRY @ (((unsigned) &STATUS)*8) + 0; extern volatile __bit CCP1IE @ (((unsigned) &PIE1)*8) + 2; extern volatile __bit CCP1IF @ (((unsigned) &PIR1)*8) + 2; extern volatile __bit CCP1M0 @ (((unsigned) &CCP1CON)*8) + 0; extern volatile __bit CCP1M1 @ (((unsigned) &CCP1CON)*8) + 1; extern volatile __bit CCP1M2 @ (((unsigned) &CCP1CON)*8) + 2; extern volatile __bit CCP1M3 @ (((unsigned) &CCP1CON)*8) + 3; extern volatile __bit CCP1X @ (((unsigned) &CCP1CON)*8) + 5; extern volatile __bit CCP1Y @ (((unsigned) &CCP1CON)*8) + 4; extern volatile __bit CIS @ (((unsigned) &CMCON)*8) + 3; extern volatile __bit CKE @ (((unsigned) &SSPSTAT)*8) + 6; extern volatile __bit CKP @ (((unsigned) &SSPCON)*8) + 4; extern volatile __bit CM0 @ (((unsigned) &CMCON)*8) + 0; extern volatile __bit CM1 @ (((unsigned) &CMCON)*8) + 1; extern volatile __bit CM2 @ (((unsigned) &CMCON)*8) + 2; extern volatile __bit CMIE @ (((unsigned) &PIE2)*8) + 6; extern volatile __bit CMIF @ (((unsigned) &PIR2)*8) + 6; extern volatile __bit CREN @ (((unsigned) &RCSTA)*8) + 4; extern volatile __bit CSRC @ (((unsigned) &TXSTA)*8) + 7; extern volatile __bit CVR0 @ (((unsigned) &CVRCON)*8) + 0; extern volatile __bit CVR1 @ (((unsigned) &CVRCON)*8) + 1; extern volatile __bit CVR2 @ (((unsigned) &CVRCON)*8) + 2; extern volatile __bit CVR3 @ (((unsigned) &CVRCON)*8) + 3; extern volatile __bit CVREN @ (((unsigned) &CVRCON)*8) + 7; extern volatile __bit CVROE @ (((unsigned) &CVRCON)*8) + 6; extern volatile __bit CVRR @ (((unsigned) &CVRCON)*8) + 5; extern volatile __bit DATA_ADDRESS @ (((unsigned) &SSPSTAT)*8) + 5; extern volatile __bit DC @ (((unsigned) &STATUS)*8) + 1; extern volatile __bit D_A @ (((unsigned) &SSPSTAT)*8) + 5; extern volatile __bit D_nA @ (((unsigned) &SSPSTAT)*8) + 5; extern volatile __bit EEIE @ (((unsigned) &PIE2)*8) + 4; extern volatile __bit EEIF @ (((unsigned) &PIR2)*8) + 4; extern volatile __bit EEPGD @ (((unsigned) &EECON1)*8) + 7; extern volatile __bit FERR @ (((unsigned) &RCSTA)*8) + 2; extern volatile __bit FREE @ (((unsigned) &EECON1)*8) + 4; extern volatile __bit GIE @ (((unsigned) &INTCON)*8) + 7; extern volatile __bit I2C_DATA @ (((unsigned) &SSPSTAT)*8) + 5; extern volatile __bit I2C_READ @ (((unsigned) &SSPSTAT)*8) + 2; extern volatile __bit I2C_START @ (((unsigned) &SSPSTAT)*8) + 3; extern volatile __bit I2C_STOP @ (((unsigned) &SSPSTAT)*8) + 4; extern volatile __bit INT0IE @ (((unsigned) &INTCON)*8) + 4; extern volatile __bit INT0IF @ (((unsigned) &INTCON)*8) + 1; extern volatile __bit INTE @ (((unsigned) &INTCON)*8) + 4; extern volatile __bit INTEDG @ (((unsigned) &OPTION_REG)*8) + 6; extern volatile __bit INTF @ (((unsigned) &INTCON)*8) + 1; extern volatile __bit IOFS @ (((unsigned) &OSCCON)*8) + 2; extern volatile __bit IRCF0 @ (((unsigned) &OSCCON)*8) + 4; extern volatile __bit IRCF1 @ (((unsigned) &OSCCON)*8) + 5; extern volatile __bit IRCF2 @ (((unsigned) &OSCCON)*8) + 6; extern volatile __bit IRP @ (((unsigned) &STATUS)*8) + 7; extern volatile __bit OERR @ (((unsigned) &RCSTA)*8) + 1; extern volatile __bit OSFIE @ (((unsigned) &PIE2)*8) + 7; extern volatile __bit OSFIF @ (((unsigned) &PIR2)*8) + 7; extern volatile __bit OSTS @ (((unsigned) &OSCCON)*8) + 3; extern volatile __bit PEIE @ (((unsigned) &INTCON)*8) + 6; extern volatile __bit PS0 @ (((unsigned) &OPTION_REG)*8) + 0; extern volatile __bit PS1 @ (((unsigned) &OPTION_REG)*8) + 1; extern volatile __bit PS2 @ (((unsigned) &OPTION_REG)*8) + 2; extern volatile __bit PSA @ (((unsigned) &OPTION_REG)*8) + 3; extern volatile __bit RA0 @ (((unsigned) &PORTA)*8) + 0; extern volatile __bit RA1 @ (((unsigned) &PORTA)*8) + 1; extern volatile __bit RA2 @ (((unsigned) &PORTA)*8) + 2; extern volatile __bit RA3 @ (((unsigned) &PORTA)*8) + 3; extern volatile __bit RA4 @ (((unsigned) &PORTA)*8) + 4; extern volatile __bit RA5 @ (((unsigned) &PORTA)*8) + 5; extern volatile __bit RA6 @ (((unsigned) &PORTA)*8) + 6; extern volatile __bit RA7 @ (((unsigned) &PORTA)*8) + 7; extern volatile __bit RB0 @ (((unsigned) &PORTB)*8) + 0; extern volatile __bit RB1 @ (((unsigned) &PORTB)*8) + 1; extern volatile __bit RB2 @ (((unsigned) &PORTB)*8) + 2; extern volatile __bit RB3 @ (((unsigned) &PORTB)*8) + 3; extern volatile __bit RB4 @ (((unsigned) &PORTB)*8) + 4; extern volatile __bit RB5 @ (((unsigned) &PORTB)*8) + 5; extern volatile __bit RB6 @ (((unsigned) &PORTB)*8) + 6; extern volatile __bit RB7 @ (((unsigned) &PORTB)*8) + 7; extern volatile __bit RBIE @ (((unsigned) &INTCON)*8) + 3; extern volatile __bit RBIF @ (((unsigned) &INTCON)*8) + 0; extern volatile __bit RC8_9 @ (((unsigned) &RCSTA)*8) + 6; extern volatile __bit RC9 @ (((unsigned) &RCSTA)*8) + 6; extern volatile __bit RCD8 @ (((unsigned) &RCSTA)*8) + 0; extern volatile __bit RCIE @ (((unsigned) &PIE1)*8) + 5; extern volatile __bit RCIF @ (((unsigned) &PIR1)*8) + 5; extern volatile __bit RD @ (((unsigned) &EECON1)*8) + 0; extern volatile __bit READ_WRITE @ (((unsigned) &SSPSTAT)*8) + 2; extern volatile __bit RP0 @ (((unsigned) &STATUS)*8) + 5; extern volatile __bit RP1 @ (((unsigned) &STATUS)*8) + 6; extern volatile __bit RX9 @ (((unsigned) &RCSTA)*8) + 6; extern volatile __bit RX9D @ (((unsigned) &RCSTA)*8) + 0; extern volatile __bit R_W @ (((unsigned) &SSPSTAT)*8) + 2; extern volatile __bit R_nW @ (((unsigned) &SSPSTAT)*8) + 2; extern volatile __bit SCS0 @ (((unsigned) &OSCCON)*8) + 0; extern volatile __bit SCS1 @ (((unsigned) &OSCCON)*8) + 1; extern volatile __bit SMP @ (((unsigned) &SSPSTAT)*8) + 7; extern volatile __bit SPEN @ (((unsigned) &RCSTA)*8) + 7; extern volatile __bit SREN @ (((unsigned) &RCSTA)*8) + 5; extern volatile __bit SSPEN @ (((unsigned) &SSPCON)*8) + 5; extern volatile __bit SSPIE @ (((unsigned) &PIE1)*8) + 3; extern volatile __bit SSPIF @ (((unsigned) &PIR1)*8) + 3; extern volatile __bit SSPM0 @ (((unsigned) &SSPCON)*8) + 0; extern volatile __bit SSPM1 @ (((unsigned) &SSPCON)*8) + 1; extern volatile __bit SSPM2 @ (((unsigned) &SSPCON)*8) + 2; extern volatile __bit SSPM3 @ (((unsigned) &SSPCON)*8) + 3; extern volatile __bit SSPOV @ (((unsigned) &SSPCON)*8) + 6; extern volatile __bit SWDTE @ (((unsigned) &WDTCON)*8) + 0; extern volatile __bit SWDTEN @ (((unsigned) &WDTCON)*8) + 0; extern volatile __bit SYNC @ (((unsigned) &TXSTA)*8) + 4; extern volatile __bit T0CS @ (((unsigned) &OPTION_REG)*8) + 5; extern volatile __bit T0SE @ (((unsigned) &OPTION_REG)*8) + 4; extern volatile __bit T1CKPS0 @ (((unsigned) &T1CON)*8) + 4; extern volatile __bit T1CKPS1 @ (((unsigned) &T1CON)*8) + 5; extern volatile __bit T1INSYNC @ (((unsigned) &T1CON)*8) + 2; extern volatile __bit T1OSCEN @ (((unsigned) &T1CON)*8) + 3; extern volatile __bit T1RUN @ (((unsigned) &T1CON)*8) + 6; extern volatile __bit T2CKPS0 @ (((unsigned) &T2CON)*8) + 0; extern volatile __bit T2CKPS1 @ (((unsigned) &T2CON)*8) + 1; extern volatile __bit TMR0IE @ (((unsigned) &INTCON)*8) + 5; extern volatile __bit TMR0IF @ (((unsigned) &INTCON)*8) + 2; extern volatile __bit TMR1CS @ (((unsigned) &T1CON)*8) + 1; extern volatile __bit TMR1IE @ (((unsigned) &PIE1)*8) + 0; extern volatile __bit TMR1IF @ (((unsigned) &PIR1)*8) + 0; extern volatile __bit TMR1ON @ (((unsigned) &T1CON)*8) + 0; extern volatile __bit TMR2IE @ (((unsigned) &PIE1)*8) + 1; extern volatile __bit TMR2IF @ (((unsigned) &PIR1)*8) + 1; extern volatile __bit TMR2ON @ (((unsigned) &T2CON)*8) + 2; extern volatile __bit TOUTPS0 @ (((unsigned) &T2CON)*8) + 3; extern volatile __bit TOUTPS1 @ (((unsigned) &T2CON)*8) + 4; extern volatile __bit TOUTPS2 @ (((unsigned) &T2CON)*8) + 5; extern volatile __bit TOUTPS3 @ (((unsigned) &T2CON)*8) + 6; extern volatile __bit TRISA0 @ (((unsigned) &TRISA)*8) + 0; extern volatile __bit TRISA1 @ (((unsigned) &TRISA)*8) + 1; extern volatile __bit TRISA2 @ (((unsigned) &TRISA)*8) + 2; extern volatile __bit TRISA3 @ (((unsigned) &TRISA)*8) + 3; extern volatile __bit TRISA4 @ (((unsigned) &TRISA)*8) + 4; extern volatile __bit TRISA5 @ (((unsigned) &TRISA)*8) + 5; extern volatile __bit TRISA6 @ (((unsigned) &TRISA)*8) + 6; extern volatile __bit TRISA7 @ (((unsigned) &TRISA)*8) + 7; extern volatile __bit TRISB0 @ (((unsigned) &TRISB)*8) + 0; extern volatile __bit TRISB1 @ (((unsigned) &TRISB)*8) + 1; extern volatile __bit TRISB2 @ (((unsigned) &TRISB)*8) + 2; extern volatile __bit TRISB3 @ (((unsigned) &TRISB)*8) + 3; extern volatile __bit TRISB4 @ (((unsigned) &TRISB)*8) + 4; extern volatile __bit TRISB5 @ (((unsigned) &TRISB)*8) + 5; extern volatile __bit TRISB6 @ (((unsigned) &TRISB)*8) + 6; extern volatile __bit TRISB7 @ (((unsigned) &TRISB)*8) + 7; extern volatile __bit TRMT @ (((unsigned) &TXSTA)*8) + 1; extern volatile __bit TUN0 @ (((unsigned) &OSCTUNE)*8) + 0; extern volatile __bit TUN1 @ (((unsigned) &OSCTUNE)*8) + 1; extern volatile __bit TUN2 @ (((unsigned) &OSCTUNE)*8) + 2; extern volatile __bit TUN3 @ (((unsigned) &OSCTUNE)*8) + 3; extern volatile __bit TUN4 @ (((unsigned) &OSCTUNE)*8) + 4; extern volatile __bit TUN5 @ (((unsigned) &OSCTUNE)*8) + 5; extern volatile __bit TX8_9 @ (((unsigned) &TXSTA)*8) + 6; extern volatile __bit TX9 @ (((unsigned) &TXSTA)*8) + 6; extern volatile __bit TX9D @ (((unsigned) &TXSTA)*8) + 0; extern volatile __bit TXD8 @ (((unsigned) &TXSTA)*8) + 0; extern volatile __bit TXEN @ (((unsigned) &TXSTA)*8) + 5; extern volatile __bit TXIE @ (((unsigned) &PIE1)*8) + 4; extern volatile __bit TXIF @ (((unsigned) &PIR1)*8) + 4; extern volatile __bit UA @ (((unsigned) &SSPSTAT)*8) + 1; extern volatile __bit WCOL @ (((unsigned) &SSPCON)*8) + 7; extern volatile __bit WDTPS0 @ (((unsigned) &WDTCON)*8) + 1; extern volatile __bit WDTPS1 @ (((unsigned) &WDTCON)*8) + 2; extern volatile __bit WDTPS2 @ (((unsigned) &WDTCON)*8) + 3; extern volatile __bit WDTPS3 @ (((unsigned) &WDTCON)*8) + 4; extern volatile __bit WR @ (((unsigned) &EECON1)*8) + 1; extern volatile __bit WREN @ (((unsigned) &EECON1)*8) + 2; extern volatile __bit WRERR @ (((unsigned) &EECON1)*8) + 3; extern volatile __bit ZERO @ (((unsigned) &STATUS)*8) + 2; extern volatile __bit nA @ (((unsigned) &SSPSTAT)*8) + 5; extern volatile __bit nADDRESS @ (((unsigned) &SSPSTAT)*8) + 5; extern volatile __bit nBO @ (((unsigned) &PCON)*8) + 0; extern volatile __bit nBOR @ (((unsigned) &PCON)*8) + 0; extern volatile __bit nPD @ (((unsigned) &STATUS)*8) + 3; extern volatile __bit nPOR @ (((unsigned) &PCON)*8) + 1; extern volatile __bit nRBPU @ (((unsigned) &OPTION_REG)*8) + 7; extern volatile __bit nRC8 @ (((unsigned) &RCSTA)*8) + 6; extern volatile __bit nT1SYNC @ (((unsigned) &T1CON)*8) + 2; extern volatile __bit nTO @ (((unsigned) &STATUS)*8) + 4; extern volatile __bit nTX8 @ (((unsigned) &TXSTA)*8) + 6; extern volatile __bit nW @ (((unsigned) &SSPSTAT)*8) + 2; extern volatile __bit nWRITE @ (((unsigned) &SSPSTAT)*8) + 2; # 26 "C:\Program Files (x86)\Microchip\xc8\v1.34\include\htc.h" extern const char __xc8_OPTIM_SPEED; # 13 "C:\Program Files (x86)\Microchip\xc8\v1.34\include\xc8debug.h" #pragma intrinsic(__builtin_software_breakpoint) extern void __builtin_software_breakpoint(void); # 27 "C:\Program Files (x86)\Microchip\xc8\v1.34\include\pic.h" #pragma intrinsic(__nop) extern void __nop(void); # 76 extern unsigned int flash_read(unsigned short addr); # 41 "C:\Program Files (x86)\Microchip\xc8\v1.34\include\eeprom_routines.h" extern void eeprom_write(unsigned char addr, unsigned char value); extern unsigned char eeprom_read(unsigned char addr); extern void eecpymem(volatile unsigned char *to, __eeprom unsigned char *from, unsigned char size); extern void memcpyee(__eeprom unsigned char *to, const unsigned char *from, unsigned char size); # 149 "C:\Program Files (x86)\Microchip\xc8\v1.34\include\pic.h" #pragma intrinsic(_delay) extern __nonreentrant void _delay(unsigned long); # 184 extern unsigned char __resetbits; extern __bit __powerdown; extern __bit __timeout; # 42 "main_feux_wc.c" void init_oscillator(void); # 58 int main(void) { init_oscillator(); TRISA=0x00; TRISB=0xFF; # 70 PORTA=0x00; PORTB=0x00; int nb_sec=0; while(1) { if(PORTBbits.RB1==0){ _delay((unsigned long)((10)*(8000000/4000.0))); if(PORTBbits.RB1==0){ PORTAbits.RA0 = 0; PORTAbits.RA1 = 1; PORTAbits.RA2 = 0; for(nb_sec=5;nb_sec>0;nb_sec--) _delay((unsigned long)((1000)*(8000000/4000.0))); PORTAbits.RA0 = 1; PORTAbits.RA1 = 0; PORTAbits.RA2 = 0; } } if(PORTBbits.RB2==0){ _delay((unsigned long)((10)*(8000000/4000.0))); if(PORTBbits.RB2==0){ PORTAbits.RA0 = 0; PORTAbits.RA1 = 1; PORTAbits.RA2 = 0; for(nb_sec=5;nb_sec>0;nb_sec--) _delay((unsigned long)((1000)*(8000000/4000.0))); PORTAbits.RA0 = 0; PORTAbits.RA1 = 0; PORTAbits.RA2 = 1; } } if(PORTBbits.RB3==0){ _delay((unsigned long)((10)*(8000000/4000.0))); if(PORTBbits.RB3==0){ PORTAbits.RA0 = 0; PORTAbits.RA1 = 1; PORTAbits.RA2 = 0; for(nb_sec=60;nb_sec>0;nb_sec--) _delay((unsigned long)((1000)*(8000000/4000.0))); PORTAbits.RA0 = 0; PORTAbits.RA1 = 0; PORTAbits.RA2 = 1; } } # 107 } return 0; } void init_oscillator(void){ OSCCONbits.IRCF = 0b111; OSCCONbits.SCS = 0b00; OSCCONbits.IOFS = 1; }