I added the port configuration and acon register configs. That has an effect...
The bootloader never leaves the bootloader mode to run the user app.
if I comment out the Hardware configuration section and compile I can load the code via the bootloader, the device disappears from the USB list and then ~10seconds later I get the USB device not recognized.
I have reloaded the led test program just to make sure the bootloader and chip are still working and they are. Very puzzling, but the registers do seem to have an effect.
Nothing in the DT_INT writes to EEPROM 0x00? If there is a 5A there then the bootloader thinks its still in boot mode.
Still puzzled...Code:LED1 VAR PORTB.0 DEFINE OSC 20 DEFINE RESET_ORG 0x800 INCLUDE "DT_INTS-18.bas" ' Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ' Include if using PBP interrupts ' Hardware configuration ' ====================== ' ' I/O and PORTs ' ------------- PORTB = 0 PORTC = 0 PORTD = 0 PORTE = 0 TRISB = %00000000 '<2-1> Inputs TRISC = 0 TRISA = 0 TRISD = 0 TRISE = 0 ' ' A/D converter ' ------------- ADCON0 = %00000000 ' A/D converter off ADCON1 = %00001111 ' All Digital Inputs ' ADCON2 = %00000000 ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON = $31 ; Prescaler = 8, TMR1ON @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts Main: Pause 10 GOTO Main '---[TMR1 - interrupt handler]-------------------------------------------------- ToggleLED1: TOGGLE LED1 @ INT_RETURN
Bookmarks