--- In Jim Jackson <> wrote:
>
>
>
>
> On Thu, 7 Aug 2008, Eric Robishaw wrote:
>
> > Hmm...
> >
> > Outside of rebuilding the kernal (I'm new to Linux, not ready to
tackle
> > that), do you think it possible to get around by creating 2
threads to read
> > the io. Of-course that produces all sorts of programming
challenges like
> > race conditions, etc... but in theory at-least?
>
> No dice. How are you getting the timing? If the system clock only
has a
> resolution of 100Hz (10msec) then that's the resolution in
userspace.
>
> I'm sure there are spare hardware timers, you could write a kernel
module
> to do what you want. One was written for the ts7200 (2.4 kernel)
to get ADC
> values at frequencies > 100Hz. It's on the group web page. It
could be used
> as a starting point for a ts7800 module. There maybe other
examples around.
Are high resolution timers enabled in the TS-7800 kernel? You can
check by 'cat /proc/timerlist | grep resolution'. If resolution is
1 nSec, then HRT timers are available, and you can use nanosleep.
See http://elinux.org/High_Resolution_Timers for more info.
regards .... Charlie
>
> Jim
>
> >
> > On Thu, Aug 7, 2008 at 3:45 PM, Jim Jackson <> wrote:
> >
> >>
> >>
> >> On Thu, 7 Aug 2008, eric.robishaw wrote:
> >>
> >>> I've created a fairly complete example on reading the DIO
ports (and /or
> >>> LDC) of the TS7800.
> >>>
> >>> Allows the 7800 to work as a "medium speed" pulse counter.
> >>>
> >>> * Using a pulse generator I determined that the max I can read
is
> >>> exactly 50hz.
> >>> * Because this number is so precise and even, it which makes
me think
> >>> there's some kind of hardware, or driver limiter.
> >>
> >> That's a FAQ - it crops up on the list periodically.
> >>
> >> The basic kernel timing interval is that produced by the 100Hz
timer
> >> frequency of the kernel. It's not specific to the TS products,
though
> >> modern Intel/AMD based systems have a system clock of 1000Hz.
> >> It is configurable when you build the kernel you run.
> >>
> >> Google should throw up more explanation.
> >>
> >>> * Reading at the max speed produces no more than 1% cpu load.
>
> >>> You can find the code here:
> >>> <http://home.greenrain.us/ts-7800-codeworks/7800DIO>
> >>> http://home.greenrain.us/ts-7800-codeworks/7800DIO
> >>> <http://home.greenrain.us/ts-7800-codeworks/7800DIO>
> >>>
> >>>
> >>> Enjoy.
> >>>
> >>> Eric Robishaw
> >>>
> >>>
> >>
> >>
> >
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|