High precision sensor CAN protocol

High-precision sensor CAN protocol

Instructions for use:

The serial port sending command must be completed within 10S, otherwise it will be automatically locked. In order to avoid automatic locking, the following steps can be performed first.

1. Enter the unlock command

2. Enter the command that needs to modify or read the data

3. Save the command

Register table

explanation:

Callout registers are only available for HWTX073.

Protocol format

Active output format

  • Data is sent in hexadecimal, not ASCII.

  • Each data is transmitted in sequence by low byte and high byte, and the two are combined into a signed short type of data. For example, for data DATA1, DATA1L is the low byte and DATA1H is the high byte. The conversion method is as follows: Suppose DATA1 is the actual data, DATA1H is its high-byte part, DATA1L is its low-byte part,Then: DATA1=(short)((short)DATA1H<<8|DATA1L). It must be noted here that DATA1H needs to be coerced into a signed short type of data before shifting, and the data type of DATA1 is also a signed short type, so that it can represent negative numbers.

【1】TYPE(Data content):

Time output

Acceleration output

Angular velocity

Angle output(Roll)

Angle output (Pitch)

Angle output(Yaw)

Magnetic field

Read register format

  • Data is sent in hexadecimal, not ASCII.

  • Each register address, the number of read registers, and the read data are represented by two bytes. The high and low bits of the register address are represented by ADDRH and ADDRL, the high and low bits of the number of registers to be read are represented by LENH and LENL, and the high and low bits of the read data are represented by DATA1H and DATA1L.

command send

Data return

Write register format

  • Data is sent in hexadecimal, not ASCII.

  • All settings need to operate the unlock register (KEY) first

  • For each register address, the write data is represented by two bytes. The high and low bits of the register address are represented by ADDRH and ADDRL, and the high and low bits of the written data are represented by DATAH and DATAL.

Register Description

SAVE(save/reboot/reset)

CALSW(calibration mode)

RSW(output content)

RRATE(output rate)

BAUD(Serial port baud rate)

AXOFFSET~HZOFFSET(Zero bias setting)

WORKMODE(Z-axis operation mode)

GYROPTP(Z-axis static peak-to-peak)

GPTPTIME(Z-axis peak-to-peak acquisition time)

GYROBAIS(Z axis zero bias value)

GBAISTIME(Z axis zero bias acquisition time)

GSTATICTHRE(Z-axis static threshold)

GSTATICTIME(Z axis stabilization time)

PGSCALE(Z-axis calibration factor P)

GSCALERANGE(Z-axis calibration angle)

IICADDR(Device address)

LEDOFF(turn off LED light)

MAGRANGX~MAGRANGZ(Magnetic Field Calibration Range)

BANDWIDTH

GYRORANGE

ACCRANGE(Accelerometer range)

SLEEP

ORIENT

AXIS6

FILTK

READADDR(read register)

ACCFILT(acceleration filter)

POWONSEND

VERSION

YYMM~MS(on-chip time)

AX~AZ(acceleration)

GX~GZ(Angular velocity)

HX~HZ(Magnetic field)

Roll(Angle)

Pitch(Angle)

Yaw(Angle)

TEMP(Angle)

PressureL~HeightH(barometric altitude)

q0~q3(Quaternion)

GYROCALITHR(Gyro Still Threshold)

GYROCALTIME(Gyro auto calibration time)

KEY(unlock)

WERROR(Gyroscope change value)

WZTIME(Angular velocity continuous rest time)

WZSTATIC(Angular velocity integral threshold)

NUMBERID1~NUMBERID6(Device number)

XREFROLL~YREFPITCH(Angle zero reference value)

Last updated