11-08-2009 09:47 AM
Customer wants to use more of the Digital I/O functionality of the PCI-6602 .
They already use successfully the first 8 digital I/O lines of the card (PFI_0 - PFI_7), as inputs, but need to use some additional Digital I/O lines (currently for Outputs).
From reading the 660x User Manual and the Registers Level Programmer Manual, it seems that it may be possible to use the following additional lines for this purpose:
PFI_9
PFI_13
PFI_17
PFI_21
1. Could you instruct us how to use these 4 lines as Digital Outputs? Please note that we use our own device driver ( through RLP ) and have direct access to the card's registers.
Please show us how to enable and disable the output of each of these lines (individually), and how to change each of the line's output logic level.
It would be nice if you could send us a sample program that demonstrates the required steps.
2. In the future, we may want to use some of these lines as Digital Inputs. Could you instruct us how to do this?
3. ) In the future, we may want to use some additional Digital I/O lines. We saw that the card contains 4 additional lines that can function as Digital I/O: PFI_11, PFI_15, PFI_19 and PFI_23.
Could you instruct us how to use these lines, both as Digital Outputs and as Digital Inputs?
Yechiel
11-09-2009
04:54 PM
- last edited on
04-09-2025
05:22 PM
by
Content Cleaner
Hi Yechiel,
I believe it will be possible to show you and your customer how to achieve their goals. As I've posted elsewhere [1], I didn't design the TIO chip, and so I need to speak with a few colleagues to learn more about the routing matrix.
[1] What are the 3-bit field choices for Hw_Arm_Sel in PCI-6601
https://forums.ni.com/t5/Driver-Development-Kit-DDK/What-are-the-3-bit-field-choices-for-Hw-Arm-Sel-...
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
11-17-2009 02:28 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
11-18-2009 02:36 PM
Hello,
We use the first 8 PFI lines (PFI0..7) as digital inputs (We use the STD DIO Parallel Input register to read their values).
We also use PFI lines 10, 14, 18, 22, 26, 30, 34 & 38 (Gates). We drive external signals to these lines. These signals are used to generate interrupts (which are handled by our device driver).
We configure PFI lines 8, 12, 16, 20, 24, 28, 32 & 36 as counter outputs.
All other PFI lines are unused.
We would like to be able to use some of the remaining 12 PFI lines that can be used for Digital I/O (i.e. PFI lines 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31), initially for digital output, and later for digital input (we may also need to use some lines for output and other lines for input).
Our software determines when to write or read the digital I/O lines (not hardware-timed).
Can you send us insructions how to:
1. Enable the DIO output of these PFI lines.
2. Change the output level from low to high, and from high to low.
3. Read from these digital I/O lines.
All using RLP.
Thanks,
Itai
11-19-2009 11:45 AM - edited 11-19-2009 11:54 AM
TO_StrobeReg at offset 0x500
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
11-19-2009 11:46 AM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
11-19-2009
11:48 AM
- last edited on
04-09-2025
05:23 PM
by
Content Cleaner
Phew! So there is all the low-level information you will need to use your left over PFI lines for static DIO. The overall procedure is:
0. Program the direction of the PFI lines as input or output with the IO_Config_Register.
For output:
For input:
[1] NI 660X Register-Level Programmer Manual
https://www.ni.com/docs/en-US/bundle/ni-660x-register-level-programming-features/resource/370505b.pd...
[2] What are the 3-bit field choices for Hw_Arm_Sel in PCI-6601?
https://forums.ni.com/t5/Driver-Development-Kit-DDK/What-are-the-3-bit-field-choices-for-Hw-Arm-Sel-...
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
11-20-2009 08:01 AM
Hello Joe.
Thank you for your answers.
Itai
12-02-2009 02:45 PM
Hello Joe!
"If you write 0d3 (0b10) to the Output_Select field, the line will be programmed as digital output."
we beleive should read: "If you write 0d2 (0b10) to the Output_Select field, the line will be programmed as digital output".
After figuring this out, we successfully programmed a 6602 board to output data from the following PFI lines: 9, 13, 17, 21, 25 & 29 (This is sufficient for now).
We can confirm that it was not necessary to program the TO_StrobeReg and TO_ConfigReg registers.
Note that the 6602 board contains two TIOs, so there exist two TO_InitValReg registers. We used both of these registers (because we were using the I/O Config Registers from both of the TIOs to perform other kind of configuration - Clock Output). We did not try using a single TIO register although we guess it could work this way as well (since there exist a board with a single TIO).
Thank you for your help.
Itai
12-02-2009 02:59 PM
Joe Friedchicken
NI Configuration Based Software Get with your fellow OS users
[ Linux ] [ macOS ]Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)