50
- Initial character error (":")
- Address selected not valid
- LRC error
- CR error
- LF error
- Any type of error detected on a "radio broadcasting" command (address = 00H).
HOW THE LRC IS CALCULATED
The LRC is calculated as follows.
- all the bytes to be transmitted before the LCR are added together, except for the string start
character (:).
- the value calculated is then divided by 256 and the remainder is noted
- the remainder is then subtracted from 256 to obtain the desired LRC.
Example:
01H,03H,FE00H,0021H,LRC,CR,LF
The LRC will be calculated as follows:
- 01H + 03H + FEH + 00H + 00H + 21H = 123H (291)
- 123H / 100H (256) = 01H RESTO = 23H (35)
- 100H (256)- 23H = DDH
therefore:
- LRC = DDH.