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 support@ccsinfo.com

12F508 - interrupt on change

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







12F508 - interrupt on change
PostPosted: Sat Feb 27, 2010 5:59 am     Reply with quote

I have 12F508 which is generating 2 frequencies with different duty cycle. I have two inputs on pins GP4 and GP5. For the different configurations on inputs, I must output different frequency on the output. So I need a code how to set up interrupt routine on pin change (in this routine I will read the inputs and determine which frequency to generate).

Thank you !

Best regards,
Ivailo
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Feb 28, 2010 12:38 am     Reply with quote

Quote:

So I need a code how to set up interrupt routine on pin change (in this
routine I will read the inputs and determine which frequency to generate).

The 12F508 doesn't have any interrupts. Download the data sheet
and search for the word "interrupt". You won't find it.
http://ww1.microchip.com/downloads/en/DeviceDoc/41236E.pdf
So if you want to check those pins for user input, you will have
to poll them (i.e., read them at a periodic interval).
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