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

PIC16F526 - Timer Interrupts - Are they possible?

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



Joined: 08 Jul 2009
Posts: 24

View user's profile Send private message

PIC16F526 - Timer Interrupts - Are they possible?
PostPosted: Tue Jul 28, 2009 9:22 am     Reply with quote

I'm attempting to implement a timer0 interrupt, but it's looking (according to the datasheet) like this may not be possible. Is there a way to create an RTC ISR without using the WDT?
adesport



Joined: 03 Apr 2008
Posts: 18
Location: France

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 10:02 am     Reply with quote

Hi,

The datasheets shows that there is no interruption features on this PIC.
dossdev



Joined: 08 Jul 2009
Posts: 24

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 10:04 am     Reply with quote

Too bad I didn't notice that when I selected the part. Well maybe I can use the WDT as pseudo timer ISR?
adesport



Joined: 03 Apr 2008
Posts: 18
Location: France

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 10:09 am     Reply with quote

The WDT will restart your PIC once it'll time out.
You can't catch the interruption and write your own ISR.

Sorry Arrow
dossdev



Joined: 08 Jul 2009
Posts: 24

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 10:25 am     Reply with quote

Thanks for your help adesport. Fortunately there appears to be a migration path up to other pin compatible devices like the 16F616 and 16F676.
bungee-



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 10:33 am     Reply with quote

I was looking at datasheet and this controller does not have ANY interrupts. I would recomend to you to use another PIC.

If you are limited with "space" then you can use PIC16F684, it has all interrupts you need and more Wink
adesport



Joined: 03 Apr 2008
Posts: 18
Location: France

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 10:34 am     Reply with quote

Microchip guys work (Cool) hard to keep compatibility which allows PIC switching easly.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 12:24 pm     Reply with quote

This thread has sample code that shows how to use Timer0 for
multi-tasking, without using interrupts.
http://www.ccsinfo.com/forum/viewtopic.php?p=101541
dossdev



Joined: 08 Jul 2009
Posts: 24

View user's profile Send private message

PostPosted: Tue Jul 28, 2009 12:54 pm     Reply with quote

Thanks PCM, you've always got great info - really appreciate it. I was hoping to not have to change micros. The alternate parts with interrupts cost a few dimes more. Seems my customers always want as cheap as possible. I'll give your approach a try. It seems like it just might fit my application. Thanks again!
adesport



Joined: 03 Apr 2008
Posts: 18
Location: France

View user's profile Send private message

PostPosted: Wed Jul 29, 2009 1:53 am     Reply with quote

Aha, nice! Very Happy
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