This is a discussion on Advanced I/O with ADC/DAC cards within the C Programming forums, part of the General Programming Boards category; I am an undergraduate student at the Dept of Mechanical Engineering, University of Bristol, UK. I am developing C-code to ...

I am an undergraduate student at the Dept of Mechanical Engineering, University of Bristol, UK. I am developing C-code to control car fuel injectors in high speed IC engines. However, i have only rudimentary knowledge of C, so I was wondering if anyone can help with the following problems:

1. Which library function do I need to include in order to get the bit size of voltage in each channel of the input ADC ISA bus card?

2. How do I initialize the ADC/DAC card (ie give it a base address?)

3. What is the syntax to actually measure the size of the bit value on each input channel?

4. What is the syntax required to output a bit value to the output channel? IE can I "switch" the output channel to give a set voltage for a set interval of time?

If it is any help, here is some code which I think performs these operations in Quick Basic language:

'PC Card Initialisation
ba% = &H700 'hex base address
OUT ba% + 3, &H92
Chan0 = 0
Chan1 = 1
Chan2 = 2 '........etc

OUT &H702, Chan0 * &H10 + 2
For z% = 1 to 80: NEXT 'delay due to finite reading time
OUT &H702, Chan0 * &H10 + 3
For y% = 1 to 80: NEXT
xc% = (INP(&H701) AND &HF) * 256 + INP(&H700)

'Output
uc% = (204.75 * u + 2047.5) * (-1)
msb1= (uc% AND HFF0)/16 AND & HFF
lsb1= (uc% AND &HF) * 16
OUT ba% + 13, msb1
OUT ba% + 12, lsb1

Thank you very much for any help you can provide: if you cannot provide help, are there any internet forums where I might be able to air these queries?

Sam Wright

2. My experience with (most) DAQ cards is that they come with a library which you can use to initialise the card and use the card for data acquisition. Doesn't your card have one?

Perhaps the manufacturer of the card has a library available.

3. DAQ card

It is an antiquated Amplicon PC30 AT card (ah, the budget of undergrads!!). Manufacture of these things stopped early nineties. Have tried Amplicon, but they dont want to knoww

4. You could try at:
http://www.control.com/

At this site your card is also mentioned:
http://www.cogs.susx.ac.uk/users/pau...therboard.html

The people from that site say:

When it comes to higher frequency analogue signals, you need a good data acquisition card, such as Amplicon's PC30 series. Such cards generally come with a variety of DOS and Windows software, so there shouldn't be any problems writing code.