PDA

View Full Version : Can't properly configure RA3,Ra4 as digital out (PIC16F876A)



luxornet
- 4th July 2014, 12:31
Hi!
Please help me to configure RA3 and RA4 as digital out (PIC16F876A). On Proteus simulator all are working fine but not in real world.
I know that RA$ is Digital I/O – Open-drain when configured as output.
I have used:

TRISA = %00000001
ADCON1 = %10001110
cmcon = %00000111

Thank you very much.
PIC16F876A Datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf)

richard
- 4th July 2014, 13:16
can't see anything wrong with your settings ,its only porta4 that's open drain but I assume
RA$ is just a typo
have you tried adcon1=6 just to try a minimal setting ?

maybe if you post your code something will stand out

luxornet
- 4th July 2014, 17:15
Thank you for your answer, richard.
I know that RA4 is Digital I/O – Open-drain when configured as output.
I will try adcon1=6

Archangel
- 4th July 2014, 21:28
can't see anything wrong with your settings ,its only porta4 that's open drain but I assume is just a typo
have you tried adcon1=6 just to try a minimal setting ?

maybe if you post your code something will stand out
He He $, that's a Capital 4 . . . do that myself every now and again . .
Try setting ADCON0 to zero, at least bit zero.

Demon
- 6th July 2014, 16:10
AllDigital will tell you exactly what you need.

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

Robert