Thread: Advanced I/O with ADC/DAC cards

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    8

    Advanced I/O with ADC/DAC cards

    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

    'Getting readings from channels
    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. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    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. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    8

    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. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    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.
    Perhaps they can help you further.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    If you've run the Quick Basic program above, and know it works, then there's a good chance that the C code which Salem provided above will work.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help it won't compile!!!!!
    By esbo in forum C Programming
    Replies: 58
    Last Post: 01-04-2009, 03:22 PM
  2. asynchronized I/O == multiplexing I/O?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 07-24-2006, 10:06 AM
  3. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM
  4. Cribbage Game
    By PJYelton in forum Game Programming
    Replies: 14
    Last Post: 04-07-2003, 10:00 AM
  5. Overlapped I/O and Completion Port :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 10-30-2002, 05:14 PM