gnupic: PIC18F47J53
Subject:
Re: PIC18F47J53
From:
Ian Jackson ####@####.####
Date:
21 Aug 2013 12:12:21 -0000
Message-Id: <21012.44650.102617.288987@chiark.greenend.org.uk>
Marko Kohtala writes ("Re: PIC18F47J53"):
> It is best using LATB for output.
Yes.
> Check your ADCON1. The pin is at reset analog input. PORTB reads digital
> input even while you have TRISB bit cleared. Reading digital input on
> analog input always reads 0 and therefore BTG always writes 1.
Using LATB avoids all of this, because you base your new state on the
last state you asked for without doing any kind of GPIO input.
Ian.