Hello, after creating the model in the icd and boot loader.
All right. the boot loader works well but fails to connect icd always fails. Time out ..
This is the code I have for the test.
#CONFIG
CONFIG FOSC = HSHP ; Internal oscillator block
CONFIG PLLCFG = ON ; Oscillator used directly
CONFIG PRICLKEN = ON
CONFIG FCMEN = ON ; Fail-Safe Clock Monitor disabled
CONFIG IESO = OFF ; Oscillator Switchover mode disabled
CONFIG PWRTEN = ON ; Power up timer disabled
CONFIG BOREN = SBORDIS ; Brown-out Reset enabled in hardware only (SBOREN is disabled)
CONFIG BORV = 190 ; VBOR set to 1.90 V nominal
CONFIG WDTEN = OFF ; WDT is always enabled. SWDTEN bit has no effect
CONFIG WDTPS = 32768 ; 1:32768
CONFIG CCP2MX = PORTC1 ; CCP2 input/output is multiplexed with RC1
CONFIG PBADEN = OFF ; PORTB<5:0> pins are configured as digital I/O on Reset
CONFIG CCP3MX = PORTB5 ; P3A/CCP3 input/output is multiplexed with RB5
CONFIG HFOFST = ON ; HFINTOSC output and ready status are not delayed by the oscillator stable status
CONFIG T3CMX = PORTC0 ; T3CKI is on RC0
CONFIG P2BMX = PORTB5 ; P2B is on RB5
CONFIG MCLRE = EXTMCLR ; MCLR pin enabled, RE3 input pin disabled
CONFIG STVREN = ON ; Stack full/underflow will cause Reset
CONFIG LVP = OFF ; Single-Supply ICSP disabled
CONFIG XINST = OFF ; Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
CONFIG DEBUG = OFF ; Disabled
#ENDCONFIG
'DEFINES-----------------------------------------------------------------
DEFINE OSC 20
DEFINE LOADER_USED 1
ADCON0.0 = 0 'Disable ADC
ANSELA = 0
ANSELB = 0
ANSELC = 0
CM1CON0.7 = 0 'Disable comparator1
CM2CON0.7 = 0 'Disable comparator2
TRISA=%00100000
TRISB=%10000000
TRISC=%10011111
'------------------------------------------------------------------------------
'PROCESO PRINCIPAL-------------------------------------------------------------
PROCESOPRINCIPAL:
GOTO PROCESOPRINCIPAL
END
'-------------------------------------------------------------
'------------------------------------------------------------------------------
Any ideas?
Thank you
Fran
All right. the boot loader works well but fails to connect icd always fails. Time out ..
This is the code I have for the test.
#CONFIG
CONFIG FOSC = HSHP ; Internal oscillator block
CONFIG PLLCFG = ON ; Oscillator used directly
CONFIG PRICLKEN = ON
CONFIG FCMEN = ON ; Fail-Safe Clock Monitor disabled
CONFIG IESO = OFF ; Oscillator Switchover mode disabled
CONFIG PWRTEN = ON ; Power up timer disabled
CONFIG BOREN = SBORDIS ; Brown-out Reset enabled in hardware only (SBOREN is disabled)
CONFIG BORV = 190 ; VBOR set to 1.90 V nominal
CONFIG WDTEN = OFF ; WDT is always enabled. SWDTEN bit has no effect
CONFIG WDTPS = 32768 ; 1:32768
CONFIG CCP2MX = PORTC1 ; CCP2 input/output is multiplexed with RC1
CONFIG PBADEN = OFF ; PORTB<5:0> pins are configured as digital I/O on Reset
CONFIG CCP3MX = PORTB5 ; P3A/CCP3 input/output is multiplexed with RB5
CONFIG HFOFST = ON ; HFINTOSC output and ready status are not delayed by the oscillator stable status
CONFIG T3CMX = PORTC0 ; T3CKI is on RC0
CONFIG P2BMX = PORTB5 ; P2B is on RB5
CONFIG MCLRE = EXTMCLR ; MCLR pin enabled, RE3 input pin disabled
CONFIG STVREN = ON ; Stack full/underflow will cause Reset
CONFIG LVP = OFF ; Single-Supply ICSP disabled
CONFIG XINST = OFF ; Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
CONFIG DEBUG = OFF ; Disabled
#ENDCONFIG
'DEFINES-----------------------------------------------------------------
DEFINE OSC 20
DEFINE LOADER_USED 1
ADCON0.0 = 0 'Disable ADC
ANSELA = 0
ANSELB = 0
ANSELC = 0
CM1CON0.7 = 0 'Disable comparator1
CM2CON0.7 = 0 'Disable comparator2
TRISA=%00100000
TRISB=%10000000
TRISC=%10011111
'------------------------------------------------------------------------------
'PROCESO PRINCIPAL-------------------------------------------------------------
PROCESOPRINCIPAL:
GOTO PROCESOPRINCIPAL
END
'-------------------------------------------------------------
'------------------------------------------------------------------------------
Any ideas?
Thank you
Fran
Comment