I have upload the hex file (16F877_04.hex), but still gets the "Reset Required, please reset the target microcontroller in order to access to the bootloader process... ". error if I try to program it through my serial cable?
I have upload the hex file (16F877_04.hex), but still gets the "Reset Required, please reset the target microcontroller in order to access to the bootloader process... ". error if I try to program it through my serial cable?
You need to insure that the serial port is working properly on both machines.
On my PC, I simply connect pins 2&3 together on the serial cable and hit a key. If the character echoes, then the PC end is working.
On the PIC side - Write a very simple program, such as:
DEFINE OSC 20 (or whatever it is)
DEFINE HSER_RCSTA 90H
DEFINE HSER_TXSTA 20H
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1
DEFINE LOADER_USED 1
Dummy VAR BYTE
Begin:
HSEROUT ["Press Any Key "]
HSERIN [Dummy]
HSEROUT ["You Pressed ",Dummy,13,10]
GOTO Begin
END
The program above will prove that the PIC is sending and receiving characters - something it must do before any bootloader can work.
Charles Linquist
Hi Charles
Both sides are working perfectly, I am doing serial comms using HSEROUT and HSERIN.
Thx
Make sure Microcode Loader is set to use the correct serial port on your PC.
Charles Linquist
I'm Using the PIC16F877 20/P with a 4MHz Crystal and then upload the 16F877_04.hex file.
Could my problem maybe be the "20/P"
Thx!
You say you are successfully doing serial comms already but this only requires TX and RX (as does the bootloadr for actual programming) but you need a way to restart the PIC so that it looks for the bootloader when it boots from a reset.Originally Posted by koossa
Do you have the DTR (Pin4) line connected to MCLR so that the bootloader can reset the PIC ?
IF not, you either need to do that, or have a reset button on your PCB that you can reset the PIC with (or power down the PIC).
I prefer the reset button method personally as previously when using the DTR line my program would reset when I opened the serial port on the PC.
Regards
Keith
www.diyha.co.uk
www.kat5.tv
Hi Keith
Thank you very much for your reply.
I have setup my PCB as described in this thread:
http://www.picbasic.co.uk/forum/show...ght=bootloader
But I did not build the reset button in, I have connect MCLR to the 10uF capacitor and the capacitor then goes to Pin9 on the MAX232.
Must I put the reset button in, as described on the thread above?
If so, when do I press the reset button?
Thx
Koossa
Hi Koossa,Originally Posted by koossa
I hadnt heard of the capacitor coupled version. It is exactly the same circuit except for the 10u capacitor instad of a 100R resistor. The difference being that instead of pulling MCLR permanently low it will only provide a short pulse. Maybe it is not pulling it low enough or for long enough.
The Reset button *shouldnt* be needed but having it gives the option of manually resetting your PIC at any time.
When the bootloader is displaying a message saying it is waiting for a reset, connect the MCLR pin to 0V momentarily and it should then reset the PIC and bootload the new program.
Just had a few more thoughts.....
1. When you programmed the bootloader into your PIC did you make sure that the MCLR pin was set as MCLR and not an IO pin ?
2. Is your MCLR pulled up with a resistor or have you tied it directly to +5V ?
3. Is Microcode loader set to "Auto" baud rate or is it fixed at the wrong speed?
4 Try the bootloader circuit with 100R instead of 10uF !
Other than that I cant think of anything else
Regards
Keith
www.diyha.co.uk
www.kat5.tv
Hi Keith
How do I do that?1. When you programmed the bootloader into your PIC did you make sure that the MCLR pin was set as MCLR and not an IO pin ?
With a Resistor.2. Is your MCLR pulled up with a resistor or have you tied it directly to +5V ?
Yes, to Auto3. Is Microcode loader set to "Auto" baud rate or is it fixed at the wrong speed?
Thx, I will try that.4 Try the bootloader circuit with 100R instead of 10uF !
I have connect the MCLR PINT TO 0V, but it still don't work.When the bootloader is displaying a message saying it is waiting for a reset, connect the MCLR pin to 0V momentarily and it should then reset the PIC and bootload the new program.
I'm using the Max1672 switching regulator, and it has a soft on pin, so I must press the ON button on my keypad for the power to go through to my PIC.
I have done this and then momentarily connect MCLR to GND, but still no luck?
Any idea what else I can try?
Bookmarks