Since your just testing this to begin with, I would leave out the oscon, let it run at whatever it wants. also swap location of the first tris and porta statement, and instead of using HIgh and Low, actually assign a value. see modified code below
Also you replace the HERE loop with this codeCode:#CONFIG _CONFIG _CONFIG1, _CLKOUTEN_OFF & _FOSC_INTOSC & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _BOREN_ON & _IESO_OFF & _FCMEN_OFF _CONFIG _CONFIG2, _PLLEN_OFF & _LVP_OFF & _STVREN_ON & _BORV_19 #ENDCONFIG TRISA = 0 ' all outputs PORTA = 0 ' LED Off ANSELA = 0 ' all digital Here: PORTA.1 = 1 PAUSE 500 PORTA.1 = 0 PAUSE 500 GOTO Here END
you might want to make sure your led is actually hooked to PIN PORTA.1 and not PORTA.0, I have made this mistake in coding many times.Code:Here: Toggle PORTA.1 Pause 500 Goto Here:




Bookmarks