Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Can a C program under windows talk to a microcontroller through RS232
I'm really a beginner with programming so I need some technical advise on this matter. I'm trying to build a system such that when a person enter some parameter values in a C program, it will determine a voltage that would be applied to a load. I'm guessing that the data would be transmitted to a microcontroller for the control of the voltage across the load resistor. The voltage is a DC voltage and Pulse Width Modulation would be used to get the desired DC voltage. Having these problems, I'm still uncertain whether a computer in Windows environment can talk to a microcontroller through RS232. I've talked to some computer guru and they told me that in Windows the C compiler will never be able to talk to a hardware directly. It must go through some API or something (I really don't know what he means by that!). Is that true or are there some ways to work around it? Is using C under Windows a wise choice?
My project is quite simple, the computer program will do some math to determine the DC voltage across the load, then tell the microcontroller what the DC value of the voltage should be and the microcontroller set the output voltage to that value. So hopefully, some kind person would be able to help me out with this.
Thank you very much.
0 · ·