CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

selection working mode on pin

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest
Guest







selection working mode on pin
PostPosted: Sun Mar 27, 2005 7:03 am     Reply with quote

How to use just one option of one pin?
e.g.
RB0 / INT

I want to use / define just RB0....
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Sun Mar 27, 2005 8:21 am     Reply with quote

Hello,

If you read carefully the datasheet, (Microchip PIC16F87x Datasheet, Page 7)
you will notice that most PINS share multiple functions wich are inherent
to the internal functional modules inside the PIC core.

In this case, RB0/INT means that the portB PIN RB0 can be used as
EXTERNAL INTERRUPT PIN. To activate this functionality you must enable
the corresponding interrupt bit INTE(INTCON.4) (0x0B) (see Page 16)

Using the CCS Compiler this is done with the built in function
enable_interrupts(INT_EXT)
You know that this forum it's not a PIC school, the best way to start
learning is using and preferably reading a book Very Happy

http://www.piclist.com/techref/microchip/books.htm

Best wishes,

Humberto
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Sun Mar 27, 2005 8:23 am     Reply with quote

Access it via a stuct
or define it as a #bit
take a look at the input(), output_high(), output_low() functions
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group