PIC 16F18877
Any idea why it seems to reset unless I have a PAUSE 1 in Mainloop?Code:#CONFIG __config _CONFIG1, _FEXTOSC_OFF & _RSTOSC_HFINT32 & _CLKOUTEN_OFF & _CSWEN_OFF & _FCMEN_ON __config _CONFIG2, _MCLRE_ON & _PWRTE_OFF & _LPBOREN_OFF & _BOREN_ON & _BORV_LO & _ZCD_OFF & _PPS1WAY_OFF & _STVREN_ON & _DEBUG_OFF __config _CONFIG3, _WDTCPS_WDTCPS_11 & _WDTE_ON & _WDTCWS_WDTCWS_7 & _WDTCCS_LFINTOSC __config _CONFIG4, _WRT_OFF & _SCANE_available & _LVP_OFF __config _CONFIG5, _CP_OFF & _CPD_OFF #ENDCONFIG DEFINE OSC 32 ANSELA = %00000000 ANSELB = %00000000 ANSELC = %00000000 ANSELD = %00000000 ANSELE = %00000000 TRISA = %00000000 TRISB = %00000000 TRISC = %00000000 TRISD = %00000000 TRISE = %00001000 LEDblink var PORTD.0 PAUSE 200 LEDblink = 0 Mainloop: LEDblink = 1 ' PAUSE 1 LEDblink = 0 ' PAUSE 1 GOTO Mainloop end
The trace is on LEDblink pin.
I had this PIC working a while ago. I don't see what I'm missing.![]()




Bookmarks