ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Reading the DIO ports on TS-7800

To:
Subject: Re: [ts-7000] Re: Reading the DIO ports on TS-7800
From: "Eric Robishaw" <>
Date: Thu, 7 Aug 2008 23:21:12 -0500
It doesn't appear to be a sleep issue... as I believe usleep calls nanosleep anyhow.
I just can't read the registers any faster than 50hz (see Jim's message if you haven't already).

Eric



On Thu, Aug 7, 2008 at 8:19 PM, charliem_1216 <> wrote:

--- In ts-7000%40yahoogroups.com, 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
> >>>
> >>>
> >>
> >>
> >
>


__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU