Serial communication STX ETX LRC September 05, 2018 10:00AM |
Registered: 5 years ago Posts: 68 |
Re: Serial communication STX ETX LRC September 05, 2018 10:31AM |
Admin Registered: 54 years ago Posts: 280 |
Re: Serial communication STX ETX LRC September 05, 2018 10:32AM |
Registered: 5 years ago Posts: 296 |
Re: Serial communication STX ETX LRC September 05, 2018 10:44AM |
Registered: 5 years ago Posts: 68 |
Re: Serial communication STX ETX LRC September 05, 2018 10:50AM |
Registered: 5 years ago Posts: 192 |
Re: Serial communication STX ETX LRC September 05, 2018 10:54AM |
Registered: 5 years ago Posts: 68 |
Re: Serial communication STX ETX LRC September 05, 2018 05:39PM |
Registered: 5 years ago Posts: 41 |
cSTX is character = Charact(02) cETX is character = Charact(03) cACK is character = Charact(06) cNAK is character = Charact(21) cFS is character = Charact(28) cRS is character = Charact(30)
PROCEDURE get_lrc(LOCAL sString is string) nLRC is int = 0 nZnak is int //[en.wikipedia.org] FOR nP=1 _TO_ Length(sString) nZnak=Asc(Middle(sString,nP,1)) nLRC=BinaryXOR(nZnak,nLRC) END RESULT nLRC