Hi,
I need to change a chart after 20 mins, so I am using an interrupt with Timer0, however I can't see how I set the period in the settings window, could somebody help me please ?
cheers
Acestu
Interupt Settings
Moderator: Benj
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Interupt Settings
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Interupt Settings
Hi,
This is what I did.
I use timer two.
Prescaler1:16
Postscaler1:5
Rollover value 32
At32MHz this gives a frequency of exactly 3125Hz
Then use I used counters to make seconds and minutes.
If it does not have to be so precise you can also use Timer0
I have atached the macro I used.
Best Regards:
Uli
This is what I did.
I use timer two.
Prescaler1:16
Postscaler1:5
Rollover value 32
At32MHz this gives a frequency of exactly 3125Hz
Then use I used counters to make seconds and minutes.
If it does not have to be so precise you can also use Timer0
I have atached the macro I used.
Best Regards:
Uli
- Attachments
-
- seconds.fcm
- (3.44 KiB) Downloaded 241 times
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Interupt Settings
Hi Creative,
Thanks for posting the Macro, I have imported it but I can't find it lol
, where does it end up ?
cheers
Acestu
Thanks for posting the Macro, I have imported it but I can't find it lol
![Laughing :lol:](./images/smilies/icon_lol.gif)
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Interupt Settings
Hi Stuart,
I have posted a flowchart that toggles an output every 20minutes using a 19.6609MHz xtal.
With interrupt set at 75.00Hz, this means interrupt macro is accessed 75times evey second = once every 1/75 = 13.33ms
Its always best to choose the lowest interrupt frequency that is rounded to the nearest whole number.
75.00 is perfect!
Martin
I have posted a flowchart that toggles an output every 20minutes using a 19.6609MHz xtal.
With interrupt set at 75.00Hz, this means interrupt macro is accessed 75times evey second = once every 1/75 = 13.33ms
Its always best to choose the lowest interrupt frequency that is rounded to the nearest whole number.
75.00 is perfect!
Martin
- Attachments
-
- 20mins.fcfx
- (8.2 KiB) Downloaded 262 times
Martin
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Interupt Settings
Hi Martin,
Thanks for the chart, I will have a look at it now
cheers
Acestu
Thanks for the chart, I will have a look at it now
![Very Happy :D](./images/smilies/icon_biggrin.gif)
cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Posts: 323
- Joined: Tue Sep 06, 2011 2:54 am
- Has thanked: 166 times
- Been thanked: 26 times
- Contact:
Re: Interupt Settings
Hi Martin Thanks
I see the 19.6609MHz xtal gives some nice interrupt Frequencies and makes things easier.
I am using the Internal Oscillator at 32MHZ , the only Frequency I found that has no decimal point was 3125Hz. I realize it is slowing down the program unnecessarily.
Is there a simpler way to create a 1 Minute counter without External Oscillator, and without using such high interrupt frequency?
Best Regards:
Uli
I see the 19.6609MHz xtal gives some nice interrupt Frequencies and makes things easier.
I am using the Internal Oscillator at 32MHZ , the only Frequency I found that has no decimal point was 3125Hz. I realize it is slowing down the program unnecessarily.
Is there a simpler way to create a 1 Minute counter without External Oscillator, and without using such high interrupt frequency?
Best Regards:
Uli