- From: Nick Iorio <niorio_at_jmar.com>
- Date: Mon, 20 Dec 2004 08:49:20 -0800
I've posted this question at comedi.org and not received a response. My boss keeps bugging me to get this external clock code working but I don't know how to do it. I found a reference to this INSN_CONFIG_TIMER_1 since I sent this email which helps some but still leaves a lot of questions. Now, I guess the data structures should look like: data[0]=INSN_CONFIG_TIMER_1; data[1]=COMEDI_EV_SCAN_BEGIN; correct? data[2]= ??? trigger negative edge (digital, not analog trigger) data[3]=0x04; data[4]=??? divisor for 10Mhz clock insn[1].insn=INSN_CONFIG; insn[1].n=n_scan; insn[1].data=data; insn[1].subdev=subdevice; insn[1].chanspec=INSN_CONFIG_TIMER_1; As you can see I'm still guessing on some of this. If there's any documentation that would help me please point me to it. thanks - Nick Iorio -------- Original Message -------- Subject: Re: PCIDAS 4020/12 ext trigger/clock Date: Mon, 13 Dec 2004 09:08:47 -0800 From: Nick Iorio <niorio_at_jmar.com> To: Frank Mori Hess <fmhess_at_users.sourceforge.net>, comedi_at_comedi.org References: <419E2C60.50700_at_jmar.com> <200411201143.04840.fmhess_at_users.sourceforge.net> Hi Frank, I've been reading the documentation on this and I understand the TRIG_OTHER but am having a hard time figuring out how I code for the external clock. I don't know what you meant by "using an INSN_CONFIG_TIMER_1 configuration insn to configure the divisor to use for the external clock." Could you give me the rest of the insn code I need to define an external clock of 10Mhz? I'm adding a 4th instruction (before the INSN_READ) to the example insn.c code wihch so far looks like this: insn[1].insn=INSN_CONFIG; insn[1].n=n_scan; insn[1].data=data; insn[1].subdev=subdevice; insn[1].chanspec=INSN_CONFIG_TIMER_1 ??? thanks - nick Frank Mori Hess wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >On Friday 19 November 2004 12:24 pm, Nick Iorio wrote: > > >>I have a PCIDAS 4020/12 which has an external trigger connected to the >>BNC and an external clock connected to pin 10 of the 40 pin connector. >>How do I reference these in comedi? >>thank you - nick >> >> > >It looks like the comedilib docs haven't been synced with the drivers >recently. This quote may help: > >To select the bnc trigger input on the 4020 (instead of the dio input), >specify a nonzero channel in the chanspec. If you wish to use an external >master clock on the 4020, you may do so by setting the scan_begin_src >to TRIG_OTHER, and using an INSN_CONFIG_TIMER_1 configuration insn >to configure the divisor to use for the external clock. > >- -- >Frank > >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.2.4 (GNU/Linux) > >iD8DBQFBn3QU5vihyNWuA4URAqcaAJ0Ufj/1B3P62MUfaiTyXC1IXf203gCgtKCz >O/dT+rXIBqcDx/lRYy0Ie+c= >=ONea >-----END PGP SIGNATURE----- > >_______________________________________________ >comedi mailing list >comedi_at_comedi.org >https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi > >
Received on 2004-12-20Z16:49:20