DPRG List  

[DPRG] PIC Troubles

Subject: [DPRG] PIC Troubles
From: Chuck McManis cmcmanis at mcmanis.com
Date: Wed Nov 20 21:16:00 CST 2002

At 01:27 PM 7/25/2002 -0700, Eric Sumner wrote:
>I am working with a PIC16F877 processor from Microchip, and it is 
>grounding pin
>#26 (RC7/RX/DT) while I am trying to use it as an input.  Even though it 
>be preconfigured as an input when the chip powers on, I explicitly set the
>TRISC regster and I cannot find any reason for this pin to be grounded.  If
>anyone has any thoughts on this matter, I would be very apreciative.

The MOST common reason this happens is that you try to write a register in 
a different bank, but for some reason RP0 and RP1 are set to the wrong 
bank. This can happen with a poorly written interrupt service routine that 
incompletely restores STATUS.

The second most common way it can happen when you're using the indirect 
register and you accidently decrement it or increment it. That can _easily_ 
happen if you happen to have a symbol in your file that you _think_ you are 
doing INCF      SYMBOL,F but instead because the assembler has assigned 0 
to the value SYMBOL, you are actually doing an INCF   (FSR),F which may be 
another special feature register that turns your pin into an output.


More information about the DPRG mailing list