You can't just comment out default values. You must assign them something, somewhere, no?Originally Posted by mister_e
Nope.Do you still use the Bootloader?
Nope.Did you also use the DEFINE OSC 20?
This is my latest code, same acceleration problem:How about your current one?
'define LOADER_USED 1
LED1 VAR PortD.1
START: HIGH LED1
PAUSE 1000
LOW LED1
PAUSE 1000
GOTO START
Finish: end
And these are the configuration bits used:
; 96MHz PLL Prescaler:
CONFIG PLLDIV = 5 ;Divide by 5 (20MHz input)
; CPU System Clock Postscaler:
CONFIG CPUDIV = OSC1_PLL2 ;[OSC1/OSC2 Src: /1][96MHz PLL Src: /2]
; Full-Speed USB Clock Source Selection:
CONFIG USBDIV = 1 ;Clock source from OSC1/OSC2
; Oscillator Selection bits:
CONFIG FOSC = HS ;HS oscillator, HS used by USB
; Fail Safe Clock Monitor:
CONFIG FCMEM = OFF ;Disabled
; Internal/External Switch Over:
CONFIG IESO = OFF ;Disabled
; Power Up Timer:
CONFIG PWRT = ON ;Enabled
; Brown Out Reset:
CONFIG BOR = ON ;Enabled, SBOREN bit is disabled
; Brown Out Voltage:
CONFIG BORV = 21 ;2.1V
; USB Voltage Regulator Enable:
CONFIG VREGEN = OFF ;Disabled
; Watchdog Timer:
CONFIG WDT = OFF ;HW Disabled - SW Controlled
; Watchdog Postscaler:
CONFIG WDTPS = 32768 ;1:32768
; MCLR Enable:
CONFIG MCLRE = ON ;Enabled
; Low Power Timer1 Oscillator Enable:
CONFIG LPT1OSC = OFF ;Timer1 oscillator configured for high power
; Port B A/D Enable:
CONFIG PBADEN = OFF ;PortB<4:0> pins are configured as digital I/O on RESET
; CCP2 Mux bit:
CONFIG CCP2MX = ON ;CCP2 input/output is multiplexed with RC1
; Stack Overflow Reset:
CONFIG STVREN = ON ;Enabled
; Low Voltage ICSP:
CONFIG LVP = OFF ;Disabled
; Dedicated In-Circuit Debug/Programming Enable:
CONFIG ICPRT = OFF ;Disabled
; Extended Instruction Set Enable:
CONFIG XINST = OFF ;Disabled
; Background Debugger Enable:
CONFIG DEBUG = OFF ;Disabled
; Code Protection Block 0:
CONFIG CP0 = OFF ;Disabled
; Code Protection Block 1:
CONFIG CP1 = OFF ;Disabled
; Code Protection Block 2:
CONFIG CP2 = OFF ;Disabled
; Code Protection Block 3:
CONFIG CP3 = OFF ;Disabled
; Boot Block Code Protection:
CONFIG CPB = OFF ;Disabled
; Data EEPROM Code Protection:
CONFIG CPD = OFF ;Disabled
; Write Protection Block 0:
CONFIG WRT0 = OFF ;Disabled
; Write Protection Block 1:
CONFIG WRT1 = OFF ;Disabled
; Write Protection Block 2:
CONFIG WRT2 = OFF ;Disabled
; Write Protection Block 3:
CONFIG WRT3 = OFF ;Disabled
; Boot Block Write Protection:
CONFIG WRTB = OFF ;Disabled
; Configuration Register Write Protection:
CONFIG WRTC = OFF ;Disabled
; Data EEPROM Write Protection:
CONFIG WRTD = OFF ;Disabled
; Table Read Protection Block 0:
CONFIG EBTR0 = OFF ;Disabled
; Table Read Protection Block 1:
CONFIG EBTR1 = OFF ;Disabled
; Table Read Protection Block 2:
CONFIG EBTR2 = OFF ;Disabled
; Table Read Protection Block 3:
CONFIG EBTR3 = OFF ;Disabled
; Boot Block Table Read Protection:
CONFIG EBTRB = OFF ;Disabled
I'm programming the chip via the MeLabs serial programmer.
Robert
![]()
Bookmarks