MSCOMM1 problem
-
hi all.. i have a problem in communication software to hardware.. actually, i want to know the basic concept how we send the data to the hardware using serial port.. for example, how can i switch on and off the led when i click the button in my vb projects.. can someone please help me.. areon25
-
hi all.. i have a problem in communication software to hardware.. actually, i want to know the basic concept how we send the data to the hardware using serial port.. for example, how can i switch on and off the led when i click the button in my vb projects.. can someone please help me.. areon25
-
Then you must know how the hardware reads the data. Meaning you must know the communication protocol. What type of hardware is it? BR Fredrik
-
thanks for the email.. actually, i just want to switch ON/OFF the LED as i mention before.. areon25
And that't when it gets messy! In order to swith on/off the led on the hardware you must send the correct data on your serial port. I have written some protocols before for serial comunication and they all start with a command sequence. In your case I would have had a command LED_CONTROL which would have been the character "L" and then which state to put the led in "0" or "1". By sending "L" on the serial port the hardware knows that next character recieved will contain "0" or "1" and when I send "0" the hardware swithces the led off. Two weeks ago I wrote a program to print stickers with a Intermec PC4 printer. http://www.intermec.com/eprise/main/GSS/Service/Content/Manuals/Show_ManualSearchResults?Product=PRTRPC4&Language=English[^] Take look at the Programmer's Reference Manual. That's why you must know the protocol for the hardware communication. BR Fredrik