Page 1 of 1

18F4550 USB HID Bootloader

Posted: 23 Jun 2014 19:34
by kapil123
Hello All,
I am new to PIC. To learn the PIC microcontroller I want to burn a bootloader to 18F4550. As for the beginner, I think I must use bootloader instead of ISP programmer. There are many posts, but no one share the exact configuration setting for 18F4550. How can I change the configuration for the 18F4550 ( I am very new to this world), even the USB HID bootloader for 18F2550 is given in example code. Can you share the hex code or the respective files with correct setting.

Regards
Kapil

Re: 18F4550 USB HID Bootloader

Posted: 25 Jun 2014 14:55
by petar.timotijevic
Hi Kapil and welcome to the MikroE forum,

Please see attachment for PIC18F4550 and PIC18F2550 USB HID Bootloaders.

PIC18F4550 - 8MHz crystal
Folder: \Project\PIC18F

PIC18F2550 - 8MHz crystal
Folder: \Project\PIC18F

Configuration you can see in Project settings.


Best regards,
Peter

Re: 18F4550 USB HID Bootloader

Posted: 26 Jun 2014 05:13
by kapil123
Thank you for your support. When I open this project file in my friend's computer the frequency shows 38 MHz but you mention 8MHz. Which one is correct? When I change the frequency to 8MHz the hex code will generated; This hex file I will use? or other settings are required?

Thanx.

Re: 18F4550 USB HID Bootloader

Posted: 26 Jun 2014 08:40
by petar.timotijevic
kapil123 wrote:Thank you for your support. When I open this project file in my friend's computer the frequency shows 38 MHz but you mention 8MHz. Which one is correct? When I change the frequency to 8MHz the hex code will generated; This hex file I will use? or other settings are required?

Thanx.
Hi Kapil,

MCU frequency is 48MHz not 38MHz or 8MHz, and there is no 38MHz in project settings. 8MHz is crystal which is used with PLL to form 48MHz.


Best regards,
Peter

Re: 18F4550 USB HID Bootloader

Posted: 04 Jul 2014 17:05
by kapil123
Hello, Thank you for your replies. As this is my first project and after this I will learn the PIC. As attached program, I am confused with the settings. Can you share the hex code for the PIC 18F4550 USB hid Bootloader for 8MHz external crystal. Can you suggest me any good tutorial for the basics of mikroc for PIC. How to compile the code and settings etc ?

Thanks.

Re: 18F4550 USB HID Bootloader

Posted: 07 Jul 2014 07:09
by petar.timotijevic
Hi,

Please see my attachments in this topic, you can find complete project files including hex files, source code, project settings,...

Also please see our publications here:
http://www.mikroe.com/categories/view/4/publications/


Best regards,
Peter

Re: 18F4550 USB HID Bootloader

Posted: 22 Nov 2015 17:27
by szacpp
hi petar.timotijevic
Can I use 20MHz crystal with above configuration?

Re: 18F4550 USB HID Bootloader

Posted: 25 Nov 2015 11:38
by biljana.nedeljkovic
Hello,

you have to change configuration settings if you use different oscillator.

Please take a look at the datasheet for the microcontroller you want to use, and look up the clock diagram to set the prescale factor properly.
http://ww1.microchip.com/downloads/en/D ... 39632e.pdf

Best regards,
Biljana Nedeljkovic

Re: 18F4550 USB HID Bootloader

Posted: 18 Jun 2023 23:07
by jeovanevs
petar.timotijevic wrote:
26 Jun 2014 08:40
kapil123 wrote:Thank you for your support. When I open this project file in my friend's computer the frequency shows 38 MHz but you mention 8MHz. Which one is correct? When I change the frequency to 8MHz the hex code will generated; This hex file I will use? or other settings are required?

Thanx.
Hi Kapil,

MCU frequency is 48MHz not 38MHz or 8MHz, and there is no 38MHz in project settings. 8MHz is crystal which is used with PLL to form 48MHz.


Best regards,
Peter
Hi for all those who come here someday.
The PIC18F4550 works with a frequency multiplier, which adjusts the frequency for USB. CPU and USB can work with different clocks. USB High Speed needs a fixed frequency of 48MHz. Using an 8MHz crystal this frequency is adjusted to 48MHz. The CPU can work with this frequency or a lower one, when using a frequency prescaler. More information can be found in the datasheet. That's why the comment is talking about an 8MHz crystal and an operating frequency of 48MHz, that is, the USB and the CPU are operating at the same frequency.
In mikroC this is adjusted in the project settings.

Best regards,
Jeovane.