Getting lower resolution on QNX4

Hello,
Is it possible to get the time with greater accuracy then the .5
milliseconds set by ticksize?
If not, are they any real time clock cards supported by QNX 4.25?
Thanks in advance,

Chris

Chris Nasr wrote:

Hello,
Is it possible to get the time with greater accuracy then the .5
milliseconds set by ticksize?

Well, yes there is; and you can get this greater resolution by using
ticksize.

If you do a “use ticksize” you’ll notice that there is a “-e” option.
This option allows you to specify a ticksize in nano seconds. Course,
you ain’t gonna get 1 nanosecond resolution, but I have quite often used
a 100 usec tick size, and I think this is quite reasonable on anything
over 500 Mhz.

If not, are they any real time clock cards supported by QNX 4.25?
Thanks in advance,

Sure there are. Even the built-in real-time clock is “supported” by QNX
4.25 (where “supported” means that you can write a driver for it :slight_smile: I
have written code for the DS12887 on a few projects (it’s about 15
minutes worth of work). The fastest it goes is 8Khz.

Sure there are. Even the built-in real-time clock is “supported” by QNX
4.25 (where “supported” means that you can write a driver for it > :slight_smile: > I
have written code for the DS12887 on a few projects (it’s about 15
minutes worth of work). The fastest it goes is 8Khz.

Well yes, but I don’t know much about writing drivers, I was sort of
hoping there would be a driver already made. However, setting ticksize
in nanoseconds should do what I need, frankly I’m ashamed I didn’t see
that on my own.
Thanks for the help.

Chris

well - I tried this now on an acer notebook and came down to .1
milliseconds!
this will be shown even with a simple “ticksize” command:

ticksize
ticksize: 0.1 milliseconds

Super!
Jörg

Chris Nasr schrieb:

Sure there are. Even the built-in real-time clock is “supported” by QNX
4.25 (where “supported” means that you can write a driver for it > :slight_smile: > I
have written code for the DS12887 on a few projects (it’s about 15
minutes worth of work). The fastest it goes is 8Khz.

Well yes, but I don’t know much about writing drivers, I was sort of
hoping there would be a driver already made. However, setting ticksize
in nanoseconds should do what I need, frankly I’m ashamed I didn’t see
that on my own.
Thanks for the help.

Chris


============ lat=52.35°N - lon=10.25°E ================================
Dr. Jörg Kampmann - IBK-Consult for Real-Time and Embedded Systems
D-31228 Peine - Tel.:+49-177-276-3140 - Fax: +49-5171-13385
http://www.ibk-consult.de
===== QNX is the better Choice for Real-Time: http://www.qnx.com ====

Chris Nasr <cnasr@mechtronix.ca> wrote:

Hello,
Is it possible to get the time with greater accuracy then the .5
milliseconds set by ticksize?
If not, are they any real time clock cards supported by QNX 4.25?
Thanks in advance,

Are you looking for accurate timeouts or accurate time stamps?

If looking for accurate time stamps, and running on Pentium class
and above, using the rtdsc op code to read the free-running counter
can give very good time stamps.

Doing a search on qdn for, I think, micro-time or something similar
should find an archive with sample code for this.

The disadvantage of dropping your ticksize is that you add interrupt
overhead – if you don’t need it, it is best avoided.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.