Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What is tick?

794 views
Skip to first unread message

이상문

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
Hi! I am Sang-moon, Lee , Korea.
I am recently beginning to use Tornado and VxWorks.
I have an oportunity to program something in VxWorks.
There is a function, taskDelay() in VxWorks system calls.
This function requires a parameter, ticks.
But, I don't know the details of tick, well.
How long is tick?
Thank you for reading my question.

Robert Armstrong

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
A tick is a single beat of the system clock. The system clock defaults to 60Hz
but can be changed with sysClkRateSet() or read with sysClkRateGet(). This
goes back to the days when computers in the US used the mains frequency to
trigger the system clock. I used 100Hz because a 10ms was more sensible to
me when working out delays and such.

Bob

In article <7desh4$89f$1...@green.kreonet.re.kr>, "이상문"

mren...@my-dejanews.com

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
In article <7desh4$89f$1...@green.kreonet.re.kr>,
"이상문" <mo...@palgong.kyungpook.ac.kr> wrote:
> Hi! I am Sang-moon, Lee , Korea.

Hello,

> I am recently beginning to use Tornado and VxWorks.

me too :-)

> There is a function, taskDelay() in VxWorks system calls.
> This function requires a parameter, ticks.
> But, I don't know the details of tick, well.
> How long is tick?

A tick reflects the system clock cycle. It can be set by using
sysClkRateSet(), the parameter ticksPerSecond reflects the number of clock
interrupts per second. That value shouldn't be too high, else your processors
will be busy servicing timer interrupts. If clockrate is set to 100
ticksPerSecond and you want to delay a task for one second, you will have to
call taskdelay (100).

> Thank you for reading my question.

Regards,
MR


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Daniel Wong

unread,
Mar 26, 1999, 3:00:00 AM3/26/99
to
A "tick" is the period between system clock interrupts. The default
system clock rate is 60 Hz, hence the corresponding tick value is 16.67
milliseconds. In function calls that ask for ticks you give it an
integer number of ticks.

E.g., taskDelay(1) would delay for one tick. If the clock rate is 60 Hz
then the delay would last for 16.67 ms.

Hence you can't use taskDelay() to delay for finer granularity than the
system clock rate allows. This also applies to other functions that
need integer "ticks". You can change the value of a tick by changing
the system clock rate. There are other details to take care of if you
go down this road.

To make a clock rate independent task delay of one second you can do
something like taskDelay( sysClkRateGet() );

"이상문" wrote:
>
> Hi! I am Sang-moon, Lee , Korea.

> I am recently beginning to use Tornado and VxWorks.

> I have an oportunity to program something in VxWorks.

> There is a function, taskDelay() in VxWorks system calls.
> This function requires a parameter, ticks.
> But, I don't know the details of tick, well.
> How long is tick?

> Thank you for reading my question.

--
Daniel Wong Principal System Engineer
Lockheed Martin Ocean Radar and Sensor Systems
Electronics Park EP7-333 Syracuse, NY 13090
(315)456-2162 [FAX (315)456-1430]
------------------------------------------------------------------------
Blessed is the man who always fears the Lord,
but he who hardens his heart falls into trouble. -- Proverbs 28:14

0 new messages