Output the debug information through PA2 pin, please follow the below steps to get the debug data.
- Wire connection
Connect PA2 of the board to the RX pin of your USB to serial converter.
Connect GND of the board to the GND pin of the USB to serial converter.
Connect the USB to serial converter to your PC.
- Set the power switch to off. Supply power to the board, 3V is recommended.
- Configure your Serial Port Monitor software to 115200bps, N81 (No parity, 8 data bits, 1 stop bit).
Remember to choose the correct com port.
- With the test button pressed, switch the power switch to ON.
Now the 35-byte debug information is shown on the Serial Port Monitor software.
Meaning of the debug information
Only part of the 35 bytes debug information are used.
The below is the meaning of each byte and the value read per our test.
Byte 0: AAh, fixed value.
Byte 1: length of the debug information, 23h
Byte 2: zero-point value. The OPA value read at the condition of transmitter turned off. 18h.
Byte 3: transmission value. The OPA valu read at the condition of transmitter turned on. 7Eh.
Byte 4: difference value. The difference of byte 3 and byte 2, with voltage compensation. 60h.
Byte 5: calibrated zero-point value.
The difference value at calibration, which is set to be zero-point value after calibration. 61h.
Byte 6: alarm trigger value.
If the measured real-time difference value minus the calibrated zero-point value (byte 5) is over this value, the alarm is triggered. 20h.
Byte 7 – Byte 8: reserved.
Byte 9: operating flag. 40h.
- Bit 0 : time-base flag
- Bit 1: standby mode flag
- Bit 2: LED flashing in standby mode flag
Byte 10: status flag. 04h.
- Bit 0: fault detection
- Bit 1: alarm mode
- Bit 2: standby mode
- Bit 3: calibration mode
Byte 11: reserved.
Byte 12: The AD value of battery, 5Ah
Byte 13: The AD value of temperature, 78h
Byte 14 – Byte 27: reserved.
Byte 28: date-year, 03h
Byte 29: date-month, 99h
Byte 30: date-day, 3Fh
Byte 31: version, high byte, 01h
Byte 32: version, low byte, 23h
Byte 33: 55h, fixed value
Byte 34: checksum