hardware libraries and simulation software

Discussion in 'Programmer's Corner' started by acegi, Sep 1, 2012.

  1. acegi

    Thread Starter New Member

    Sep 1, 2012
    4
    0
    Hi,

    I'm learning to program in C and is having trouble finding software to simulate hardware components.

    So my questions are:

    1) Do the hardware libraries always come with the physical hardware purchased?

    The course notes I study off uses the library <Hardware_Utilities.h> that doesn't come with the Microsoft Visual C++ compiler. I'm not sure where to find the functions contained in this library such as:

    - float read_analog(int analog_channel_num)
    - void write_binary(int binary_channel_num, int value)
    - int read_binary(int binary_channel_num)

    But when I downloaded other software such as LabVIEW, it seems to have its own library and commands that are similar in function but different in syntax.

    2) Is it possible to download simulation software/hardware library without purchasing the lab equipment hardware?

    The intent is to use simulation LEDs to test my C program codes for the following programs:
    -Simon Says (4 different colour LEDs, 4 corresponding push buttons)
    -Traffic control (6 LEDs representing 2 sets of of traffic lights, 2 push buttons for the 4 possible combinations of traffic light signals)

    Thank you. Hope this is the right forum to post this type of question.
     
  2. acegi

    Thread Starter New Member

    Sep 1, 2012
    4
    0
    Okay, I've just downloaded the Microsoft SDK and now the <Windows.h> header file works.

    But I'm still not sure how to read and write the hardware channels from my C programs.

    Thanks.
     
  3. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    It seems to me that your hardware_utilities.h is a library made specialy for your course, because I have never seen such abstract library that is supposed to work with different hardware.
    Generally if you are trying to simulate some hardware code, you need a simulator specifically designed for the hardware you´re using.
     
  4. acegi

    Thread Starter New Member

    Sep 1, 2012
    4
    0
    Thank you for replying. I believe you're right. But can I download a simulator in place of the hardware without purchasing the DAQ itself?

    In other words, for hardware to connect with software, we usually need a driver, but if we just want to connect a simulator software with programs in a language such as C, do we still need a driver? If we don't need a driver, how do we link the two?

    Thank you.
     
  5. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    This depends on the particular device. There surely are pieces which for which you can have a free development tools including a simulator. The question is what exactly do you need to simulate, as for example ability to simulate with a virtual serial port will be more frequent than say a usb. Also simulation of a processor is typically separate from simulating the rest of the connected hardware.
     
  6. acegi

    Thread Starter New Member

    Sep 1, 2012
    4
    0
    Thanks, after a lot of Wikipedia articles, I still cannot say I'm educated about the hardware components. But I'm going to school now and will find out soon enough. I'll post my findings here when I take a look at the school lab equipment.

    Thank you.
     
Loading...