PDA

View Full Version : Programs and Verifies, but won't run



rsfutch
- 17th July 2013, 19:45
Hello,

My name is Robert and I'm here in Arizona programming a control board (PIC18F8723) for a high voltage refrigeration application. Things have been going fine for months programming and reprogramming, but today the melabs Programmer crashed on me for the first time right in the middle of programming. As I have never had that problem before, it leads me to believe this was the cause. After restarting the programmer, I attempted to program again and

it programmed and verified, but nothing came up on my output screen, nor did my test LEDs on the board do their startup sequence.

I shutdown the board and tried to program again with the same result. I tried an older version of my code, with still the same result. Testing of the connections between the processor and the screen seem fine. So I pulled out the backup board and plugged it in. An older version of the code that was on that backup board popped up on screen and appeared to work just fine. So I programmed it with the new code only to see it fall into the same pit of not starting after programming and verifying. Programming the old code back to the old board still proved unfruitful. The boards appear to be getting power. I tried another U2 programmer as well and still the same result.Short of testing more of the hundreds of tiny connections, I'm not sure what would be the next step in diagnosing this problem. There was no change to the setup file before the problem started, it must be something to do with the crash of the programmer, but then why would the second board program, verify and then have the same symptoms without the crash of the programmer.

What would you do next to diagnose the problem?

wdmagic
- 17th July 2013, 20:06
Did you try reinstalling the software?
do you have some kind of blinking LED in the code to see if program is running?
if not can you add this?

I have had a couple of chips blown (my fault) for different reasons and a couple said they programed and verified but there was no I/O at all, and some just says the programmer cant recognize the chip. as far as programming the old chip with new code and not working but reprogramming with old code does, I'm not sure, is there alot of code changed? is there a OSC setting different? I found I was blowing chips because my programmer software was set to insert the code for telling the chip to use a external crystal, which overode my desire to use interal OSC. chip word turn on and blow because there was no xtal installed. it was a 50/50 result of same issue you have. sometimes it would reprogram and verify but no I/O.

Archangel
- 19th July 2013, 02:51
Hi Robert,
As I am totally unfamiliar with the MELabs programmer, this will be a W. A. G. so be kind, please.
My idea concerns the config fuses. Are they set in your code, or do you set them manually in the programmer?
Is there a possibility of an incorrect OSC. choice or MCLR set wrongly . . . ? Pretty much what WDMAGIC said huh? DOH !

rsfutch
- 19th July 2013, 18:46
FIXED! :)

Thank you both of you for your responses. My contact also suggested checking the status of the oscillator crystal with an oscilloscope and the configuration settings. The settings appeared correct to him, so I went ahead and uninstalled and reinstalled the programmer software (updated from 4.50 to 4.51). The update must have reset all the configuration settings because it worked! Both boards are now up and running again with the original software that they crashed with.

The problem appears to be that, in the case of a crash of the melabs programmer software while it is programming, the configuration settings get jumbled or lost and will program each subsequent board with the wrong settings even if you restart the program or try another set of code. It is technically beta so I don't blame the programmer. Hopefully crashes can be better handled in the final version!