Decoding serial data
Vernon
Posts: 1
Hi
I have no previous programming experience and new to the prop & spin code.
I have been working through the PE kit labs and have the basic understanding of the
fndamentals.
I would like some help, to decode the ASCII code, when using the simple_serial.spn
This is a sample of the data:
DA00002.85 m
DB00002.85 m
BC00.0dB
*
This is coming from a Deso echo sounder to P0 on Prop, I have the output on P1 and have it plugged in to Hyperterminal, on PC, and can see the data (through a MAX232 IC).
How can I write a routine to decode the DA00002.85 string, compare it to a pre difined CON
i.e. DA00005.00 and set a pin high, if condition is equeal?
Sounds simple, I just don't know where to start!
Any help will be great,
Regards
Vernon
I have no previous programming experience and new to the prop & spin code.
I have been working through the PE kit labs and have the basic understanding of the
fndamentals.
I would like some help, to decode the ASCII code, when using the simple_serial.spn
This is a sample of the data:
DA00002.85 m
DB00002.85 m
BC00.0dB
*
This is coming from a Deso echo sounder to P0 on Prop, I have the output on P1 and have it plugged in to Hyperterminal, on PC, and can see the data (through a MAX232 IC).
How can I write a routine to decode the DA00002.85 string, compare it to a pre difined CON
i.e. DA00005.00 and set a pin high, if condition is equeal?
Sounds simple, I just don't know where to start!
Any help will be great,
Regards
Vernon
Comments
The following code fragment shows a subroutine (methode) that waits until a certain startcharacter is received and writes then the characters to the string until the endcharacter is received, the result is the string without the endcharacter.
This string is then compared to a fixed string.
Andy