04-09-2008 08:49 PM
04-10-2008 02:37 PM
Hi Stuart-
The 80MHz timebase on the 6602 can be routed directly to the I/O connector via PFI2 or PFI6. This means that you need to write values to the I/O config registers on the first TIO chip.
The 660x manual is a bit cryptic, but the I/O config registers are laid out like this:
PFI[n]-PFI[n+1] -> 0x77C + n*2 (since it is a series of 16-bit r/w registers)
So, PFI2 would be contained in the 16-bit register at 0x77E. PFI6 would be at 0x782.
The actual layout of the register is the same as described in the 660x RLP manual. The bits of interest for this case are the A_Output_Select and B_Output_Select.
In order to select the 80 MHz timebase for PFI2 or PFI6 you should write 0x3 to the appropriate Output_Select field.
FYI- the MHDDK ChipObjects provide bitfield accessors that make the whole process a lot less cryptic. We don't have an example specific to this app, but you can look at the other examples for the method used to access the chipobject structures.
I haven't tested this, but it should work. Let me know if you have any problems.
Thanks-
04-15-2008 04:28 PM
04-15-2008 04:38 PM
04-17-2008 05:01 PM
09-10-2008 11:59 AM
Dear Stuart,
i would like to ask you a favour. Right now I'm busying myself with the ni-6602 card using comedi and rtai. Unfortunately comedi stuff is not very well documented. I'm trying to trigger several counters to generate some synchronous pwm signals. As I understand, you are programming on register level without using any NI-software. Does your programm run under rtai ? Can you send me a copy of your source code, so i could use it as a template ?
Your help would be really appreciated.
Thanks,
Nico