Serial Bootloader for a PIC18F14K22 chip Written by VegiPete picprog.strongedge.net Hardware: Internal RC OSC with 4x PLL enabled (Fosc = 64MHz) RB4 - !CTS flow control output - outputs low when PIC is ready to receive RB5 - RX - Serial in RB7 - TX - Serial out RC5 - LED Resources Used: Serial Port, configured for 38400 baud, 8N1, hardware handshaking CONFIGURATION WORD SETUP: ;Setup CONFIG1H CONFIG FOSC = IRC, PLLEN = ON, PCLKEN = OFF, FCMEN = OFF, IESO = OFF ;Setup CONFIG2L CONFIG PWRTEN = ON, BOREN = OFF, BORV = 30 ;Setup CONFIG2H CONFIG WDTEN = OFF, WDTPS = 1 ;Setup CONFIG3H CONFIG MCLRE = ON, HFOFST = OFF ;Setup CONFIG4L CONFIG STVREN = OFF, LVP = OFF, BBSIZ = OFF, XINST = OFF ;Setup CONFIG5L CONFIG CP0 = OFF, CP1 = OFF ;Setup CONFIG5H CONFIG CPB = OFF, CPD = OFF ;Setup CONFIG6L CONFIG WRT0 = OFF, WRT1 = OFF ;Setup CONFIG6H CONFIG WRTB = OFF, WRTC = OFF, WRTD = OFF ;Setup CONFIG7L CONFIG EBTR0 = OFF, EBTR1 = OFF ;Setup CONFIG7H CONFIG EBTRB = OFF The User program must start with the following instructions: ORG 0x0000 ; Reset vector start address 0 goto UserProg ; Start of user program - changed by bootloader goto UserProg ; Start of user program The bootloader occupies flash memory locations 0x3B00 to 0x3FFF. Ensure that the user program does not use any of these locations.