AnsweredAssumed Answered

RA4 pin as digital output for PIC18F46K22

Question asked by Mihaita Ivascu on Mar 14, 2016



    I'm having the following issue: a board with PIC18F46K22 for which RA4, RD4 and RD5 were selected as digital outputs for driving some LEDS.

     I can set LEDs on/off for RD4/5 digital outputs but cannot do it for RA4. I program correctly PORTx, TRISx and LATx registers. I do same operations for the 3 pins but I cannot drive RA4 at all. Now there are two aspects:


i) according to PIC18F46K22 datasheet RA4 is multiplexed with TCKI and CCP5. If CCPR5 is output and RA4 is also output then CCP5 has priority so I disabled CCP5. I'm using TCON0 timer so cannot do too much related to TCKI. Is there something additional that needs to be done when configuring RA4 as digital output for PIC18F46K22 ?

ii) I have read that for other PICs RA4 was open drain and needed a pull-up resistor but it is not stated in PIC18F46K22 datasheet that RA4 is open drain. Could there be a mistake in PIC18F46K22 datasheet ?


Thanks in advance,

           Mihaita Ivascu