Hi Mike,
I tried getting your code going with internal oscillator, and had the same results at you. It would work without using ICD, but I got a communication error after I compiled for ICD. Then I tried a 20 mhz oscillator, and it did work. I modified the configs for the 20 mhz crystal. I then tried it using MCLoader bootloader, and it works as well.
Code:
asm
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__CONFIG _CONFIG1H, _FOSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOR_ON_2L & _BORV_3_2L & _VREGEN_ON_2L
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _CCP2MX_ON_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
endasm
INCLUDE "modedefs.bas"
include "ALLDIGITAL.pbp"
DEFINE LOADER_USED 1
'OSCCON =$60 'clock speed
'
DEFINE OSC 20
LED VAR PORTB.0' Assign name "LED" to PORTB.0
mainloop:
High LED ' Turn on LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Low LED ' Turn off LED connected to PORTB.0
Pause 500 ' Delay for .5 seconds
Goto mainloop ' Go back to loop and blink LED forever
End
Bookmarks