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

Long Interrupt

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



Joined: 19 May 2018
Posts: 27

View user's profile Send private message

Long Interrupt
PostPosted: Sat Feb 15, 2020 6:34 pm     Reply with quote

Trying to find a easy way to create a @ 1 minute interrupt. Must I use multiple shorter interrupts and count them?
Thank You.
jeremiah



Joined: 20 Jul 2010
Posts: 1346

View user's profile Send private message

PostPosted: Sat Feb 15, 2020 8:08 pm     Reply with quote

You could use combination of a slow (like 32kHz) secondary oscillator for one of your timers and also use a clock divider in the setup.

or you can use an real time clock and set an alarm interrupt.

I'm sure there are other options. A lot depends on your PIC and you haven't really given much information.
temtronic



Joined: 01 Jul 2010
Posts: 9225
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Feb 16, 2020 6:57 am     Reply with quote

Have a look at the code here...

http://www.ccsinfo.com/forum/viewtopic.php?t=26177

It's a timer based RTC. You can easily modify to have the ISR set a 'one_minute_flag' that main() would read.

There are dozens of ways to accomplish what you want, but you should post which PIC you're using. Not all PICs have all internal peripherals !

Jay
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