hardware libraries and simulation software

Thread Starter

acegi

Joined Sep 1, 2012
4
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.
 

Thread Starter

acegi

Joined Sep 1, 2012
4
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.
 

kubeek

Joined Sep 20, 2005
5,795
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.
 

Thread Starter

acegi

Joined Sep 1, 2012
4
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.
 

kubeek

Joined Sep 20, 2005
5,795
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.
 

Thread Starter

acegi

Joined Sep 1, 2012
4
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.
 
Top