PDA

View Full Version : open drain output as digital output?



droptail
- 8th November 2006, 05:15
Will a port pin that is an "open drain output" support a SEROUT command?
The pin in question RA4 is multiplexed with a Timer0 module clock input. Can it still be used as a digital pin?

Will a SEROUT command set the pin digital output even if the pin was previously set as analog input?

Jerson
- 8th November 2006, 05:52
Sure this does not apply generally to all Pics. Can you specify the device you talk about?

Jerson

droptail
- 8th November 2006, 07:03
Microchip PIC16C716

Dave
- 8th November 2006, 20:37
droptail, just use a pullup resistor of about 2.7k to 4.7k.

Dave Purola,
N8NTA

mister_e
- 9th November 2006, 03:34
Will a port pin that is an "open drain output" support a SEROUT command?

Yes for sure, use Dave's suggestion.



The pin in question RA4 is multiplexed with a Timer0 module clock input. Can it still be used as a digital pin?

Yes



Will a SEROUT command set the pin digital output even if the pin was previously set as analog input?

Nope, this is also why we see many question about that. Always make sure you disable multiplexed stuff(when possible) on an i/o before using it.

ADCs/analog comparator are popular.

droptail
- 9th November 2006, 17:33
I have success with 1k hold up for now.
I also have no problems for years with SEROUT command working on a port pin set as analog and input, why?

TRISA =255 'all PortA Inputs
ADCON1 =0 'all PortA Analog

SerOut PORTA.0,N2400 ...

droptail
- 10th November 2006, 01:37
Thank you both for your help.

mister_e
- 10th November 2006, 03:11
Probably at slow baudrate it may work... but i will never trust or use that.