SERIN of HEX data -- Wind equipment
Archiver
Posts: 46,084
Hey guys, just trying to interface a stamp to a piece of wind
equipment that we use at work.
This is my first time using a stamp/pic although I am electronics
trained.
The equipment is on current loop. I convert it with a telebyte65A to
RS232 so no sweat here!
Looking at the docs for the equipment....the data is in 2's
compliment HEX. It has it's 'Start of Heading', 'Start of Text',
and 'End of Text' bytes....but as I use procomm plus to view this
rs232 raw data, I can't make heads or tails of what I'm seeing.
This is the basic outlay of the raw message...
(STX)(NNNN)/(EEEE)/(TT)/(ETX)(C)(Z)(R)(N)
STX-Start of Text (02hex)
NNNN - group of data representing North Component in 2's compliment
HEX.
EEEE - group of data representing East Component in 2's Compliment
HEX.
TT - # of cupwheel turns
ETX - End of text (03hex)
C - Check byte (XOR of all characters in message after STX and before
ETX.
Z - End of Transmission (04hex)
R - Carriage Return (0Ahex)
N - Line Feed (0Dhex)
*all data is averaged to past 5seconds.
Now, I mucked around with trying to view this in a terminal program
which didn't make sense. Is there another program that WILL show me
raw data? OR is it that the 2's compliment (inverting of binary??)
is messing things up?
Could I just plug this in to a BS2 and be done with it...then debug
the array and have good data pop up??
Thanks
Steve
equipment that we use at work.
This is my first time using a stamp/pic although I am electronics
trained.
The equipment is on current loop. I convert it with a telebyte65A to
RS232 so no sweat here!
Looking at the docs for the equipment....the data is in 2's
compliment HEX. It has it's 'Start of Heading', 'Start of Text',
and 'End of Text' bytes....but as I use procomm plus to view this
rs232 raw data, I can't make heads or tails of what I'm seeing.
This is the basic outlay of the raw message...
(STX)(NNNN)/(EEEE)/(TT)/(ETX)(C)(Z)(R)(N)
STX-Start of Text (02hex)
NNNN - group of data representing North Component in 2's compliment
HEX.
EEEE - group of data representing East Component in 2's Compliment
HEX.
TT - # of cupwheel turns
ETX - End of text (03hex)
C - Check byte (XOR of all characters in message after STX and before
ETX.
Z - End of Transmission (04hex)
R - Carriage Return (0Ahex)
N - Line Feed (0Dhex)
*all data is averaged to past 5seconds.
Now, I mucked around with trying to view this in a terminal program
which didn't make sense. Is there another program that WILL show me
raw data? OR is it that the 2's compliment (inverting of binary??)
is messing things up?
Could I just plug this in to a BS2 and be done with it...then debug
the array and have good data pop up??
Thanks
Steve