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

Unable to program 16F877 mcu using ICSP. Please advise....

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



Joined: 08 Sep 2003
Posts: 492
Location: India

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

Unable to program 16F877 mcu using ICSP. Please advise....
PostPosted: Thu Jul 20, 2006 4:57 am     Reply with quote

Hi,

I am able to program 16F628 16F648A mcus, but I am unable to program 16F877 mcu using ICSP.

I have checked the pins for the correct logic and these are ok.

Please advise what is wrong .....


thanks
arunb
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Thu Jul 20, 2006 6:01 am     Reply with quote

With all the information that you have given us, it is your setup.
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

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

RE:
PostPosted: Fri Jul 21, 2006 12:18 am     Reply with quote

Hi,

Sorry about the sketchy data I provided....

Well here are the details

Power up is done in the following sequence

1. PGM,PGC,PGD = 0 V
2. MCLR = 13.87 V
3. VDD=5 V (Both the pairs)
4. VSS=0 V (Both the pairs)

Note: Sometimes the PGM goes to 0.7 V ... Why ???

A program word is loaded as per the sequence

1. Load Data for Program Memory - 0010
2. The Program Word is clocked out LSB first
3. Begin Program cycle Command- 011000
4. Increment Address- 0110

The configuration Word is read as follows

1. Load Configuration- 000000
2. Configuration Word is Clocked out LSB first
3. Increment Address Command is sent 7 Times ( 0110)
4. Begin Erase/Program cycle is clocked out.

The Program memory is read as follows

1. Read Data from Program memory 0100
2. Data is clocked in LSB first.
3. Increment address- 0110

A Bulk erase is done as follows.

1. Load Configuration command - 000000
2. Increment address 7 times - 0110
3. Bulk Erase Setup 1- 000001
4. Bulk Erase Setup 2- 000111
5. Begin Erase/program cycle- 001000
6. Bulk Erase Setup 1 - 000001
7. Bulk Erase Setup 2 - 000111

8. The programmer is reset. (Power down , delay then power up)
9. Load data for program memory- 0010
10. Load 0x3FFF
11. Bulk Erase Setup 1- 000001
12. Bulk Erase Setup 2 -000111
13.Begin Erase/program cycle-001000
14. Bulk Erase Setup 1- 000001
15. Bulk Erase Setup 2- 000111
16. The programmer is reset


The voltage levels remain the same througout these operations, the programmer may be reset by bringing voltage levels to 0 and then raised as per the sequence given above.

The programmer works well with a 16F628,16F648A but not with 16F877.


thanks
arunb
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Fri Jul 21, 2006 6:15 am     Reply with quote

What programmer are you using?
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

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

RE:
PostPosted: Fri Jul 21, 2006 6:31 am     Reply with quote

Hi,

I made my own programmer , I am trying to use the ICSP technique for programming the 16F877...


thanks
arunb
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Fri Jul 21, 2006 6:33 am     Reply with quote

I'll let someone else take care of this. I don't have time to trouble shoot a home brew programmer but I am about 99.999% sure that it is the programmer.
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

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

RE:
PostPosted: Fri Jul 21, 2006 9:48 pm     Reply with quote

Hi,

Quite right...

thanks
arunb
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