09-09-2005 01:04 PM
09-09-2005 04:07 PM
When I switched the bases (by assigning the first one to baseBAR0 and the second to baseBAR1), I read
the value 40133111.
Looking at Memory usage
BAR0 Logical Base is: 0xFEAFD000
BAR0 Virtual Base is: 0xF8C27000
Length of mapping is 4096
Iterating through resource number 1
Iterating through resource number 2
Looking at Memory usage
BAR1 Logical Base is: 0xFEAFC000
BAR1 Virtual Base is: 0xF8BBA000
Length of mapping is 4096
...
Attempting to read address F8C27460
Read 40133111
09-09-2005 04:15 PM
09-12-2005 10:41 AM
09-12-2005 04:15 PM
09-28-2005 01:34 PM
geoff
10-08-2005 05:46 PM
I connected DI 3 and 4 to +15V, and the rest of the DIs to Ground. I have connected LEDs to DIs 3 and 4 which are on. When I try to read the lines, I expect a digital pattern 0b00011000 corresponding to this input configuration. I read a different value.
In particular, my register map for this E-series device (PCI-MIO-16E-1 or NI-Elvis) is:
// defines offsets for registers from base
#define WINDOW_ADDRESS_REG 0x00 // 16-bit register
#define WINDOW_DATA_REG 0x01*2 // 16-bit register
#define DIO_PARALLEL_INPUT_REG 7
#define DIO_OUTPUT_REG 10
#define DIO_CONTROL_REG 11
There is a conflict between the DAQ-STC manual and the E-series RLPM. The E-Series RLPM indicates DIO_PARALLEL_INPUT_REG to be 14. In the DAQ-STC, WINDOW_DATA_REG is 1 on page B-3 (Appendix B), but an example on page 7-7 uses 2 for WINDOW_DATA_REG. Also in DAQ-STC, DIO_PARALLEL_INPUT_REG is 7 on page B-3. The E-series RLPM does not have any information for DIO_OUTPUT_REG and DIO_CONTROL_REG. There differences are due to byte addressing of memory, but which one is correct?
My access functions for device registers are:
void WriteWindowData( PDEVICE_EXTENSION pDevExt, USHORT bData ) {
PUSHORT o = (PUSHORT)((PUCHAR) pDevExt->baseBAR1 + WINDOW_DATA_REG);
(WRITE_REGISTER_USHORT( o, bData ));
}
USHORT ReadWindowData( PDEVICE_EXTENSION pDevExt) {
PUSHORT o = (PUSHORT)((PUCHAR) pDevExt->baseBAR1 + WINDOW_DATA_REG);
return READ_REGISTER_USHORT( o );
}
void WriteWindowAddress(PDEVICE_EXTENSION pDevExt, USHORT bData ) {
PUSHORT o = (PUSHORT)((PUCHAR) pDevExt->baseBAR1 + WINDOW_ADDRESS_REG);
(WRITE_REGISTER_USHORT( o, bData ));
}
10-10-2005 03:55 PM
10-10-2005 05:28 PM
10-12-2005 07:52 AM