01-13-2006 05:19 PM
01-16-2006 02:04 PM
Hi H20,
There is an example for Mode 0 Basic I/O on page B-16 of the user manual for the NI-6503 http://www.ni.com/pdf/manuals/320938c.pdf. You can use this as a starting point. The examples show you how to configure the ports as input or output. The example code for Mode 1 demonstrates how to configure and access the Interrupt pin on PortC. According to the manual, in order to use the Interrupt pin you will need handshaking which is only available in Mode 1 not Mode 0. Therefore I don't think you will be able to do digital input in Mode 0 based on an Interrupt. You can reference the example code on page B-22 if you decide to switch to Mode 1.
I hope this helps.
01-16-2006 02:36 PM
You can use external signals to generate interrupts when port A or port B is in mode 0 and the
low nibble of port C is configured for input. If port A is in mode 0, use PC3 to generate an
interrupt; if port B is in mode 0, use PC0 to generate an interrupt. After you have configured
the selected 82C55A, you must set the corresponding interrupt enable bit in Interrupt Control
Register 1. If you are using PC3, set
xIRQ0; if you are using PC0, set xIRQ1, where x is theletter corresponding to the PPI you want to generate interrupts (A–D). When the external
signal becomes logic high, an interrupt request occurs. To disable the external interrupt, the
interrupt service routine that you have written should acknowledge the interrupt. On the
PCI-DIO-96 and PXI-6508, the interrupt service routine should also write the interrupt clear
register.
----------------------------------------------------------------------
But this is all moot Natasa, as it pertains to register level programming. Are you telling me that I need to program the 6503 at register level - e.g. write my own Windows driver- to do this simple job?
It may be so, but I would like to have this verified.
In all of NI-DAQmx, that massive API interface, there is no method to do this? Not that I have found, although I did meet in person with Jared McInelly (Account Manager - Field Engineer | jared.mcinelly@ni.com | 253.351.6078) who told me Mode 0 would be best and that NI-DAQmx supported doing this.
01-17-2006 04:01 PM
I apologize for the miscommunication, but with the 6503 you can only do register level programming if you want to use Mode 0 or 1. In order to use interrupts with DAQmx the daq card needs to support change detection which the 6503 does not. The 6533 and 6534 do support this feature.
If you need more help with the register level programming of the 6503, you can post your questions on the DDK forum.
01-17-2006 08:13 PM
Thanks Natasa. I will consider what to do next.
HOH