I'm assigned a project on appliances control using microcontroller 89C51.The criterion will be like that:
1) I have to create a Windows form App in C++ using MS Visual Studio 2008 that will simply send some code to serial port as Button will be pressed in the application
2) As COM port will be continuously monitored by microcontroller 89C51 so it will respond to that code and will produce corresponding actuation on its ports where Relay will be Interfaced.
Have anyone some idea , some code or helping material to develop application that can communicate with serial port...Will any body help me making my project...
what you actually needed. The controller program & circuit diagram or the pc program. do some thing by yourself & and post the result if you donot got the output currect, i'll help you
I have made the controller program which is working as fine as it was meant to behave .I used the simulation sofware(PROTEUS ISIS v7.7 sp2).I have clear cut idea how to design hardware using relays and how to get all that stuff attached to the controller.I am new in serial port related projects and what i'm gonna need is the PC program bcoz i have no idea how to creat an application that can communnicate with the serial port of the PC .I wanna use port with DB9 connector.
you can simpley controlle the relay by sending a string from computer hyperterminal if the string matches to the strings alredy stored in the code the the appropriate relay will be powerd....like save this string in nthe arry..."relay1on".....and then send this string from hyperterminal to the controler and simple if condition will work..hope it helps
Ali Raza
Use 1-Wire and addressable, digital switches like DS2405,DS2406,DS2408,... this will provide just one wire bus, and you can put relay to switch device/load at place of device (device can be distant from PC).
Another option is to use PC Relay board, and over Twisted Pair cable on end use optocoupler to switch device relay away from the computer.