PDA

View Full Version : Adding usb and microchip bootloader to X1 development board



chas12
- 16th March 2011, 13:58
Like many I have the usb bug and not being a guru I was going to need help.I visted this forum since I use PBP and found this post"USBDemo, something to learn USB a little bit"great this would be the help I needed.I wired up the circuit and ran into most of the problems that were covered in the thread and many thanks to Darrel Taylor I got it to work.I have an X1 development board and I added a usb,standard icsp,programed a 18F4550 with microchip bootloader and upgraded to PBP2.60 and now I have a good development board.These are the steps along with pictures of the project.

1.Visit this url http://eegeek.net/content/view/13/32/ and follow the steps entirely as presented including download the software that has the microchip bootloader
that works,don't forget the picture of configuration settings for the 18f4550(for 20mhz),these are correct and work without problems.
Ver 2.6 microchip bootloader does not work..the loader in this software download works!!!!!.......use it and its already a hex file.

2.add the following in the farm area of the X1,a usb connector type B,A standard ICSP by that the common microchip :
pin 1 Vpp
pin 2 Vdd(not connected on X1,use wall wart connected to X1 power connector....
pin 3 GND
pin 4 data
pin 5 clock

3. add tact switch connected to RB4(pin 37 of 18f4550)40 pin texttool socket) and ground,pin 37 pullup to vdd using 10k resistor

4.Disconnect R9 and R10 used as pullups for SEEPROM,they interfere with portc3 and portc5 causing usb connection problems.

5.follow the steps from the above url and you will suceed,double check.

what you gain,no more config's in your code,no programer connections and being able to change code on the fly.
what you need to add to your Picbasic Pro code:
Define LOADER_USED 1

' RESET_ORG can be set to move the BASIC program out of the way
' of any boot loader running from location 0, such as the
' Microchip USB boot loader
Define RESET_ORG 1000h (your code starts here)

Define OSC 48 ' Core is running at 48MHz (if using 20mHz xtal)