View previous topic :: View next topic |
Author |
Message |
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
Unable to program 16F877 mcu using ICSP. Please advise.... |
Posted: Thu Jul 20, 2006 4:57 am |
|
|
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
|
|
Posted: Thu Jul 20, 2006 6:01 am |
|
|
With all the information that you have given us, it is your setup. |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
RE: |
Posted: Fri Jul 21, 2006 12:18 am |
|
|
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
|
|
Posted: Fri Jul 21, 2006 6:15 am |
|
|
What programmer are you using? |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
RE: |
Posted: Fri Jul 21, 2006 6:31 am |
|
|
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
|
|
Posted: Fri Jul 21, 2006 6:33 am |
|
|
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
|
RE: |
Posted: Fri Jul 21, 2006 9:48 pm |
|
|
Hi,
Quite right...
thanks
arunb |
|
|
|