strange event in C# serial communication

Status
Not open for further replies.

prafiee

Newbie level 5
Joined
Feb 10, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,331
Dear everybody
There is a weired problem while working with C# serial port.
I have a packet of data included 6 bytes transmitted throughout C# Serial port.
when transmitted byte is "0D", then C# automatically sends both 0D and 0A which is ascii code for ENTER character. I don't understand why C# compiler automatically recognizes 0D as a ascii Enter character and send its ascii code.
can anybody help me in order to resolve this problem.
Best regards.
P. Rafiee
 

How do you interface, handel serial port and send data, did you mean visual studio c#, using System.IO.Ports ?
 

Yes. I use visual C# system.IO.Ports. It is obvious that after 0x0D quickly one 0x0A will be transmitted. I increased delay between sending each byte about 2 second. then it can be seen that duration between all byte is 2 second except for 0x0D which after that 0x0A is transmitted with out any delay.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…