![]() have tried other interrupt simple programs thinking Gooligum is issue but same result Thanks. edited program for Gooligum comments to shorten reading. taking lesson on C from Gooligum and using PIC12F1501, MPLX v5.20, XC8 v2.05, pickit3I I included error statement. INTCONbits.TMR0IF = 0 // clear interrupt flag Flashes LED at ~0.95 Hz by toggling on each interrupt OPTION_REGbits.PS = 0b111 // prescale = 256 INTCONbits.TMR0IE = 1 // enable Timer0 interrupt OPTION_REGbits.PSA = 0 // assign prescaler to Timer0 OPTION_REGbits.TMR0CS = 0 // select timer mode OSCCONbits.IRCF = 0b0111 // internal oscillator = 500 kHz OSCCONbits.SCS1 = 1 // select internal clock TRISA = 0b111110 // configure RA0 (only) as an output ![]() LATA = 0 // start with all output pins low (LED off) #pragma config STVREN = ON, LVP = OFF #define F_LED LATAbits.LATA0 // flashing LED #pragma config PWRTE = OFF, CP = OFF, WRT = OFF #pragma config BOREN = ON, BORV = LO, LPBOR = OFF just frustrated newbie Just simple program to blink a damn LED !!! #include #pragma config MCLRE = ON, FOSC = INTOSC, CLKOUTEN = OFF, WDTE = OFF and don't understand error message ANY suggestions would surely be appreciated. simple program complies but error as below: Interrupts/EC_L5_1a-Flash_LED-50p-int.c:86:6: error: variable has incomplete type 'void Tried several pic mcu's, several example programs and always same result. Interrupt error:variable has incomplete type voidīeginner using PIC 12F1501. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |