CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Programming Failed. MPLAB 8.92 ICD3 Debugging works.

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jody



Joined: 08 Sep 2006
Posts: 182

View user's profile Send private message Send e-mail

Programming Failed. MPLAB 8.92 ICD3 Debugging works.
PostPosted: Mon Mar 12, 2018 4:12 am     Reply with quote

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: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 12, 2018 4:36 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Mon Mar 12, 2018 5:14 am     Reply with quote

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: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 12, 2018 5:51 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group