The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University
HANEL

SEMI-


CONDUCTOR MEMORY


RAM


Checksum Byte


ROM(cont’)


‰To calculate the checksum byte of a series of bytes of data


¾Add the bytes together and drop the carries¾Take the 2’s complement of the total sum, and that is the checksum byte, which becomes the last byte of the series


‰To perform the checksum operation, add all the bytes, including the checksum byte


¾The result must be zero¾If it is not zero, one or more bytes of data have been changed

Free download pdf