- From: Steve Sharples <sds_at_eee.nottingham.ac.uk>
- Date: Wed, 7 Apr 2004 10:12:55 +0100 (BST)
Sorry, this message got delayed outgoing at my end... I thought it might have been rejected by the mailing list (because my "Reply-To:" header is different from my "From:" header or something silly like that) so I sent another one yesterday (except without the 8255 question). Sorry for any confusion! I sussed out the 8255 option (so no help needed with that anymore), and I'm still working on the "burst mode" emulation. The Amplicon PCI230 card doesn't have "native" burst mode->DMA capabilities, however initial testing using one of the 8254 counter/timers to produce a gate pulse of exactly the right length to get the correct number of channels (ie the number of channels in a scan) seems to work well. Once I've tested thoroughly and tidied up, I'll submit it for a driver update. I also found what I think is a bug in the interrupt handler, which meant that if an interrupt from another card (on the same line) occurred whilst a genuine amplc_pci230 interrupt was being serviced, the amplc_pci230 interrupts would never be re-enabled. Once I'm absolutely sure I've fixed this correctly (this interrupt and drivers stuff is all new to me, I'll admit) I'll submit (probably a separate) fix for the driver. I only found this out because my A/D card shares the same interrupt as the world and it's dog in my PC. Thanks for the advice so far about getting the driver to do what I want it to... any more ideas? Cheers! Steve. On Fri, 2 Apr 2004, Steve Sharples wrote: > Hello there, > > I have a question that I'm sure can be answered very easily by someone, > and I'm after opinions about a sensible approach to adding extra > functionality to a driver that's already been written by someone else > (amplc_pci230). > > (1) Simple question > > First the simple question. I've checked the docs and code as far as I can, > but to be honest I'm really confused by all the configuration/compilation > options on a big project such as comedi. > > I'd like to include support for the 8255 DIO subdevice on my amplicon > PCI230 board. This seems to already be included in the amplc_pci230 driver > code; however, because "CONFIG_COMEDI_8255" or "CONFIG_COMEDI_8255_MODULE" > is not defined, a dummy "this isn't configured" function is used instead. > > Where do I define the CONFIG_COMEDI_8255 flag? Is this within the > amplc_pci230 driver, or within the compiler configuration? > comedi-0.7.67/Documentation/Configure.help gives lots of useful help about > which flags need to be defined to include which bits of code, but where do > you add these flags? I presume the 8255.o module must be insmod'ed too... > or if CONFIG_COMEDI_8255 is set does modprobe magically know it's needed > when you insmod amplc_pci230.o? I'm sorry if that all seems like a set of > really dumb questions. > > > (2) Opinions sought > > We have an Amplicon PCI230 data acquisition card, and our analogue data > acquisition requirements include the ability to take data from a list of > analogue channels in what I've previously been calling "triggered burst > mode." This is when an external event (a digital line going from low to > high) triggers the acquisition of a set list of channels, as fast as the > board can acquire them. Once all channels in the list are done, the board > waits for the next external trigger event. > > The comedi command structure seems to allow this using: > start_src TRIG_NOW > scan_begin_src TRIG_EXT > convert_src TRIG_TIMER > scan_end_src TRIG_COUNT > stop_src TRIG_COUNT > > However, only TRIG_FOLLOW is "allowed" for scan_begin_src in > amplc_pci230.c > > I plan to add scan_begin_src=TRIG_EXT functionality in one of 2 ways: > > (1) use one of the 8255 port C lines as the GATE input to the 8254 > counter/timer that's providing the convert clock pulses. This will require > an external pulse of the correct length (at least as long as the time > required to sample all the channels on the channel list) and some > mechanism for ensuring that the next scan doesn't begin before the next > external gate pulse is applied. > > (2) using the EXT CLOCK input line to trigger one of the 8254 > counter/timers to produce a pulse of the correct length, which is then > applied to the GATE input of the counter/timer that's providing the > convert clock pulses. > > The second method seems more rugged... what to people think? Is this the > right way to go about doing this? Has anyone got any advice? Is this how > it's done in other drivers, or am I missing a trick? > > Any help much appreciated! > > Cheers! > > Steve Sharples. > > > _______________________________________________ > comedi mailing list > comedi_at_comedi.org > https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi > <snip>
Received on 2004-04-07Z08:12:55