what about if you place the following lines at the top of your code
Be sure you correctly disable analog or multiplexed stuff on the I/O you're using for your LED.Code:@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H ' Oscillator switch OFF ' Use HS oscillator (20MHZ here) ' @ __CONFIG _CONFIG2L, _BOR_ON_2L & _PWRT_ON_2L & _BORV_45_2L ' Brown out reset ON @ 4.5Volts ' Power-up timer ON ' @ __CONFIG _CONFIG2H, _WDT_ON_2H ' Watch dog timer ON ' @ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L ' Stack over/underflow ON ' Low Voltage programming OFF ' Background debugger OFF DEFINE OSC 20




Bookmarks