Nicolaas Gerhardus Scheepers of ElectronCraft Says:
OK,+
First tip to myself and to you all out there that has problems porting code from the 16F84a to the 16F877 or for that matter to any other MCU.
1. RTFDS - This means "Read The ^#$@%^@#$% Data Sheet"
One big difference between the 16F84 and the 16F877 is the peripherals the 16F877 has extra on board. Some of these peripherals like the A/D needs to have some of the ports setup as analog ports. Microchip in their wisdom decided to make some of the ports analog by default and it took me two weeks to actually find this out.
Use the ADCON1 register to setup the D and E ports as analog or digital. You still have to do all the other setup, do not go and throw your other code out the window.
Let me know how this helped you!!!
P.S. I know we are usually lazy to read the datasheet but I think it is worth your while to take a day or two and thoroughly scan the datasheet before digging in.
| file: /techref/member/NGS-EC-KA7/TipsAndTricks.htm, 2KB, , updated: 2002/10/23 12:27, local time: 2008/8/30 05:02,
owner: NGS-EC-KA7,
38.103.63.61:LOG IN
|
| ©2008 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? Please DO link to this page! Digg it! <A HREF="http://www.piclist.com/techref/member/NGS-EC-KA7/TipsAndTricks.htm"> member NGS-EC-KA7 TipsAndTricks</A> |
| Did you find what you needed? |
|
o List host: MIT, Site host massmind.org, Top posters @20080830 Apptech, Jinx, Xiaofan Chen, olin piclist, Alan B. Pearce, Vitaliy, William \Chops\ Westfield, Tamas Rudnai, Cedric Chang, David VanHorn, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Shultz Electronics, Timothy Weber, on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
|
.