How to use BOTH timers?

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Drakkor
Posts: 41
Joined: Sun Dec 30, 2012 9:34 pm
Has thanked: 5 times
Been thanked: 4 times

How to use BOTH timers?

Post by Drakkor »

Hi.. I am using a pic12f675. I want to know how to use both timers if that is possible? I am not sure that I even need to but I am using an interrupt on pin change to read PWM which needs to keep an accurate count. I started this project to make a switch to turn things (Lights) on and off on an RC plane. Now that I have figured that out, I want the program to turn on/off a beacon (Rampup/Down) LED and flash two bright white LED's (One function to turn ALL on/off) I have 2 separate projects that work but trying to put them together is the trick. Any help would be appreciated : ) Thanks.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: How to use BOTH timers?

Post by Benj »

Hello,

Are you using Flowcode for this project? Have you tried running both programs together already? The timers should both be usable in your program.

Drakkor
Posts: 41
Joined: Sun Dec 30, 2012 9:34 pm
Has thanked: 5 times
Been thanked: 4 times

Re: How to use BOTH timers?

Post by Drakkor »

Benj, Thanks for the fast reply. Yes, I am using Flowcode 5. I have not yet put the two programs together into one. I think I have to manually add all the code to make it into one program right? I am not sure if or how to designate timer 0 for counting the PWM and timer 1 to count for the ramping up/down LED's (Looks like an aircraft beacon), and, the flashing strobe light (Bright white LED.) I could put the codes here but I am at work right now : (

Post Reply