It's been a while since I programmed in PicBasic. I would like to get back into it. But I am struggling with the simplest of task.....blinking an LED. Spent 3 hours trying to figure out what I am missing. Maybe someone can show this old newbie what I am missing.
Code:' PIC18F24K50 Configuration Bit Settings #config CONFIG FOSC=INTOSCIO CONFIG PLLSEL=PLL3X CONFIG CFGPLLEN=ON CONFIG CPUDIV=NOCLKDIV CONFIG LS48MHZ=SYS48X8 CONFIG IESO=OFF CONFIG FCMEN=ON CONFIG PCLKEN=ON CONFIG BOREN=OFF CONFIG nPWRTEN=OFF CONFIG nLPBOR=OFF CONFIG BORV=220 CONFIG WDTPS=32768 CONFIG WDTEN=OFF CONFIG MCLRE=OFF CONFIG SDOMX=RC7 CONFIG T3CMX=RC0 CONFIG DEBUG=OFF CONFIG STVREN=ON CONFIG ICPRT=OFF CONFIG XINST=OFF CONFIG LVP=OFF #ENDCONFIG DEFINE OSC 48 OSCTUNE = %10000000 '3X PLL ratio mode selected OSCCON = %01110000 'Switch to 16MHz HFINTOSC OSCCON2 = %00010000 'Enable PLL '*********************** PORT CONFIG **************************** TRISA = 0 'porta direction 0=OUTPUT 1=INPUT PORTA = 0 'porta preset ANSELA = 0 '**************************************************************** '******************* MAIN PROGRAM ************************ '**************************************************************** while 1 low PORTA.5 PAUSE 500 high PORTA.5 pause 500 WEND end![]()





Bookmarks