From owner-freebsd-hackers Tue Nov 11 14:02:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA26732 for hackers-outgoing; Tue, 11 Nov 1997 14:02:57 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from trojanhorse.ml.org (mdean.vip.best.com [206.86.94.101]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA26726 for ; Tue, 11 Nov 1997 14:02:50 -0800 (PST) (envelope-from jamil@trojanhorse.ml.org) Received: from localhost (jamil@localhost) by trojanhorse.ml.org (8.8.7/8.8.5) with SMTP id OAA00372; Tue, 11 Nov 1997 14:02:32 -0800 (PST) Date: Tue, 11 Nov 1997 14:02:32 -0800 (PST) From: "Jamil J. Weatherbee" To: Peter Dufault cc: hackers@freebsd.org Subject: Re: LabPC+ Driver Specifics In-Reply-To: <199711110109.UAA20154@hda.hda.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Can you possibly take a glance at my source in a few days? > There is only one clock on that board. does that mean if you say set AD_MICRO_PERIOD = 10000 and you are reading from 4 of the 8 channels then really each channel is only getting 25 readings per second. (I can't remember of the labpc if internally multiplexed like my board) > > If you have (or are implementing) independent clocks you probably have > (or are implementing) independent FIFOs or other memory channels > and you should handle it as separate instances of the driver, i.e., > as if each is a separate board. Not possible (there is only one clock) and any drivers would have to be cooperating with each other So data acquisiton doesn't start on a labpc channel until the _first_ read, then it is continuous until closing? I was going to have my channels when open not spew any data. when you ioctl() AD_START they start to read at the MICRO_PERIOD rate. when you AD_STOP they stop spewing. Of course if each has its own virtual clock this might not be neccessary. That was my problem in a multiplexed system say you have 3 channels open. channel 1 wants 10hz signal channel 2 wants 20hz signal channel 3 wants 30hz signal then for me you have to do some pretty fancy scheduling stuff and run the 8253 at 60 hz having it go through a scheduling list on each interrupt of which channel to read. Can you explain what the concept of frame means to you in this context? I am currently chaining together each buffer as it comes in and biodone() it when i am finished filling it up (and I AM using QUEUE macros, i finally figured out you were using the structures in your own kind of hacked up way which is fine).. I fear that the labpc can get 8 readings on one interrupt wheras I really only have one port but it is double multiplexed (reading is the two step process of setting a multilplexer address, and letting that settle for 1 click then (thus the external multiplexer signal) then starting a conversion going a click (always more than the 30microsecond conversion time) and reading the result. if I want 48 channels at 10 samples/sec each my clock rate is 960hz for instance.