RS232 transmission problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

RS232 transmission problem

JiaJia Posts: 20Member
[b][red]This message was edited by Jia at 2005-3-15 8:33:3[/red][/b][hr]
Our C program control a device (connecting to RS232 port). We have Serial Port Monitor echo everything sent by the program.

In program, string 'SSS100' is sent to device consistently, but after a period time, no more 'SSS100' shows but 'less and equal' (one character, HEX F3) appears repeatly afterward. We don't know where '<='(F3) comes from and what do they mean.

What the problem seems to be? HW? SW?

Jia




Comments

  • LundinLundin Posts: 3,711Member
    : [b][red]This message was edited by Jia at 2005-3-15 8:33:3[/red][/b][hr]
    : Our C program control a device (connecting to RS232 port). We have Serial Port Monitor echo everything sent by the program.
    :
    : In program, string 'SSS100' is sent to device consistently, but after a period time, no more 'SSS100' shows but 'less and equal' (one character, HEX F3) appears repeatly afterward. We don't know where '<='(F3) comes from and what do they mean.
    :
    : What the problem seems to be? HW? SW?
    :
    : Jia
    :
    :

    It could be anything, a bug, noicy hardware, R232 lacking GND, too inaccurate baudrate settings etc etc
  • johnsonmejohnsonme Posts: 57Member
    Hi,
    Thats correct. Most probably, it is a timing problem. Try reducing the baud rates.
    Regards,
    Johnson.

    : : [b][red]This message was edited by Jia at 2005-3-15 8:33:3[/red][/b][hr]
    : : Our C program control a device (connecting to RS232 port). We have Serial Port Monitor echo everything sent by the program.
    : :
    : : In program, string 'SSS100' is sent to device consistently, but after a period time, no more 'SSS100' shows but 'less and equal' (one character, HEX F3) appears repeatly afterward. We don't know where '<='(F3) comes from and what do they mean.
    : :
    : : What the problem seems to be? HW? SW?
    : :
    : : Jia
    : :
    : :
    :
    : It could be anything, a bug, noicy hardware, R232 lacking GND, too inaccurate baudrate settings etc etc
    :

  • gcurwengcurwen Posts: 1Member
    :Are you sure you are not over writing your data in you code? It sort of sounds like an array is being filled and eventually corrupting your string. If you have a baud rate problem or a timing problem you should be having consistently inconstant data.

    Best,
    Greg
    :
    :Hi,
    : Thats correct. Most probably, it is a timing problem. Try reducing the baud rates.
    : Regards,
    : Johnson.
    :
    : : : [b][red]This message was edited by Jia at 2005-3-15 8:33:3[/red][/b][hr]
    : : : Our C program control a device (connecting to RS232 port). We have Serial Port Monitor echo everything sent by the program.
    : : :
    : : : In program, string 'SSS100' is sent to device consistently, but after a period time, no more 'SSS100' shows but 'less and equal' (one character, HEX F3) appears repeatly afterward. We don't know where '<='(F3) comes from and what do they mean.
    : : :
    : : : What the problem seems to be? HW? SW?
    : : :
    : : : Jia
    : : :
    : : :
    : :
    : : It could be anything, a bug, noicy hardware, R232 lacking GND, too inaccurate baudrate settings etc etc
    : :
    :
    :

  • evilguyevilguy Posts: 2Member
    : :Are you sure you are not over writing your data in you code? It sort of sounds like an array is being filled and eventually corrupting your string. If you have a baud rate problem or a timing problem you should be having consistently inconstant data.
    :
    : Best,
    : Greg
    : :
    : :Hi,
    : : Thats correct. Most probably, it is a timing problem. Try reducing the baud rates.
    : : Regards,
    : : Johnson.
    : :
    : : : : [b][red]This message was edited by Jia at 2005-3-15 8:33:3[/red][/b][hr]
    : : : : Our C program control a device (connecting to RS232 port). We have Serial Port Monitor echo everything sent by the program.
    : : : :
    : : : : In program, string 'SSS100' is sent to device consistently, but after a period time, no more 'SSS100' shows but 'less and equal' (one character, HEX F3) appears repeatly afterward. We don't know where '<='(F3) comes from and what do they mean.
    : : : :
    : : : : What the problem seems to be? HW? SW?
    : : : :
    : : : : Jia
    : : : :
    : : : :
    : : :
    : : : It could be anything, a bug, noicy hardware, R232 lacking GND, too inaccurate baudrate settings etc etc
    : : :
    : :
    : :
    :
    :
    sorry to ask here, can u write the code on how to passing string to serial port. and what library should i use. i'm developing my knowledge write program to control a hardware.
  • LundinLundin Posts: 3,711Member
    : : :Are you sure you are not over writing your data in you code? It sort of sounds like an array is being filled and eventually corrupting your string. If you have a baud rate problem or a timing problem you should be having consistently inconstant data.
    : :
    : : Best,
    : : Greg
    : : :
    : : :Hi,
    : : : Thats correct. Most probably, it is a timing problem. Try reducing the baud rates.
    : : : Regards,
    : : : Johnson.
    : : :
    : : : : : [b][red]This message was edited by Jia at 2005-3-15 8:33:3[/red][/b][hr]
    : : : : : Our C program control a device (connecting to RS232 port). We have Serial Port Monitor echo everything sent by the program.
    : : : : :
    : : : : : In program, string 'SSS100' is sent to device consistently, but after a period time, no more 'SSS100' shows but 'less and equal' (one character, HEX F3) appears repeatly afterward. We don't know where '<='(F3) comes from and what do they mean.
    : : : : :
    : : : : : What the problem seems to be? HW? SW?
    : : : : :
    : : : : : Jia
    : : : : :
    : : : : :
    : : : :
    : : : : It could be anything, a bug, noicy hardware, R232 lacking GND, too inaccurate baudrate settings etc etc
    : : : :
    : : :
    : : :
    : :
    : :
    : sorry to ask here, can u write the code on how to passing string to serial port. and what library should i use. i'm developing my knowledge write program to control a hardware.
    :

    If you are using Windows there a several examples on these boards
    (this is a very frequently asked question). Search the C/C++ boards for "RS-232" or "serial communication".

  • JiaJia Posts: 20Member
    Thank you all.

    We found there was noise in the hardware, causing the unexpected reset to a 'reset' pin. Haven't found what casues that noise. We can't change the baud rate because all devices' baud rate are fixed, defined by their manufactures.

    Sorry Evilguy, I can't show you the source code, I am not that code developer. I believe you can find similar code from this web site and other sites.

    Jia

    : : : :Are you sure you are not over writing your data in you code? It sort of sounds like an array is being filled and eventually corrupting your string. If you have a baud rate problem or a timing problem you should be having consistently inconstant data.
    : : :
    : : : Best,
    : : : Greg
    : : : :
    : : : :Hi,
    : : : : Thats correct. Most probably, it is a timing problem. Try reducing the baud rates.
    : : : : Regards,
    : : : : Johnson.
    : : : :
    : : : : : : [b][red]This message was edited by Jia at 2005-3-15 8:33:3[/red][/b][hr]
    : : : : : : Our C program control a device (connecting to RS232 port). We have Serial Port Monitor echo everything sent by the program.
    : : : : : :
    : : : : : : In program, string 'SSS100' is sent to device consistently, but after a period time, no more 'SSS100' shows but 'less and equal' (one character, HEX F3) appears repeatly afterward. We don't know where '<='(F3) comes from and what do they mean.
    : : : : : :
    : : : : : : What the problem seems to be? HW? SW?
    : : : : : :
    : : : : : : Jia
    : : : : : :
    : : : : : :
    : : : : :
    : : : : : It could be anything, a bug, noicy hardware, R232 lacking GND, too inaccurate baudrate settings etc etc
    : : : : :
    : : : :
    : : : :
    : : :
    : : :
    : : sorry to ask here, can u write the code on how to passing string to serial port. and what library should i use. i'm developing my knowledge write program to control a hardware.
    : :
    :
    : If you are using Windows there a several examples on these boards
    : (this is a very frequently asked question). Search the C/C++ boards for "RS-232" or "serial communication".
    :
    :
Sign In or Register to comment.