Hi,
I do not know where this question should be posted so I will do it here.
I have hired a guy in Romania to write a bootloader and PC application for me. It is to work with the 16F888 (runs great) and the 18F2620 (big issues).
If I compile the code for a straight hardware burn (without the bootloader) the code works as expected. Program 1 simply blinks RB2 on/off with 1 second delays and repeat forever. Program 2 simply blinks RB4 on/off with 1 second delays and repeat forever. I have other LEDs in the circuit as well.
When I burn his bootloader software to the PIC and download the compiled program via RS-232 port on PC the bootloader looks like it transfers the code properly but Program 1 the following happened.
The 18F2620 is running at 20MHz
LED on RB2 went off, then 1 second later LED on RB1 shut off, then nothing. It was supposed to just blink RB2 on 1 second then off 1 second, repeating continuously like it did when I used the NO_boot code without the bootloader.
My friend that did the testing also tried to use a 4Mhz compiled version and this is what he got.
Put PIC back into test board, ran BootLoader, and this time downloaded 18F2620_4mhz_rb2_boot.hex. I wanted to do this because in theory the LEDs should do the same thing as before, but the delay should be 1/5th of a second. HOWEVER, the LED RB2 actually blinked on and off continuously about 5/second as it SHOULD.
So for some reason the 20MHz LED blinking code isn't working correctly when downloaded through BootLoader, but the 4MHz version of the code does.
We had a little problem with the configuration bits trying to get the 16F886 working, I am hoping we have the same issue with the 18F2620.
Can this question be asked without many people laughing at me?
What would the 18F2620 configuration bits be set to for an 18F2620 running at 20Mhz with all I/O pins being used (Digital or analog I/O) except the pins TX/RX and OSC1 & 2, reset pulled high.
I think that is everything.
Thanks
Ron
Flowcode, 18F2620 & a bootloader
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
It could be that the watchdog timer is on. You also need to make sure you have the correct setting for LVP (which is probably pin B5 on the 18F device). If you are not using low-voltage programming mode, make sure this is disabled.
I had a strange problem with LVP recently. I had enabled it accidentally and it turned my LED flashing program into a proximity sensor - whenever I put my hand near the chip, the program would run (because the voltage on the LVP pin changed and allowed the chip to run the program).
I had a strange problem with LVP recently. I had enabled it accidentally and it turned my LED flashing program into a proximity sensor - whenever I put my hand near the chip, the program would run (because the voltage on the LVP pin changed and allowed the chip to run the program).