View previous topic :: View next topic |
Author |
Message |
Jody
Joined: 08 Sep 2006 Posts: 182
|
Programming Failed. MPLAB 8.92 ICD3 Debugging works. |
Posted: Mon Mar 12, 2018 4:12 am |
|
|
Hello,
I have MPLAB 8.92 in debugging and this works great.. Selected the ICD3 as a debugger and this works...
When switching to the ICD3 as a programmer and setting MPLAB to Release it recognize the PIC (16F873A) and returns connected and gives the version number of the PIC.
But when I want to program it it says "Programming Failed"
Where o where is my mistake??
Here is my header file... maybe I am doing something wrong with the fuses.
Code: |
#include <16F873A.h>
//#device ICD=NODEBUG
#device ADC=16
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOPUT
#FUSES HS
#use delay(clock=20000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7, enable = PIN_A5 ,bits=8, stream = RS485)
#define VOLTAGE PIN_A0
#define ENABLE PIN_C0
#define FWD_REV PIN_C5
#define MAXINPUTBUF 25
#define DELAY 1000
|
Best regards,
Jody |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9224 Location: Greensville,Ontario
|
|
Posted: Mon Mar 12, 2018 4:36 am |
|
|
While I don't use an ICD or 'debugger'....am familiar with MPLAB.
After you change the build configuration from 'debug' to 'release' you DO recompile again ( F10) ??
Fuses can be set by either MPLAB or the program, there's an option under 'config', configuration bits', top line, small check box...config bits set by code..
Usually when it fails, it'll display a few bytes 'expected' vs 'read'.
maybe this helps you ?
Jay |
|
|
Jody
Joined: 08 Sep 2006 Posts: 182
|
|
Posted: Mon Mar 12, 2018 5:14 am |
|
|
Hi Jay,
Thanks for the information...
Suddenly it started to work...
I switched down everything (PC uC etc.) and after restarting it works....
Something was a little lost into the woods.....
Thanks for your help!!!
Regards,
Jody |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9224 Location: Greensville,Ontario
|
|
Posted: Mon Mar 12, 2018 5:51 am |
|
|
glad it's 'up and running' !
re:..Something was a little lost into the woods.....
yeah, know about that ! For some unknown reason Windows7 decided to lose 20,000 of my PIC files couple months ago... It irks me I can't locate them but at least the older stuff(20+ years) is stored on a Win98 harddrive 'somewhere' in the basement.
Jay |
|
|
|