Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Bootloader for PIC18F4550

Status
Not open for further replies.
nsw1216,
i had the bootloader correctly programmed, but i had made 2 mistakes:
1 - i had connected the D+ and D- pins of the USB wrong.
2 - i had connected the bootloader button on the wrong pin, i.e. to RB4 instead of RB5.
the PIC18 worked after i corrected these 2 errors. :)
_________________________________________________________________________________________________________

and about the circuit:
i was wondering that if i want to use the AN1310 Serial Bootloader (which is just 2kB as compared to HID Bootloader which is 12kB), will i have to build this:

and if yes, from where do i get the +3.3V supply?
 

prasg42135,

If nt mistaken, different bootloader have different circuit design in order to compatible with the PIC configurations written in the bootloader. If you insist want to remain the same circuit design, you might have to modify the pin configuration in the AN1310 Serial Bootloader.

For the voltage supply, mayb you can supply it with 3V external power supply.

Regards,
nsw1216
 

Hi,I am working on PIC18F4550 and PICDEM FS USB board which I have built.
Program button in on RB5.and reset on pin1 as per the schematic.

I have burned
'USB Device - MCHPUSB - Generic Driver - C18 - PICDEM FSUSB - MCHPUSB Bootload.hex'
bootloader in the PIC.
My laptop is able to detect the device and is working fine as per 'device manager'.
But I am unable to enter in boot load mode.The pdfsUSB doesn't detect PIC in bootload mode,but does detect it in demo mode.
I followed 'press-hold reset->press program->release program->release reset'.
Still pdfUSB doesn't detect PIC.
What can be the problem?
 

try lookin at the source code of that bootloader, i couldn't fine it, but there will be a few lines in the main function which will tell you which line is being used for the PROGRAM button. for example, in the bootloader i used, which is located in

C:\Microchip Solutions\USB Device - Bootloaders\HID - Bootloader\USB Device - HID - HID Bootloader - C18 - PIC18F4550.hex

and its source code,

C:\Microchip Solutions\USB Device - Bootloaders\HID - Bootloader\HID Bootloader - Firmware for PIC18 Non-J Devices\main.c

the main function contains the following lines:

//Check Bootload Mode Entry Condition
if(PORTBbits.RB4 == 1) //This example uses the RB4 I/O pin to determine if the device should enter the bootloader, or the main application code

which means RB4 is used as the PROGRAM button, not RB5..........
so just check your bootloader source code and find out.
 

check this link. i followed this tutorial and it works great for me.

If any one is interested i can upload the pcb file also.

**broken link removed**
 

Hey,thanks a lot...:) but I couldn't find my bootloader source file :(

The directory in which my boot hex file resides contains a 'Generic Driver Demo-Firmware' folder which has a main.c but it doesn't include any bootload mode entry statement.

Should I change the bootloader?(I want to use ADC in my project.)
 

there are two things you can try........
1. try connecting the PROGRAM button on pin RB4.
coz most of the bootloaders provided by microchip use RB4 for the PROGRAM button. just use a wire to short the two pins if u must.

if that does not work......

2. change your bootloader to this:
C:\Microchip Solutions\USB Device - Bootloaders\HID - Bootloader\USB Device - HID - HID Bootloader - C18 - PIC18F4550.hex
i had used this and also used 6 ADC pins from the microcontroller, it had worked well for me.

check this link. i followed this tutorial and it works great for me.

If any one is interested i can upload the pcb file also.

**broken link removed**

this will also work perfectly, and as you can notice in their schematic, they have used RB4 for their PROGRAM button, not RB5
 
Last edited:
Hey,prash42135,thanks a lot..n I mean a lot :)

My device is working fine now.I replaced the bootloader with HID one.

But now if I want to interface the PIC to matlab, do you khow which dll file to use?or any reference regarding this?
 

dont know about using any dll file........ am sure google will help you out. :)
i had used HIDBootLoader.exe which comes with the Microchip USB Framework, it is very simple to use, look around google.

btw, did you get it to work just by changing the bootloader? or did you have to change the PROGRAM button from RB5 to RB4 too?
 

Yes,followed your second advice completely.

Changed PROGRAM button to RB4,burned HID device bootloader and the PIC device is detected when PROGRAM button is pressed while connecting USB cable to laptop... :)

And yes I too have the HIDbootloader software,that too detects the device.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top