View previous topic :: View next topic |
Author |
Message |
shawnmulligan Guest
|
Programming the 16F877 and 16F877a |
Posted: Thu Oct 31, 2002 1:38 pm |
|
|
I have been using the 16F877 for a project using MPLAB 5.70 and it works perfectly. HOWEVER, when I try to move over to the 16F877a, the code compiles and programs perfectly but doesn't run. To test things, I wrote a simply program to toggle a pin. On the 16F877 no problem it toggles -- but on the 16F877a the pin doesn't toggle. I'm programming with the Microchip ICD 1. Has anyone seen this? Any Suggestions? Thanks, Shawn
___________________________
This message was ported from CCS's old forum
Original Post ID: 8343 |
|
|
johnpcunningham Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Thu Oct 31, 2002 2:23 pm |
|
|
<font face="Courier New" size=-1>I believe you need to reprogram your code and use the 16F877A.h file instead of the 16F877.f file
There are internal differences (mainly to do with the internal EEPROM being 4 byte write rather than 1 byte write) which means code for one won't necessarily work on the other.
The A version has a newerflash EEPROM unit. The old EEPROM routines do not work with the A version chips. CCS routines like write_program_eeprom() that were compiled for the 16F876 do not work in the 16F876A; therfore you need to recompile your code and make sure that the "A" verion is chosed in CCS compiletion.
JC</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 8348 |
|
|
shawnmulligan Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Thu Oct 31, 2002 2:45 pm |
|
|
Thank you. I've tried that without success. Shawn
:=<font face="Courier New" size=-1>I believe you need to reprogram your code and use the 16F877A.h file instead of the 16F877.f file
:=
:=There are internal differences (mainly to do with the internal EEPROM being 4 byte write rather than 1 byte write) which means code for one won't necessarily work on the other.
:=
:=The A version has a newerflash EEPROM unit. The old EEPROM routines do not work with the A version chips. CCS routines like write_program_eeprom() that were compiled for the 16F876 do not work in the 16F876A; therfore you need to recompile your code and make sure that the "A" verion is chosed in CCS compiletion.
:=
:=JC</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 8351 |
|
|
johnpcunningham Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Thu Oct 31, 2002 3:01 pm |
|
|
Try building a new project wiht the 16F877A and include the same files. See if that fixes it.
JC
___________________________
This message was ported from CCS's old forum
Original Post ID: 8353 |
|
|
shawnmulligan Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Thu Oct 31, 2002 10:09 pm |
|
|
That's an interesting idea. I'll try that tomorrow. Thanks
:=Try building a new project wiht the 16F877A and include the same files. See if that fixes it.
:=
:=JC
___________________________
This message was ported from CCS's old forum
Original Post ID: 8363 |
|
|
Peter H Anderson Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Thu Oct 31, 2002 11:52 pm |
|
|
The PIC16F87xA devices are not supported by the ICD 1. They use a different program algorithm.
Support for the A devices on a PIC Start Plus was only recently released.
Peter H Anderson, <a href="http://www.phanderson.com" TARGET="_blank">http://www.phanderson.com</a>
:=I have been using the 16F877 for a project using MPLAB 5.70 and it works perfectly. HOWEVER, when I try to move over to the 16F877a, the code compiles and programs perfectly but doesn't run. To test things, I wrote a simply program to toggle a pin. On the 16F877 no problem it toggles -- but on the 16F877a the pin doesn't toggle. I'm programming with the Microchip ICD 1. Has anyone seen this? Any Suggestions? Thanks, Shawn
___________________________
This message was ported from CCS's old forum
Original Post ID: 8366 |
|
|
johnpcunningham Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Fri Nov 01, 2002 4:23 pm |
|
|
Thanks!
That is good to know. So does any ICD (1 or 2) support the 16F877A. I read on the Microchip website that the ICD2 "now" supports the 16F877 devices but it does not specify if it is the "A" version, non-A verions, or supports both.
Besides using the PicStart+, do you any of the tools that can debug teh 877A version?
JC
___________________________
This message was ported from CCS's old forum
Original Post ID: 8412 |
|
|
Hian Chew Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Mon Nov 18, 2002 10:21 am |
|
|
I have the same problem, even with the header 16F877A.
The compiled hex and lst files are identical to the one using
16F877. However, when run on both chips, the behaviors are
different. Don't know what seems to be the problems.
CCS still haven't figure out this problem, unless there is
a problem with the chip.
Hian Chew
:=I have been using the 16F877 for a project using MPLAB 5.70 and it works perfectly. HOWEVER, when I try to move over to the 16F877a, the code compiles and programs perfectly but doesn't run. To test things, I wrote a simply program to toggle a pin. On the 16F877 no problem it toggles -- but on the 16F877a the pin doesn't toggle. I'm programming with the Microchip ICD 1. Has anyone seen this? Any Suggestions? Thanks, Shawn
___________________________
This message was ported from CCS's old forum
Original Post ID: 9060 |
|
|
Göran Steen Guest
|
Re: Programming the 16F877 and 16F877a |
Posted: Thu Dec 12, 2002 3:50 am |
|
|
Hi Shawn!
I have the same problem as you had. Have you manage to solve it?
I think there is a bug in write_program_eeprom(), it writes one byte instead of four at a time. When I read from chip with programmer after used write_program_eeprom(), every fourth byte is correct.
Before I start writing my own write_program_eeprom(), please let me know if you have a solution.
/göran
:=Thank you. I've tried that without success. Shawn
:=
:=:=<font face="Courier New" size=-1>I believe you need to reprogram your code and use the 16F877A.h file instead of the 16F877.f file
:=:=
:=:=There are internal differences (mainly to do with the internal EEPROM being 4 byte write rather than 1 byte write) which means code for one won't necessarily work on the other.
:=:=
:=:=The A version has a newerflash EEPROM unit. The old EEPROM routines do not work with the A version chips. CCS routines like write_program_eeprom() that were compiled for the 16F876 do not work in the 16F876A; therfore you need to recompile your code and make sure that the "A" verion is chosed in CCS compiletion.
:=:=
:=:=JC</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 9996 |
|
|
|