Push button configuration for PICf184580 with SK40C

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Push button configuration for PICf184580 with SK40C

Postby TCLow » Tue Aug 30, 2011 9:29 pm

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?
TCLow
Fledgling
 
Posts: 1
Joined: Tue Aug 30, 2011 9:25 pm

Re: Push button configuration for PICf184580 with SK40C

Postby ober » Tue Sep 06, 2011 9:19 am

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
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 2 guests

cron