cancel
Showing results for 
Search instead for 
Did you mean: 

Basic serial write and read, questions

maple72
Member

Basic serial write and read, questions

Hi all
I have an external microcontroller connected to the PC using the serial port com 2, The microcontroller is porgrammed with its own instruction  langauge to recive a " A" character from the serial port , after that it will send a character "B" to the serial port
 
In the LabVIEW program I am doing , I have configured the serial port with the serial port specs of the microcontroller , when I write "A" to the serial port I am sending it to the "microcontroller " I am supposed to  read a "B" in return but it gives me a "AB"
 
cant get it
 
any ideas
Thanks alot
5 REPLIES 5
Henrik_Volkers
Trusted Enthusiast

Re: Basic serial write and read, questions

sounds like a 'hardware' echo  (any shortcut between pin 2/3?)

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Albert.Geven
Trusted Enthusiast

Re: Basic serial write and read, questions

maybe the microcontroller is echoing what it receives before answering the question.
This was normal for a half duplex device.

imagine a display that displays all commands and data but has to get its information from the receiving serial line.

most of the time these controllers have a command to stop echoing or go in the full duplex mode.
greetings from the Netherlands
maple72
Member

Re: Basic serial write and read, questions

Hi all

I have checked the same hardware connection , with the hyperterminal and the same setting , when I send an "A" it  returms for me back a "B", so I dont think the cause is the "Microcontroller " program

Albert.Geven
Trusted Enthusiast

Re: Basic serial write and read, questions

is your program maybe mixing it?
greetings from the Netherlands
maple72
Member

Re: Basic serial write and read, questions

I will send you the program, wait