PIC18F4455 USB Bootloader

November 29, 2008 at 8:57 am 2 comments

This week I’ve put the USB Bootloader on my PIC experimental board. A bootloader allows you to program the PIC uC without a programmer. More info about using the bootloader can be found on this site. A first trial resulted in all the leds flashing periodically (no leds should light up during startup). After some digging around I added these configuration variables in my header file:

#pragma config PLLDIV = 5
#pragma config CPUDIV = OSC1_PLL2
#pragma config USBDIV = 2
#pragma config FOSC = HSPLL_HS

When these were set Windows already gave a notice that an unkown USB device had been attached. Well I certainly prefer an unknown device over no device at all :). After some more digging I just copied all the pragma variables from this project from Elektor: usb aquisitioncard. I don’t know which of the many variables did the trick, but it worked and I was able to succesfully install the driver!

When starting the programmer tool, you have to select the device in a combo list. I got an error saying “error 997 Overlapping I/O operation”. If you get this error go to the configuration screen > devices > PIC18F4455 Family Device and uncheck “computer may disable this device to save energy”

niet toelaten dat apparaat uitgeschakeld wordt

A good start to use the bootloader is the demo02 project that is included with the driver and the bootloader. Open it with MPLAB and execute make all. It is designed for a 18F4550 but it also worked on my 18F4455. In a next step I created my own project, therefore I changed the linkerfile of the 18F4455 like this:


so we reserve a part for the booting and we shift the remaining part. I did get the following warning while loading the hex file of my project in the bootloader program:

foutmelding bij eigen project

You better click No when you get this warning, because bad things happen otherwise (which resulting in having to reprogram the PIC). The warning popped up because certain pragma vars in the code were conflicting. After removing them I didn’t get the error anymore.

To end this post just a before and after photo of my development environment :p

ontwikkelchaos, voor


Entry filed under: Electronics. Tags: , , , , , .

Using Eclipse for PIC development Serial com-port communication with autoIt

2 Comments Add your own

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Articles to be written…

Twitter – kr3l

my del.icio.us

RSS Google Reader Shared Stuff

  • An error has occurred; the feed is probably down. Try again later.

RSS Listening to..

  • An error has occurred; the feed is probably down. Try again later.

%d bloggers like this: