User Manual of A90 Series Inverter
288
[4]:
N
r
≤16, indicating the number of requests to read registers;
[5]:
N
w
≤16, indicating the number of requests to write registers;
[6]:
N
w
+N
r
≤16;
12.3.6 CRC check
The low byte of CRC check is in front of the high byte.
The transmitter first calculates the CRC value, which is included in the sent message.
Upon receiving the message, the receiver will recalculate the CRC value and compare the
calculated value with the received CRC value. If the two values are not equal, it means that
there is an error in the sending process.
Calculation process of CRC check:
(1) Define a CRC register and assign an initial value, FFFFH.
(2) Perform the XOR calculation with the first byte of the transmitted message and the
value of the CRC register, and store the result in the CRC register. Starting from the address
code, the start bit and stop bit are not involved in calculation.
(3) Extract and check the LSB (the least significant bit of the CRC register).
(4) If the LSB is 1, each bit of the CRC register is shifted to the right by one bit, and the
most significant bit is supplemented by 0. Perform the XOR calculation of the value of the
CRC register and A001H, and store the result in the CRC register.
(5) If the LSB is 0, each bit of the CRC register is shifted to the right by one bit, and the
most significant bit is supplemented by 0.
(6) Repeat the steps 3, 4, and 5 until 8 shifts are completed.
(7) Repeat the steps 2, 3, 4, 5 and 6 to process next byte of the transmitted message, until all
bytes of the transmitted message are processed.
(8) After the calculation, the content of the CRC register is the value of CRC check.
(9) In a system with limited time resources, it is recommended to perform CRC check by
the table lookup method.
The simple function of CRC is as follows (programmed in C language):
unsigned int CRC_Cal_Value(unsigned char *Data, unsigned char Length)
{
unsigned int crc_value = 0xFFFF;
int i = 0;