PDA

View Full Version : 16F877A Correct set up for port a



enigma
- 29th March 2008, 16:54
Hi all

I`ve just migrated a program over from a 16F648A to a 16F877 and it now refuses to serial in on porta.0. I`m sure this has to be a register not set, I know on the 648A is CMCON=7 for all digital on port A but for the life of me I cant find the relevent info for this device. Does anyone know this offhand?

Cheers Pete

mackrackit
- 29th March 2008, 17:07
Do you have
ADCON1 = 7
someplace in your code. ( I think that is correct for your chip, might be ANSEL )

enigma
- 29th March 2008, 18:19
Hi Dave

I think its still cmcon = 7 which I`m sure is wrong, I`ll try ACCON1 = 1 and see. Its certainly that because the setup works if I apply the serial to portb and recode.


Cheers Pete

Do you have
ADCON1 = 7
someplace in your code. ( I think that is correct for your chip, might be ANSEL )
__________________
Dave

mackrackit
- 29th March 2008, 18:25
What I was getting at is the 877A has analog also.

http://www.picbasic.co.uk/forum/showthread.php?t=561

enigma
- 30th March 2008, 12:00
Hi Dave

Thanks ADCON1 did it, I had a feeling it was coming up in Analog mode I just couldnt find the correct register to set.

Many thanks, Pete