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 support@ccsinfo.com

Device being ID'd incorrectly while trying to program

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



Joined: 01 May 2004
Posts: 49

View user's profile Send private message

Device being ID'd incorrectly while trying to program
PostPosted: Sat Jun 05, 2004 5:03 pm     Reply with quote

I'm trying to program a PIC16F877A using the method shown here by Woody;



http://www.ccsinfo.com/forum/viewtopic.php?t=19231&highlight=rb3

but it says it can't detect the chip when I try using the Debugger (ICD-40) and if I try to just download the program to the chip it says it's an unknown PIC18 device.

Any ideas what might be wrong?

OH, one thing is that where Woody refers to an orange wire, the 6 line I got has a white wire.
RatFink



Joined: 01 May 2004
Posts: 49

View user's profile Send private message

PostPosted: Sun Jun 06, 2004 11:14 am     Reply with quote

Nobody has any ideas?
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

ICDU
PostPosted: Sun Jun 06, 2004 1:40 pm     Reply with quote

I use the ICD-U all the time without any problems. I program 16F876, 877, 18F458 etc.

Things to look out for:
--------------------------

The ICD itself
----------------
1. Start up the ICD app itself and test the ICD. The test will show if the ICD itself is working and if the ICD firmware is up to date.
2. If the firmware is not up to date, allow the ICD to update its own firmware.

Your board
-------------
1. Pins on the target ICD socket:
-----------------------------------
6 - B3 - Optional for debugging
5 - B6 on target PIC
4 - B7 on target PIC
3 - Ground
2 - +5V from target to ICD
1 - MCLR - Connect to target PIC and pull up to +5V ith 47K resistor

2. Avoid connecting B6, B7 to other components on the target board.
3. You do not need to connect B3

In the IDE
-----------
1. Ensure that your app has the appropriate device header file - if the header file is specified for a 18F458 and you are sending the app to a 16F877A, the the ICD will tell you that it cannot find the appropriate chip.
2. If the ICD cannot detect any chip at all then the chip is not powered, or the ICD is connected incorrectly.

Your specific problem
-------------------------
It seems to me like you have got the wrong header file selected in your code or, you are inadvertently selecting the inappropriate compiler (meant for 18F) and your program has a directive that allows it to compile corectly.

Look for these directives:

# ifdef __PCM__
or
# ifdef __PCH__

...to prove whether the program can compile 16F or 18F parts.
RatFink



Joined: 01 May 2004
Posts: 49

View user's profile Send private message

PostPosted: Sun Jun 06, 2004 3:49 pm     Reply with quote

I will check all of that;

More info;

My ICD works fine with my the board that came in my CCS Programing kit, which also has the PIC16F877A chip, in fact I'm using it right now, and the firmware as been updated to current.

Also I've double checked all my connections from the ICD according to the Excercise book "Migrating to your own hardware"

But I will double check all that you mentioned.

Thanx


Quote:
Your specific problem
-------------------------
It seems to me like you have got the wrong header file selected in your code or, you are inadvertently selecting the inappropriate compiler (meant for 18F) and your program has a directive that allows it to compile corectly.


The header file is correct and works fine with my CCS project board.



Quote:

Look for these directives:

# ifdef __PCM__
or
# ifdef __PCH__

...to prove whether the program can compile 16F or 18F parts.


I'm not sure what this means, I'm a noob. Confused
hillcraft



Joined: 22 Sep 2003
Posts: 101
Location: Cape Town (South africa)

View user's profile Send private message Send e-mail Visit poster's website

__PCM__ __PCH__ directives
PostPosted: Mon Jun 07, 2004 12:31 am     Reply with quote

The diective __PCM__ will include the code is within the directives #defines if the PCH (16**) compiler is used.

#ifdef __PCM__
..
...
..
..#endif


The diective __PCH__ will include the code is within the directives #defines if the PCH (18**) compiler is used.

#ifdef __PCH__
..
...
..
..#endif
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