PDA

View Full Version : 18F4620 Bootloader Problem



craig
23rd February 2011, 16:15
Hi

I have been using the Micro Code Loader on PDS Ver. 3.5.0.6 with the Pic 16F877 which works perfectly (So I know that my RS232 is working) but If I load the relevant 18F4620_20Mhz.hex Boot loader file from Micro Code Loader into my Pic with an external serial programmer. I then Press the Compile & Program button using the Micro loader to load my hex file into the Pic, it just hangs ( Loader Message - Reset Required ) and waits for the reset which I am doing with the button connected to MCLRE. Does anyone know if I need to change anything in the relevant hex file of the Micro Code Loader to make this work ?

I have Set it to Auto detect baud rate and my Com Port is correct and my Pre-Compiler is switched On.
I am using a PIC18F4620-E/P with a 20Mhz external Crystal.
Please HELP ??:)

Regards
Craig

pverburg
23rd February 2011, 16:56
Can you load a blinking led program into your 18F4620 ?
Thats the fist thing I would do just to make sure it runs.

craig
24th February 2011, 07:26
Hi Paul

If I download my whole program onto the 18F4620 using a standard Serial Programmer my whole programs runs perfectly but, I cannot get the Bootloader to work on this chip.
I did find a previous thread where someone had the same problem with the Boot loader Hex file from Mecanique using a 20Mhz Crystal, unfortunately he did not post the working
hex file. Does someone PLEASE have a working Boot loader hex file for the Pic18F4620 with a 20Mhz crystal ??

Regards
Craig

Kapitan
24th February 2011, 07:35
First thing I would check is the fuse values for the bootloader and ensure they are correct.

Gessiomismhup
24th February 2011, 22:27
Бесплатная RPG онлайн игра Техномагия завоевала интерес тысяч пользователей различной возрастной категории оригинальным интерфейсом, геймплеем, игровым движком. Игра в стиле фэнтези совместила в себе элементы стратегии, тактики и логики. Мир Техномагии красочен и ярок, графика основана на флеш-анимации, при этом ее системные требования минимальны. (http://tehnomagija.tk)

craig
25th February 2011, 16:45
Hi Joe I have set them and I belive they are correct. Maybe someone can have a look at these shapshots and PLEASE guide me in the right direction.
Regards
Craig
927928929930931932933

Kapitan
27th February 2011, 14:53
Hi Joe I have set them and I belive they are correct. Maybe someone can have a look at these shapshots and PLEASE guide me in the right direction.
Regards
Craig
927928929930931932933

Hi Craig, no images appear. sorry.

Also, please update your status to licensed user if possible.
Then I can send you the latest BL files and hex, (the others are 5 years out of date.)
I also need a full config listing of your device.

craig
27th February 2011, 17:04
937938939940941942943

craig
27th February 2011, 17:20
937938940941942943939

craig
27th February 2011, 17:43
937938940941942943939

Hi Joe
I have re uploaded the attachments I don't know why they were not visible, they show my config settings on my programmer and in the boot loader hex file. I have sent a mail to Les to ask him to upgrade my status because I bought a full version of PDS in December 2010 form our local Proton Distributor- Dizzy Enterprises, Hopefully he will do this early this week.

If I use the tiny bootloader with a Pic 16F887 With a 20Mhz crystal I get the boot loader to work fine and I can down load without a problem. If I use the Mecanique Micro Code Loader with a 16F877 I get the boot loader to work fine and I can down load perfectly. However If I use a 18F4620 with a 20Mhz crystal I can try any boot loader but, I cant get the Boot loader to connect to the device.

Thanks Very much for all your help Joe.

Regards
Craig

bill9399
27th February 2011, 19:06
How to build your own serial bootloader, 16F and 18F series, Autobaud.


1: Download and install latest MPLab IDE, if you haven't already done so.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002

2: Download and install MPLAB C compiler for 16F/18F series as required
Student version acts as full version for 60 days then reverts to limited edition.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014

3: Download and install AN1310 source code, also download AN1310 PDF manual

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en546974

4. Open the bootloader source code project in MPLAB. (.mcp file)

5. Select device type

6. Set fuse configuration as required

7. Build your bootloader hex file.

8. Load and test in pic.



The MPLAB project is relatively easy to use :cool: ( and your don't need to be a licensed user here to work with same.:rolleyes: )

Kapitan
28th February 2011, 08:55
Hi Craig, No worries, In that case I can either send you the Mchip Serial PC bootloader and ready made hex, or you can make one yourself.
Even Bill can do it lol :) , however, it may take a while to get your head around the mplab ide. In this case though, Mchip are very good on the info, (for once), also you need to convert your config values to hex values for the config registers, but this is fairly striaght forward.
Either way, PM me if you want the file with a simple list of your config required.
Joe

bill9399
28th February 2011, 09:11
, also you need to convert your config values to hex values for the config registers, but this is fairly striaght forward.
Joe


Nearly, but not quite correct yet, Joe. Still no gold star for you.:( Keep up the current level of study. You will/might get there eventually.:rolleyes:

In MPLAB, once the device is selected, if you go to the main menu>configuration>configuration bits, a drop-down menu allows selection of the various parts of the configuration required. This works in similar fashion to fuse configurator plugin for PDS. in that the user does NOT need to manualy adjust the configuration register values.
To re-iterate. There is no requirement for the user to convert the configuration data to hex. MPLAB does this for you.

Ensure that your version of MPLABm is up-to-date, Joe.

Note: There is a requirement to register with Microchip in order to access the files mentioned. but this is free. :)

Kapitan
28th February 2011, 09:42
@Bill
Not quite sure what you refer to as the student version Bill ?, perhaps the Academic version? . I do not see where this expires, yet have not tried it.

For the bootloader (serial) one only needs the bog standard MPLABS stuff in the page you linked to.. That will work fine with the 1310 V4 Source. and nothing expires, however, again, as far as I can see, there is no optimisation built in for PIC18 devices.
The full version of 3.37 (EVAL Edition) http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014 , IS time limited, but again, not needed for this specific bootloader (serial) .
The academic version (Also listed on this page) isnt time limited, But 'feature' limited, and does seem to include optimisation. It will be an interesting comparison with the 'academic' version over EVAL as to how and if the optimisation makes a worthwhile difference in the size of the code. - compared also to striaght mplabs in your link.
Joe.

Kapitan
28th February 2011, 09:50
Nearly, but not quite correct yet, Joe. Still no gold star for you.:( Keep up the current level of study. You will/might get there eventually.:rolleyes:

In MPLAB, once the device is selected, if you go to the main menu>configuration>configuration bits, a drop-down menu allows selection of the various parts of the configuration required. This works in similar fashion to fuse configurator plugin for PDS. in that the user does NOT need to manualy adjust the configuration register values.
To re-iterate. There is no requirement for the user to convert the configuration data to hex. MPLAB does this for you.

Ensure that your version of MPLABm is up-to-date, Joe.

Note: There is a requirement to register with Microchip in order to access the files mentioned. but this is free. :)

;)
And unfortunately my 'learning' friend, no gold star for you either ;) . one can dl mplabs without that, and it works, (ie you do not need a so call student edition etc) thankyou for pointing out the pull down options. :)

bill9399
28th February 2011, 10:14
You really should brush up on your reading skills, Joe. That's 2 demerits in 24 hrs! Not looking good for your end-of-term report.

http://ww1.microchip.com/downloads/en/devicedoc/mplab-c18-v3_02-student-edition-readme.htm

It might also help if you get some tuition on how to use search engines. I can recommend Google.

re registering with MChip. Gives access to use of ALL MChip facilities, including the forums., and, as said, costs nothing.

Note: There are some downloads which do require registration.

Any more nit-picking, Joe?

bill9399
28th February 2011, 10:24
http://ww1.microchip.com/downloads/en/devicedoc/mplab-c18-v3_02-student-edition-readme.html

Hmm. Link didn't set out correctly in previous post..
Try again.

OK. That works.

Kapitan
28th February 2011, 10:31
:)
Well, maybe the links work, but the results dont, as you are referring to an older edition.please see the link I gave...
and again, one doesnt need anything apart from the standard mplabs to compile and produce hex for the serial bootloader..

I will keep you in for detention ;)

bill9399
28th February 2011, 10:46
I hardly think that Microchip would release older versions of their software in preference to the latest versions.

Kindly stop nit-picking, Joe.

Just when I thought we were beginning to get along a great deal better than before, here you are, yet again, reverting to type. responding adversely to anyone/anything that you either have limited or no knowlege thereof. Please read up on whatever subject matter pertains to a particular thread/post before jumpping in both feet first. As before, you seem to take exception to anyone whom you perceive to be contradicting you in any form or fashion.

Believe it or not, I put the relevant information on this thread, the intention to be helpful.

Kapitan
28th February 2011, 10:57
I hardly think that Microchip would release older versions of their software in preference to the latest versions.

Kindly stop nit-picking, Joe.

Just when I thought we were beginning to get along a great deal better than before, here you are, yet again, reverting to type. responding adversely to anyone/anything that you either have limited or no knowlege thereof. Please read up on whatever subject matter pertains to a particular thread/post before jumpping in both feet first. As before, you seem to take exception to anyone whom you perceive to be contradicting you in any form or fashion.

Believe it or not, I put the relevant information on this thread, the intention to be helpful.

I am sorry Bill, but this is not nit-picking as you call it, Microchip may well have links on their site to older versions, but not in actual preference to later, Usually a simple non updating of the site, often, one has to search, I can recommend google but it is limited, as also is the Mchip search - That may help you. Please read the section of the link I sent you. I also thought you were not in too much of a point scoring mode.?
If you look at the link I sent you, and actually use the programs, you will see that there is no student edition anymore. That also, you do not need to use either eval or Academic version of the LATEST software to compile the serial bootloader. And also that there is no 60 day limitation on the Academic version, only feature limitation as I said.
I ham happy to admit if I am wrong, however, that may be something you need to look at.
If that is nit picking, then that is how you interpret it, I am only pointing out how it is.
Peace and good will.

Kapitan
28th February 2011, 11:05
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en536656

Here is the latest info for your perusal.

craig
28th February 2011, 12:31
THANKS Bill & Joe For all of the info and Help, I will download an updated version of MPLAB and their C Compiler and then get the Boot loader up and running.
Thanks for everything!

Regards
Craig

Kapitan
28th February 2011, 13:00
No worries Craig, just download the latest MPlabs . (I think it is 8.63) you dont need anything else apart from the AN1310 V4 source.
Enjoy...

ADLIN SYSTEMS
6th March 2011, 19:03
Just to let you guys know that Craig and I downloaded theDS30 and AN 1013 bootloader and got both to work. Nobody mentioned one setting in the config which i found. I am impressed at ds30 and might use this one in a future project. Thanks for all the help. Now we know.

Anton

Kapitan
7th March 2011, 09:28
Hi Anton / Craig , thanks for that update.
I had not noticed the ds30 app before, so have downloaded it to test, cheers ! :)
It is great that it works with the easy to generate hex files.

Which config setting do you refer to ?

Joe.

ADLIN SYSTEMS
7th March 2011, 11:57
The 8460 bootloader in proton works. I have tested it and it works.

craig
10th March 2011, 08:30
The DS 30 Boot loader Works very well it can do over 400 different Pic's. If you are using an External 20Mhz Crystal then it is of VITAL importance to to set the IESO = On {ENABLED} (Internal External Osc Switch Over) ;
For a basic setup we used the following:
Config_Start
OSC = HS ; HS
FCMEN = On ; Enabled
IESO = On ; Enabled
PWRT = On ; Enabled
BOREN = OFF ; Disabled
WDT = OFF ; Disabled
MCLRE = On ; Enabled
LVP = OFF ; Disabled
Config_End

I must Say A VERY, VERY big thank you to ANTON for all his patience and help, thanks Anton for being such a fantastic friend.

Regards

Craig

bill9399
10th March 2011, 09:41
Craig.

Might be a good idea to post this config setting listing for the DS30 bootloader in the 'tips n tricks' section of the forum. If left here it willl eventually disappear way down the thread list.
A full outline of all the steps taken to implement this bootloader would also be very handy.

Regards.

Kapitan
10th March 2011, 10:13
The DS 30 Boot loader Works very well it can do over 400 different Pic's. If you are using an External 20Mhz Crystal then it is of VITAL importance to to set the IESO = On {ENABLED} (Internal External Osc Switch Over) ;
For a basic setup we used the following:
Config_Start
OSC = HS ; HS
FCMEN = On ; Enabled
IESO = On ; Enabled
PWRT = On ; Enabled
BOREN = OFF ; Disabled
WDT = OFF ; Disabled
MCLRE = On ; Enabled
LVP = OFF ; Disabled
Config_End

I must Say A VERY, VERY big thank you to ANTON for all his patience and help, thanks Anton for being such a fantastic friend.

Regards

Craig
Craig, try setting the fcmen off ieso off, pwrt off. and see if it works ok then.
ie - without, ieso... being vital...
Joe.

craig
10th March 2011, 11:52
Hi Joe
I did try that way round but, it seems to have an issue with switching from the internal oscillator to the external HS oscillator. The only way to get it to work properly is to set the IESO to be ON.
Then it works like a dream !
Thanks Bill, Good idea I will post the config's to the tips & tricks.

Regards
Craig

Kapitan
10th March 2011, 11:56
Hi Joe
I did try that way round but, it seems to have an issue with switching from the internal oscillator to the external HS oscillator. The only way to get it to work properly is to set the IESO to be ON.
Then it works like a dream !
Thanks Bill, Good idea I will post the config's to the tips & tricks.

Regards
Craig
Hi Craig, no worries, I have not tried the ds30 yet, but have downloaded it, the Mchip one works fine with the settings I quoted, just probably a quirk I presume.

ADLIN SYSTEMS
12th March 2011, 21:09
I must Say A VERY, VERY big thank you to ANTON for all his patience and help, thanks Anton for being such a fantastic friend.

ehhh blush blush pleasure anytime.

Anton

ADLIN SYSTEMS
12th March 2011, 21:11
Problem solved in as much that the vellaman progremer is at fault. Craig will have to contact them for new software. I use the proton bootloader for the 4620 and it works great.

Kapitan
13th March 2011, 06:57
Problem solved in as much that the vellaman progremer is at fault. Craig will have to contact them for new software. I use the proton bootloader for the 4620 and it works great.
Hi Anton, great work ! both of you,
Hopefully you can briefly explain something that I am finding confusing from your posts ?

We have 3 utils here that have been mentioned.
MChip AN1310 bootloader app and hex.
DS30 bootloader app and hex
And the proton bootloader, by which I presume you mean the mechanique one. ??

Which APP are you using with which HEX ?
ie, have you compiled a hex file for the 4620 using Mchip MPLab project, or DS30 mplab project ? - and if so, which application are you using to run it, Mchip, Mechanique (Proton), or ds30 ?
Cheers
Joe.