
Addicted to electronics, microcontroller, LED Dot Matrix, Led 7-Segment, PIC Digital Clock, Digital Watch, Led Dot Matrix Clock, Led Dot Matrix Watch, GPS and other DIY projects. Short notes about my PIC Microcontroller experiments sometimes it's just a short note sometimes it's a full PIC Microcontroller Project. The information here including source code and schematic are available for FREE, please contact me if you want the source files of the schematics/PCBs.
Thursday, October 16, 2008
Open-Drain RA4 pin on PIC Microcontroller
I had a problem with RA4 pin which I cound not send '1' nor output 'high' to this pin. After some searches, I have found that RA4 pin (pin 3 for PIC16F627a) is "Open-Drain" type output pin. That means it cannot source current and it will be high impedance when assigned logic '1' to it. I cannot set this pin as an output pin by using 'TRISA=0x00'. The solution is attaching a pull up resistor (10K) to the RA4 pin in order to use this pin as an output pin.

thank you so much!I was in really big trouble before reading your article!
ReplyDeleteFirst of all thanks for the article! Actually it would be much better if you could configure each pin as open drain explicitly.
ReplyDelete