Recently I fried my old 16F877 so I ordered a replacement from Mouser. They sent me the 16F877A because that is what I ordered. It looked like according to them the direct replacement. Admitily I didn't pay much attention to the "A" on the end. I replaced it on my board from Futurlec and sent the blink.bas program down to it and I got nothing. At first I attributed that to the fact I didn't change the pic type in microstudio to a 16F877A so I did, recompiled, reprogrammed with winpic8000 and still nothing. I found this thread on this forum and noticed the initialization this person was using for their 16F877A was different specifically the type of oscillator. So I changed my settings to match those exactly and reprogrammed and it worked! I took a look at the data sheet to see what was the difference and how could I tell in the future which one of those oscillator types I should pick and I don't see anything directly in the data sheet that would explain why one worked over the other when the crystal and nothing else about the osc actually changed. I see were it talks about the different osc types in the datasheet but nothing reflects why one over the other with regards to the 2 different types of pics the 877 vs. the 877A. Did I miss were it tells me which setting I should pick or is this just a trial and error on the LP , XT or HS setting. I think the last one of RC would be obvious not to try unless you were actually using a resistor and capacitor. Is table 12-2 a good guidance for what setting to try within the range of the osc being used?
The crystal I am using on that futurlec board is 10mhz
Other then that my program on my pic is small I am using this to monitor a pressure transcuer on RA0 and I have a couple of small TTL relays being tripped on RA1 and RA2 and then I have one push button set up on RB0 (I've not tested the button yet on this 877A I plan to in a minute) so far everything is working find as designed and written.
Is there any other gotchas I should be aware of that I may have overlooked switching from the 877 pic to the 877A?
Thanks
David
Bookmarks