Page 1 of 1

Push button configuration for PICf184580 with SK40C

PostPosted: Tue Aug 30, 2011 9:29 pm
by TCLow
I would like to ask that hows the configuration of push button as input for 18f4580 using SK40C?
And in programming part, I would like to ask that beside BSF TRISA,0 (for example using RA0 as input), what else i should programme in?

Re: Push button configuration for PICf184580 with SK40C

PostPosted: Tue Sep 06, 2011 9:19 am
by ober
Basically is the same for PIC16F and PIC18F, making an IO pin become input is by setting the particular bit in TRISX (X refer to particular port). For analog pin, besides the TRISX, you will need to configure the analog control register, is either ADCON1 or for some model of PIC is ANSEL