Page 1 of 1

clock speed T0 EICO-28

Posted: Mon Mar 19, 2012 10:34 am
by jadiflow
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

Re: clock speed T0 EICO-28

Posted: Mon Mar 19, 2012 11:07 am
by medelec35
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

Re: clock speed T0 EICO-28

Posted: Mon Mar 19, 2012 6:01 pm
by jadiflow
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

Re: clock speed T0 EICO-28

Posted: Tue Mar 20, 2012 9:41 am
by jadiflow
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

Re: clock speed T0 EICO-28

Posted: Tue Mar 20, 2012 12:59 pm
by Benj
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.

Re: clock speed T0 EICO-28

Posted: Tue Mar 20, 2012 3:50 pm
by jadiflow
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