PDA

View Full Version : 16F877A to 16F887 Migration



enigma
- 10th May 2008, 21:10
Hi All

I`m sure I`ve missed something here, What do i need to set up on an 887 thats different to a 877A?. I`ve set ADCON1=7 but I have a feeling there is something else I need to set for the B port for that to also be digital?. Are there any other registers I`ve missed, there seem to be an awful lot on this chip

Cheers Pete

Darrel Taylor
- 10th May 2008, 21:42
ADCON1=7 has no affect on the 887's analog pins.

And for PORTB to be digital, you need to disable the analog functions on those pins.

16F887 Datasheet
http://ww1.microchip.com/downloads/en/DeviceDoc/41291E.pdf

Look for ANSELH.
<br>

enigma
- 10th May 2008, 22:27
Hi Darrel

I had a feeling it was something simple. I had put in ANSEL = 0 for the A port but quite missed the fact that the B port also comes up in Analog too, ANSELH = 0 seems to have cured it as it was the RTC on port b that was causing the problem, many thanks!. Assuming you have had some experience on this chip do you happen to know if the internal osc on its default 8MHz is stable enough for 9600 serial transmission?

Cheers Pete

Darrel Taylor
- 10th May 2008, 22:51
The 8mhz internal oscillators are better than the older 4mhz ones, usually they are +/-1%.
At room temperature they work great for serial rates even higher than 9600.

But, if there are large temperature swings involved, it can go up to +/-2.5% which is too high for reliable serial comms.
<br>