Hi,
I have a question on the clock speed for an EICO-28 Timer0. According to the data sheet, the internal selected clock will be Fosc/4. Since the EICO has a 4Mhz oscillator, that would be a 1uS clock.
However, when configuring T0 in a Flowcode 5 INT block, the internal clock selection available is CLK0 Internal clock shown as 48Mhz, which is the internal instruction clock.
So which is it? Anybody used this and knows?
thanks,
jan didden
clock speed T0 EICO-28
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: clock speed T0 EICO-28
Hi jan,
EICO-28 will use PLL function which will multipy the oscillator to 48MHz.
With a prescaler of 1:1 the interrupt frequency of 46875Hz is correct.
(40MHz/4/256)
Martin
EICO-28 will use PLL function which will multipy the oscillator to 48MHz.
With a prescaler of 1:1 the interrupt frequency of 46875Hz is correct.
(40MHz/4/256)
Martin
Martin
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: clock speed T0 EICO-28
Thank Martin,
So, counter clock trigger will be 10Mhz meaning that with a 1:256 prescaler there will be a T0 counter clockpuls every 25.6uS.
So, using the full counter width of 16 bits, that means a clock roll-over after a maximum of 1.677 Seconds.
Yet Flowcode mentions an interrupt freq of 183 Hz. Hmmmm. What's wrong with my reasoning?
jan
So, counter clock trigger will be 10Mhz meaning that with a 1:256 prescaler there will be a T0 counter clockpuls every 25.6uS.
So, using the full counter width of 16 bits, that means a clock roll-over after a maximum of 1.677 Seconds.
Yet Flowcode mentions an interrupt freq of 183 Hz. Hmmmm. What's wrong with my reasoning?
jan
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: clock speed T0 EICO-28
I think what the int freq in the component dialog gives is the int freq assuming you use the timer as an 8-bit timer.
That would indeed give 183 Hz with a 48MHz osc freq.
It's clear to me now. But it might confuse people if they use a 16-bit timer and not immediately realise that the info given assumes an 8-bit timer.
Maybe something for a future update?
jan
That would indeed give 183 Hz with a 48MHz osc freq.
It's clear to me now. But it might confuse people if they use a 16-bit timer and not immediately realise that the info given assumes an 8-bit timer.
Maybe something for a future update?
jan
- 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: clock speed T0 EICO-28
Hi Jan,
Hm that's an interesting one. We always assume that timer 0 is 8-bit, timer 1 is 16-bit and timer 2 is 8 bit etc... This is normally the case except where you have the extra option between 8 or 16bit functionality on timer0 like on the 2455 family.
I will make a note about looking into this but I cannot see us changing the way the timer interrupts work in the near future as this requires a huge amount of effort to get right for all the devices and we have other more pressing things to be upgrading or working on that would yield better benefits to the users. I could be wrong about this though, if it is easy I will try and fit it in somehow.
Hm that's an interesting one. We always assume that timer 0 is 8-bit, timer 1 is 16-bit and timer 2 is 8 bit etc... This is normally the case except where you have the extra option between 8 or 16bit functionality on timer0 like on the 2455 family.
I will make a note about looking into this but I cannot see us changing the way the timer interrupts work in the near future as this requires a huge amount of effort to get right for all the devices and we have other more pressing things to be upgrading or working on that would yield better benefits to the users. I could be wrong about this though, if it is easy I will try and fit it in somehow.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 273
- Joined: Thu Apr 17, 2008 9:59 am
- Has thanked: 19 times
- Been thanked: 16 times
Re: clock speed T0 EICO-28
Hi Ben,
I believe a simple note on the dialog form would go a long way to make people aware.
Once you are aware it becomes a non-issue.
BTW Let me take this opportunity to compliment you guys with V 5.
The addional drop-down windows with macros, variables, constants, auto FC to C label conversion etc are huge time savers.
Definitely worth the upgrade price!
jan
I believe a simple note on the dialog form would go a long way to make people aware.
Once you are aware it becomes a non-issue.
BTW Let me take this opportunity to compliment you guys with V 5.
The addional drop-down windows with macros, variables, constants, auto FC to C label conversion etc are huge time savers.
Definitely worth the upgrade price!
jan