USB PIC Bootloader

USB PIC Bootloader is a resident bootloader for PIC18 series of Enhanced Flash USB Microcontrollers. It allows you to program application hex into the chip using the standard USB connectivity of your device.

 Bootloader kit

USB PIC Bootloader code is write-protected and cannot be overwritten by firmware.

Firmware update or user mode is selected by SW and/or HW switch.

USB PIC Bootloader is a program that stays in the first 8191 bytes of the program memory of the Microchip PIC Microcontroller. Bootloader runs at the boot time (when the processor has just been reset) and is capable of loading a complete application program into a processors memory. With the USB PIC Bootloader loaded, there are two distinct modes of operation:

firmware update mode and Application mode.

USB PIC Bootloader uses the EEPROM mark and/or hardware switch to determine which mode to run in.

Firmware Update Mode.

In firmware update mode USB PIC Bootloader utilizes USB connection of Microchip PIC Microcontroller to communicate with PC and load the new application code. Once the programming is done, the USB PIC Bootloader switches to Application mode, the processor is reset and begins running the newly loaded code.

Application mode.

In Application mode USB PIC Bootloader simply remap reset and interrupt vectors to user mode firmware application.


1. Easy connect to Laptop as well as Desktop PCs through USB Port to downloading your hex file

2. Built-in MAX232 interface circuit for easy communication with a computer and other serial devices (GPS modules, GSM Modems, etc).

3. On board Buzzer.

4. Comes with two BC547which can be used to drive relays.

5. On board 16x2 LCD with brightness control for LCD.

6. 4 Digit Segment Multiplexed Display.

7. 8 LED array.

8. I2C serial EEPROM and Real Time Clock.

9. 4*4 matrix keyboard.

10. Port extensions for all ports.

Included Material

# 12V DC Adaptor

# 20 No's Burg wire - Female to Female

# USB Port Cable

# The included CD contains tutorials to get started, sample codes, demo projects, BootSoft Software and USB driver.

Contact :

Bootloader Modification for Microchip ASM compiler

	processor PIC18F4550

	org 0x2000
	goto init
	org 0x2020
	goto int_isr

	...               ; initialization
        ...               ; code
	goto loop	

        ...               ; interrupt code

Bootloader Modification for Microchip C18 compiler

For Bootloader you need to rebuild and use linker file : Bootloader18F.lkr

step 1 : find mcc18/src/traditional/startup/c018i.c

step 2 : edit the files and search "#pragma code _entry_scn=0x000000" modify as "#pragma code _entry_scn=0x002000"

Step 3 : edit the same for c018.c file also

step 4 : Build

Example Format

#include "p18F4550.h"

void low_isr(void);
void high_isr(void);

#pragma code low_vector=0x2018
void interrupt_at_low_vector(void)
  _asm GOTO low_isr _endasm
#pragma code 

#pragma code high_vector=0x2008
void interrupt_at_high_vector(void)
  _asm GOTO high_isr _endasm
#pragma code 

#pragma interruptlow low_isr
void low_isr (void)

#pragma interrupt high_isr
void high_isr (void)

void main( void )


Example Format for Bootloader

#pragma orgall 0x2000
void interrupt(void) org 0x2008
void interrupt_low(void) org 0x2018
void main()

Hi-Tech C Compiler

step1:goto Build option

step2:linker tap

step3:set offset : 2000

CCS C Compiler

Example format

#include "18F4550.h"
#use delay(clock = 48000000)

#define LOADER_SIZE        (0x1FFF)
#define LOADER_START       (0)
#define LOADER_END         (LOADER_SIZE)
#define APPLICATION_END    (getenv("PROGRAM_MEMORY")-1)

#org 0, LOADER_END {}

#use delay(clock=48000000)

void isr() 

void main(void) 

User Comments

No Posts found !

Login to Post a Comment.