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/e...Doc/41291E.pdf
Look for ANSELH.
<br>
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/e...Doc/41291E.pdf
Look for ANSELH.
<br>
DT
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
Last edited by enigma; - 10th May 2008 at 22:30. Reason: Missed a line out
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>
DT
Bookmarks