Code on 16F877:
Code:
#CONFIG
__config _HS_OSC & _WDT_OFF & _WRT_OFF & _BOREN_ON & _LVP_OFF & _CPD_OFF & _PWRTE_ON & _DEBUG_OFF
#ENDCONFIG
DEFINE OSC 20
INCLUDE "ALLDIGITAL.pbp" ; Set all pins as digital
TRISD = %00000000
PORTD = %00000000
PAUSE 1000
START: PORTD = %10101010
PAUSE 1000
PORTD = %01010101
PAUSE 1000
GOTO START
Finish: end
Code on 18F4550:
Code:
#CONFIG
CONFIG PLLDIV=5, CPUDIV=OSC1_PLL2, USBDIV=2, FOSC=HSPLL_HS
CONFIG PWRT=ON, BOR=ON, BORV=1, VREGEN=ON, WDT=OFF
CONFIG CCP2MX=ON, PBADEN=OFF, LPT1OSC=OFF, MCLRE=ON
CONFIG STVREN=ON, LVP=OFF, ICPRT=OFF, XINST=OFF
#ENDCONFIG
DEFINE OSC 48
INCLUDE "ALLDIGITAL.pbp" ; Set all pins as digital
TRISD = %00000000
PORTD = %00000000
PAUSE 1000
START: PORTD = %10101010
PAUSE 1000
PORTD = %01010101
PAUSE 1000
GOTO START
Finish: end
Close-up of jumpers on Lab-X1:

Lab-X1 oscillator jumpers:

The only difference between the 2 MCUs are the CONFIG and DEFINE OSC statements.
I'm at a loss to explain what I'm doing wrong here. Whatever I'm doing wrong, I've been doing it for a very long time.
Robert
I can't see the forest with all those trees standing in the way.
Bookmarks