HI,
i need some help regarding to my project as i want to have a seriall communication between visual studio have done some work in it now the output of that code i want to send to microcontroller how can i send the data serially there plz help me out of thsi probelm
Hi friendchooser,
do you have problem in visual studio or in MCU?As first you must have properly serial RS232 HW conection betwen PC and MCU.After that you must setup serial communication on boot PC and MCU - example 9600,N,8,1.
if you look in the Visual Studio Toolbox under Components your will find a SerialPort component.
It enables you to set baud rate etc and send and receive characters from either the RS232 COM1: port if you have one or USB to serial converters which appear as virtual COM ports.
do you use MSComm control in Visual Basic?This is standard serial communication component in Windows OS.
for send data from PC to MCU you must use MSComm.Output = string as example MSComm1.Output = "Hello MCU"
receive data from MCU you use strDataFromMCU = MSComm1.Input
also you may receive and send binary data.
You may look at this sites for some info using c# for serial comm. i normally used c# as it its easier. Check youtube also for a lot of materials on how to use c# for serial com. hope this helps.