PDA

View Full Version : Problem with Bootloader + 18F4620



CocaColaKid
- 14th September 2005, 16:58
For some reason that is beyond my scope I can not get the 4620 to program using the bootloader. It works fine using the 452 but when I try the 4620 it just tells me that a reset is required. Any ideas?

mister_e
- 14th September 2005, 17:07
I can't confirm here 'cause i'm out of stock of this PIC but, may i ask you if you previously load the right firmware in before with the right config fuses with an external PIC programmer?

CocaColaKid
- 14th September 2005, 18:22
Yes, I did load it with the proper firmware. I tried the one without the PLL and it works fine. However the PLL ones, both the 16 and the 40 will not allow the bootloader to run. The only config fuse that I changed between the 4 MHz and the 4 x 4 MHz was the oscillator type. The rest of the settings I left alone as they worked fine.

Bruce
- 14th September 2005, 18:40
Are you including DEFINE OSC at the start that matches the osc speed defined by the loader firmware?

CocaColaKid
- 14th September 2005, 18:42
Bruce, yes. Here are my defines:


DEFINE LOADER_USED 1
DEFINE OSC 40
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h

mister_e
- 14th September 2005, 18:42
mmm weird. The only thing i can say is to contact David John Barker at Mecanique => [email protected]

EDIT: i don't have the PLL_18F4620 BTW... probably i miss something ;)

Bruce
- 14th September 2005, 18:59
Assuming your oscillator is working properly, you're using DEFINE OSC to match the loader, and connections are good, it should work fine unless there's a bug in the loader firmware. But I have never had any problems with MCS loader firmware.

Reset required just means the PC app isn't communicating with the PIC loader. Just out of curiosity, what happens if you comment out all of your HSER defines & all references to HSEROUT/HSERIN?

Will it boot-load then?

CocaColaKid
- 14th September 2005, 19:08
Well if I program the chip using the ME Labs serial programmer everything works fine and dandy so I can only assume the oscillator is operating properly. Like I said, I've tried the 4 MHz and the bootloader works great, using the 16 or 40 MHz and it's dead in the water.

I tried removing all references to the USART and it still gave me the same message.


Assuming your oscillator is working properly, you're using DEFINE OSC to match the loader, and connections are good, it should work fine unless there's a bug in the loader firmware. But I have never had any problems with MCS loader firmware.

Reset required just means the PC app isn't communicating with the PIC loader. Just out of curiosity, what happens if you comment out all of your HSER defines & all references to HSEROUT/HSERIN?

Will it boot-load then?

Bruce
- 14th September 2005, 19:25
I don't have loader files for 16 or 40MHz and the 18F4620 so I can't look at config fuse settings.

If you open the loader .hex files for 16 or 40MHz with the MeLabs serial programmer, then click on the C to bring up the config screen, what does it show for the MCLR Pin Function?

If it's set to Reset, you shouldn't have any problem. If it's set to Input Pin, you would need to power cycle to reset.

If that's not it, give Dave Barker a shout.

CocaColaKid
- 14th September 2005, 20:06
Well I just received an email from David Barker with the corrected files that work great. Thanks again David.