CAN Protocol
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.
Enter the unlock command
Enter the command that needs to modify or read the data
Save the command
Register table
AD DR
(He
x)
AD DR
(De
c)
REGISTE R NAME
FUNCTION
SER IAL
I/F
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit9
Bit8
Bit 7
Bit6
Bit5
Bit 4
Bit3
Bit2
Bit 1
Bit0
00
00
SAVE
save/reboot/ factory reset
R/W
SAVE[15:0]
01
01
CALSW
Calibration mode
R/W
CALSW[3:0]
02
02
RSW
output content
R/W
GS A
QUA TER
VELO CITY
G PS
PRE SS
PO RT
M AG
ANG LE
GY RO
A C C
TIME
03
03
RRATE
output rate
R/W
RRATE[3:0]
04
04
BAUD
Serial port baud rate
R/W
BAUD[3:0]
05
05
AXOFFSE T
Acceleration X Zero Bias
R/W
AXOFFSET[15:0]
06
06
AYOFFSE T
Acceleration Y Zero Bias
R/W
AYOFFSET[15:0]
07
07
AZOFFSE T
Acceleration Z Zero Bias
R/W
AZOFFSET[15:0]
08
08
GXOFFS ET
Angular velocity X zero bias
R/W
GXOFFSET[15:0]
09
09
GYOFFS ET
Angular velocity Y zero bias
R/W
GYOFFSET[15:0]
0A
10
GZOFFSE T
Angular velocity Z zero bias
R/W
GZOFFSET[15:0]
0B
11
HXOFFSE T
Magnetic Field X Zero Bias
R/W
HXOFFSET[15:0]
0C
12
HYOFFSE T
Magnetic Field Y Zero Bias
R/W
HYOFFSET[15:0]
0D
13
HZOFFSE T
Magnetic Field Z Zero Bias
R/W
HZOFFSET[15:0]
1A
26
IICADDR
Device address
R/W
IICADDR[7:0]
1B
27
LEDOFF
Turn off LED light
R/W
LED OFF
1C
28
MAGRAN GX
Magnetic Field X Calibration Range
R/W
MAGRANGX[15:0]
1D
29
MAGRAN
Magnetic
R/W
MAGRANGY[15:0]
GY
Field Y Calibration Range
1E
30
MAGRAN GZ
Magnetic Field Z Calibration Range
R/W
MAGRANGZ[15:0]
1F
31
BANDWID TH
bandwidth
R/W
BANDWIDTH[3:0]
20
32
GYRORA NGE
Gyroscope range
R/W
GYRORANGE[3:0]
21
33
ACCRAN GE
Acceleration range
R/W
ACCRANGE[3:0]
22
34
SLEEP
sleep
R/W
SLEE P
23
35
ORIENT
Installation direction
R/W
ORIE NT
24
36
AXIS6
Algorithms
R/W
AXIS 6
25
37
FILTK
Dynamic filtering
R/W
FILTK[15:0]
27
39
READAD DR
Read registers
R/W
READADDR[7:0]
2A
42
ACCFILT
Acceleration filtering
R/W
ACCFILT[15:0]
2D
45
POWONS END
command start
R/W
POWONSEND[3:0
]
2E
46
VERSION
version number
R
VERSION[15:0]
30
48
YYMM
year/mouth
R/W
MOUTH[15:8]
YEAR[7:0]
31
49
DDHH
day/hour
R/W
HOUR[15:8]
DAY[7:0]
32
50
MMSS
minute/seco nds
R/W
SECONDS[15:8]
MINUTE[7:0]
33
51
MS
millisecond
R/W
MS[15:0]
34
52
AX
Acceleration X
R
AX[15:0]
35
53
AY
Acceleration Y
R
AY[15:0]
36
54
AZ
Acceleration Z
R
AZ[15:0]
37
55
GX
Angular velocity X
R
GX[15:0]
38
56
GY
Angular velocity Y
R
GY[15:0]
39
57
GZ
Angular velocity Z
R
GZ[15:0]
3A
58
HX
Magnetic Field X
R
HX[15:0]
3B
59
HY
Magnetic field Y
R
HY[15:0]
3C
60
HZ
Magnetic field Z
R
HZ[15:0]
3D
61
Roll
Roll angle
R
Roll[15:0]
3E
62
Pitch
Pitch angle
R
Pitch[15:0]
3F
63
Yaw
Heading
R
Yaw[15:0]
40
64
TEMP
temperature
R
TEMP[15:0]
45
69
PressureL
Air pressure low 16 bits
R
PressureL[15:0]
46
70
PressureH
Air pressure high 16 bits
R
PressureH[15:0]
47
71
HeightL
Height lower 16 bits
R
HeightL[15:0]
48
72
HeightH
High low high 16 bits
R
HeightH[15:0]
51
81
q0
Quaternion 0
R
q0[15:0]
52
82
q1
Quaternion 1
R
q1[15:0]
53
83
q2
Quaternion 2
R
q2[15:0]
54
84
q3
Quaternion 3
R
q3[15:0]
61
97
GYROCA LITHR
Gyro Still Threshold
R/W
GYROCALITHR[15:0]
62
98
ALARMLE VEL
Angle alarm level
R/W
ALARMLEVEL[3:0]
63
99
GYROCA LTIME
Gyro auto calibration time
R/W
GYROCALTIME[15:0]
68
104
TRIGTIM E
Alarm continuous trigger time
R/W
TRIGTIME[15:0]
69
105
KEY
Unlock
R/W
KEY[15:0]
6A
106
WERROR
Gyroscope
R
WERROR[15:0]
change value
6E
110
WZTIME
Angular velocity continuous rest time
R/W
WZTIME[15:0]
6F
111
WZSTATI C
Angular velocity integral threshold
R/W
WZSTATIC[15:0]
79
121
XREFROL L
Roll angle zero reference value
R
XREFROLL[15:0]
7A
122
YREFPIT CH
Pitch angle zero reference value
R
YREFPITCH[15:0]
7F
127
NUMBERI D1
Device No.1-2
R
ID2[15:8]
ID1[7:0]
80
128
NUMBERI D2
Device No. 3-4
R
ID4[15:8]
ID3[7:0]
81
129
NUMBERI D3
Device No. 5-6
R
ID6[15:8]
ID5[7:0]
82
130
NUMBERI D4
Device No. 7-8
R
ID8[15:8]
ID7[7:0]
83
131
NUMBERI D5
Device No. 9-10
R
ID10[15:8]
ID9[7:0]
84
132
NUMBERI D6
Device No. 11-12
R
ID12[15:8]
ID11[7:0]
Protol format
Active Output Format
The 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 negative numbers can be represented.
Protocol headers
Data Content
Data lower 8 bits
Data high 8 bits
Data lower 8 bits
Data high 8 bits
Data lower 8 bits
Data high 8 bits
0x55
TYPE
【1】
DATA1L[7:0]
DATA1H[15:8]
DATA2L[7:0]
DATA2H[15:8]
DATA3L[7:0]
DATA3H[15:8]
【1】TYPE(Data content):
TYPE
Remark
0x50
Time
0x51
Acceleration
0x52
Angular velocity
0x53
Angle
0x54
Magnetic field
0x5F
Read
0x55
0x50
YY
MM
DD
HH
MN
SS
Name
Description
Remark
YY
Year
MM
Mouth
DD
Day
HH
Hour
MN
Munite
SS
Seconds
0x55
0x51
AxL
AxH
AyL
AyH
AzL
AzH
Name
Descrption
Remark
AxL
Acceleration X low 8 bits
Acceleration X=((AxH<<8)|AxL)/32768*16g
(g is the acceleration of gravity, preferably 9.8m/s2)
AxH
Acceleration X high 8 bits
AyL
Acceleration Y low 8 bits
Acceleration Y=((AyH<<8)|AyL)/32768*16g
(g is the acceleration of gravity, preferably 9.8m/s2)
AyH
Acceleration Y high 8 bits
AzL
Acceleration Z low 8 bits
Acceleration Z=((AzH<<8)|AzL)/32768*16g
(g is the acceleration of gravity, preferably 9.8m/s2)
AzH
Acceleration Z high 8 bits
0x55
0x52
WxL
WxH
WyL
WyH
WzL
WzH
Name
Description
Remark
WxL
Angular velocity X low 8 bits
Angular velocity X=((WxH<<8)|WxL)/32768*2000°/s
WxH
Angular velocity X high 8 bits
WyL
Angular velocity Y low 8 bits
Angular velocity Y=((WyH<<8)|WyL)/32768*2000°/s
WyH
Angular velocity Y high 8 bits
WzL
Angular velocity Z low 8 bits
Angular velocity Z=((WzH<<8)|WzL)/32768*2000°/s
WzH
Angular velocity Z high 8 bits
0x55
0x53
RollL
RollH
PitchL
PitchH
YawL
YawH
Name
Description
Remark
RollL
Roll angle X lower 8 bits
Roll angle X=((RollH<<8)|RollL)/32768*180(°)
RollH
Roll angle X high 8 bits
PitchL
Pitch angle Y low 8 bits
Pitch angle Y=((PitchH<<8)|PitchL)/32768*180(°)
PitchH
Pitch angle Y high 8 bits
YawL
Yaw angle Z low 8 bits
Heading angle Z=((YawH<<8)|YawL)/32768*180(°)
YawH
Yaw angle Z high 8 bits
0x55
0x54
HxL
HxH
HyL
HyH
HzL
HzH
Name
Description
Remark
HxL
Magnetic field X lower 8 bits
Magnetic field X=((HxH<<8)|HxL)
HxH
Magnetic field X high 8 bits
HyL
Magnetic field Y lower 8 bits
Magnetic field Y=((HyH <<8)|HyL)
HyH
Magnetic field Y high 8 bits
HzL
Magnetic field Z lower 8 bits
Magnetic field Z=((HzH<<8)|HzL)
HzH
Magnetic field Z high 8 bits
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
protocol header
protocol header
register
Data lower 8 bits
Data high 8 bits
0xFF
0xAA
ADDR
DATAL[7:0]
DATAH[15:8]
data return
0x55
0x5F
REG1L
REG1H
REG2L
REG2H
REG3L
REG3H
Name
Description
Remark
REG1L
Register 1 lower 8 bits
REG1[15:0]=((REG1H<<8)|REG1L)
REG1H
Register 1 upper 8 bits
REG2L
Register 2 lower 8 bits
REG2[15:0]=((REG2H<<8)|REG2L)
REG2H
Register 2 upper 8 bits
REG3L
Register 3 lower 8
REG3[15:0]=((REG3H<<8)|REG3L)
bits
REG3H
Register 3 upper 8 bits
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.
protocol header
protocol header
register
Data lower 8 bits
Data high 8 bits
0xFF
0xAA
ADDR
DATAL[7:0]
DATAH[15:8]
SAVE
Register Name: SAVE Register Address: 0 (0x00) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:0
SAVE[15:0]
Save: 0x0000
Reboot: 0x00FF Factory reset: 0x0001
Example: FF AA 00 FF 00 (reboot)
CALSW
Register Name: CALSW Register Address: 1 (0x01) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:4
3:0
CAL[3:0]
Set calibration mode:
0000(0x00): normal working mode 0001(0x01): Auto adder calibration 0011(0x03): height reset
0100(0x04): Set the heading angle to zero
0111(0x07): Magnetic Field Calibration (Spherical Fitting)
1000(0x08): set angle reference
1001(0x09): Magnetic Field Calibration (Dual Plane Mode)
Example: FF AA 01 04 00 (course angle set to zero)
Register Name: RSW Register Address: 2 (0x02) Read and write direction: R/W
Default: 0x001E
Bit
NAME
FUNCTION
15:11
10
GSA (0x5A)
0: off 1: on
9
QUATER (0x59)
0: off 1: on
8
VELOCITY (0x58)
0: off 1: on
7
GPS (0x57)
0: off 1: on
6
PRESS (0x56)
0: off 1: on
5
PORT (0x55)
0: off 1: on
4
MAG (0x54)
0: off 1: on
3
ANGLE (0x53)
0: off 1: on
2
GYRO (0x52)
0: off 1: on
1
ACC (0x51)
0: off 1: on
0
TIME (0x50)
0: off 1: on
Example: FF AA 02 3E 00 (set to output only acceleration, angular velocity, angle, magnetic field, port status)
Register Name: RRATE Register Address: 3 (0x03) Read and write direction: R/W
Default: 0x0006
Bit
NAME
FUNCTION
15:4
Set output rate
0001(0x01): 0.2Hz
0010(0x02): 0.5Hz
0011(0x03): 1Hz
0100(0x04): 2Hz
0101(0x05): 5Hz
3:0
RRATE[3:0]
0110(0x06): 10Hz
0111(0x07): 20Hz
1000(0x08): 50Hz
1001(0x09): 100Hz
1011(0x0B): 200Hz
1011(0x0C): single return
1100(0x0D): No return
Example:FF AA 03 03 00(set 1Hz output)
BAUD
Register Name: BAUD Register Address: 4 (0x04) Read and write direction: R/W
Default: 0x0002
Bit
NAME
FUNCTION
15:4
3:0
BAUD[3:0]
Set the serial port baud rate: 0000(0x00): 1000000bps
0001(0x01): 800000bps
0010(0x02): 500000bps
0011(0x03): 400000bps
0100(0x04): 250000bps
0101(0x05): 200000bps
0110(0x06): 125000bps
0111(0x07): 100000bps
1000(0x08): 80000bps
1001(0x09): 50000bps
1010(0x0A): 40000bps
1011(0x0B): 20000bps
1100(0x0C): 10000bps
1101(0x0D): 5000bps
1110(0x0E): 3000bps
Example: FF AA 04 02 00 (set serial port baud rate 500000)
AXOFFSET~HZOFFSET
Register Name: AXOFFSET~HZOFFSET Register Address: 5~13 (0x05~0x0D) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:0
AXOFFSET[15:0]
Acceleration X-axis bias, actual acceleration offset=AXOFFSET[15:0]/10000(g)
15:0
AYOFFSET[15:0]
Acceleration Y-axis bias, actual acceleration offset=AYOFFSET[15:0]/10000(g)
15:0
AZOFFSET[15:0]
Acceleration Z-axis bias, actual acceleration offset=AZOFFSET[15:0]/10000(g)
15:0
GXOFFSET[15:0]
Angular velocity X-axis bias, actual angular velocity offset=GXOFFSET[15:0]/10000(°/s)
15:0
GYOFFSET[15:0]
Angular velocity Y-axis bias, actual angular velocity offset=GYOFFSET[15:0]/10000(°/s)
15:0
GZOFFSET[15:0]
Angular velocity Z-axis bias, actual angular velocity offset=GZOFFSET[15:0]/10000(°/s)
15:0
HXOFFSET[15:0]
Magnetic field X-axis zero bias
15:0
HYOFFSET[15:0]
Magnetic field Y axis zero bias
15:0
HZOFFSET[15:0]
Magnetic field Z axis zero bias
Example: FF AA 05 E8 03 (set acceleration X-axis zero offset 0.1g), 0x03E8=1000, 1000/10000=0.1(g)
IICADDR
Register Name: IICADDR Register Address: 26 (0x1A) Read and write direction: R/W
Default: 0x0050
Bit
NAME
FUNCTION
15:8
7:0
IICADDR[7:0]
Set the device address for I2C and Modbus communication
0x01~0x7F
Example: FF AA 1A 02 00 (set the device address to 0x02)
Register Name: LEDOFF Register Address: 27 (0x1B) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:1
0
LEDOFF
1: Turn off the LED light
0: Turn on the LED light
Example: FF AA 1B 01 00 (turn off the LED light)
Register Name: MAGRANGX~MAGRANGZ Register Address: 28~30 (0x1C~0x1E) Read and write direction: R/W
Default: 0x01F4
Bit
NAME
FUNCTION
15:0
MAGRANGX[15:0]
Magnetic field calibration X-axis range
15:0
MAGRANGY[15:0]
Magnetic Field Calibration Y-axis Range
15:0
MAGRANGZ[15:0]
Magnetic field calibration Z-axis range
Example: FF AA 1C F4 01 (set the magnetic field calibration X-axis range to 500)
Register Name: BANDWIDTH Register Address: 31 (0x1F) Read and write direction: R/W
Default: 0x0004
Bit
NAME
FUNCTION
15:4
3:0
BANDWIDTH[3:0]
Set bandwidth 0000(0x00): 256Hz
0001(0x01): 188Hz
0010(0x02): 98Hz
0011(0x03): 42Hz
0100(0x04): 20Hz
0101(0x05): 10Hz
0110(0x06): 5Hz
Example:FF AA 1F 01 00(set bandwidth is188Hz)
Register Name: GYRORANGE Register Address: 32 (0x20) Read and write direction: R/W
Default: 0x0003
Bit
NAME
FUNCTION
15:4
3:0
GYRORANGE[3:0]
Set the gyro range 0011(0x03): 2000°/s
The default is 2000°/s, fixed and cannot be set
Example: FF AA 20 03 00 (set the gyro range to 2000°/s)
Register Name: ACCRANGE Register Address: 33 (0x21) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:4
3:0
ACCRANGE[3:0]
Set the accelerometer range 0000(0x00): ±2g
0011(0x03): ±16g
This parameter cannot be set. The internal adaptive acceleration range of the product will automatically switch to 16g when the acceleration exceeds 2g.
Example: FF AA 21 00 00 (set the accelerometer range to 16g)
Register Name: SLEEP Register Address: 34 (0x22) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:1
0
SLEEP
set hibernate 1(0x01): sleep
Any serial port data, can wake up
Example: FF AA 22 01 00 (go to sleep)
Register Name: ORIENT Register Address: 35 (0x23) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:1
0
ORIENT
Set the installation direction
0 (0x00): horizontal installation
1(0x01): vertical installation (the Y-axis arrow of the coordinate axis must be upward)
Example: FF AA 23 01 00 (set vertical installation)
Register Name: AXIS6 Register Address: 36 (0x24) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:1
0
AXIS6
set algorithm
0(0x00): 9-axis algorithm (magnetic field solution navigation angle, absolute heading angle)
1(0x01): 6-axis algorithm (integral solution navigation angle, relative heading angle)
Example: FF AA 24 01 00 (set 6-axis algorithm mode)
Register Name: FILTK Register Address: 37 (0x25) Read and write direction: R/W
Default: 0x001E
Bit
NAME
FUNCTION
15:0
FILTK[15:0]
Range: 1~10000, the default is 30 (it is not recommended to modify, once modified, if the angle does not meet the requirements for use, please modify it to 30)
The smaller the FILTK[15:0], the stronger the seismic performance and the weaker the real-time performance.
The larger the FILTK[15:0], the weaker the seismic performance and the stronger the real-time performance.
Example: FF AA 25 1E 00 (set K value filter to 30)
Register Name: READADDR Register Address: 39 (0x27) Read and write direction: R/W
Default: 0x00FF
Bit
NAME
FUNCTION
15:8
7:0
READADDR[7:0]
Read register range: Please refer to "Register Table"
Example:
Send: FF AA 27 34 00 (read acceleration X axis 0x34) Return: 55 5F AXL AXH AYL AYH AZL AZH GXL GXH SUM
For details, please refer to "Read Register Return Value" in the "Read Format" chapter
Register Name: ACCFILT Register Address: 42 (0x2A) Read and write direction: R/W
Default: 0x01F4
Bit
NAME
FUNCTION
15:0
ACCFILT[15:0]
Range: 1~10000, the default is 500 (it is not recommended to modify, once modified, if the angle does not meet the requirements for use, please modify it to 500)
The smaller the ACCFILT[15:0], the stronger the seismic performance and the weaker the real-time performance.
The larger the ACCFILT[15:0], the weaker the seismic performance and the stronger the real-time performance.
This parameter is an empirical value, which needs to be debugged according to different environments. In the tractor environment,
ACCFILT[15:0] can be adjusted to 100, because the vibration of the tractor is serious and the anti-vibration performance needs to be improved
Example: FF AA 2A F4 01 (set acceleration filter 500)
Register Name: POWONSEND Register Address: 45 (0x2D) Read and write direction: R/W
Default: 0x0001
Bit
NAME
FUNCTION
15:4
3:0
POWONSEND[3:0]
Set the command to start:
0000(0x00): Turn off power-on data output
0001(0x01): Turn on power-on data output
Example: FF AA 2D 00 00 (turn on power-on data output)
Register Name: VERSION Register Address: 46 (0x2E) Read and write direction: R
Default: none
Bit
NAME
FUNCTION
15:0
VERSION[15:0]
Different products, different version numbers
Example:
Send: FF AA 27 2E 00 (read version number, 0x27 means read, 0x2E is version number register)
Return: 55 5F VL VH XX XX XX XX XX XX SUM
VERSION[15:0]=(short)(((short)VH<<8)|VL)
Register Name: YYMM~MS
Register address: 48~51 (0x30~0x33) Read and write direction: R/W Default: 0x0000
Bit
NAME
FUNCTION
15:8
YYMM[15:8]
mouth
7:0
YYMM[7:0]
year
15:8
DDHH[15:8]
hour
7:0
DDHH[7:0]
day
15:8
MMSS[15:8]
seconds
7:0
MMSS[7:0]
minute
15:0
MS[15:0]
millisecond
Example:
FF AA 30 16 03 (set year 22-03)
FF AA 31 0C 09 (set date 12-09)
FF AA 32 1E 3A (set minute seconds 30:58) FF AA 33 F4 01 (set ms 500)
Example:
Send: FF AA 27 30 00 (read version number, 0x27 means read, 0x30 is year month
register)
Returns: 55 5F YYMM[7:0] YYMM[15:8] DDHH[7:0] DDHH[15:8] MMSS[7:0] MMSS[15:8] MS[7:0] MS[15: 8] SUM
Register Name: AX~AZ
Register address: 52~54 (0x34~0x36) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
AX[15:0]
Acceleration X=AX[15:0]/32768*16g (g is the acceleration of gravity, preferably 9.8m/s2)
15:0
AY[15:0]
Acceleration Y=AY[15:0]/32768*16g (g is the acceleration of gravity, preferably 9.8m/s2)
15:0
AZ[15:0]
Acceleration Z=AZ[15:0]/32768*16g (g is the acceleration of gravity, preferably 9.8m/s2)
Register Name: GX~GZ
Register address: 55~57 (0x37~0x39) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
GX[15:0]
Angular velocity X=GX[15:0]/32768*2000°/s
15:0
GY[15:0]
Angular velocity Y=GY[15:0]/32768*2000°/s
15:0
GZ[15:0]
Angular velocity Z=GZ[15:0]/32768*2000°/s
Register name: HX~HZ
Register Address: 58~60 (0x3A~0x3C) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
HX[15:0]
Magnetic field X=HX[15:0] (unit:LSB)
15:0
HY[15:0]
Magnetic field Y=HY[15:0] (unit:LSB)
15:0
HZ[15:0]
Magnetic fieldZ=HZ[15:0] (unit:LSB)
Register Name: Roll~Yaw
Register address: 61~63 (0x3D~0x3F) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
Roll[15:0]
roll angleX=Roll[15:0]/32768*180°
15:0
Pitch[15:0]
picth angleY=Pitch[15:0]/32768*180°
15:0
Yaw[15:0]
heading angleZ=Yaw[15:0]/32768*180°
Register Name: TEMP Register Address: 64 (0x40) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
TEMP[15:0]
temperature=TEMP[15:0]/100℃
Register Name: PressureL~HeightH Register address: 69~72 (0x45~0x48) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
PressureL[15:0]
air pressure=((int)PressureH[15:0]<<16)|PressureL[15:0](Pa)
15:0
PressureH[15:0]
15:0
HeightL[15:0]
altitute=((int)HeightH[15:0]<<16)|HeightL[15:0](cm)
15:0
HeightH[15:0]
Register name: q0~q3
Register address: 81~84 (0x51~0x54) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
q0[15:0]
Quaternion0=q0[15:0]/32768
15:0
q1[15:0]
Quaternion1=q1[15:0]/32768
15:0
q2[15:0]
Quaternion=q2[15:0]/32768
15:0
q3[15:0]
Quaternion3=q3[15:0]/32768
Register Name: GYROCALITHR Register Address: 97 (0x61) Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:0
GYROCALITHR[15:0]
Set the gyroscope inactivity threshold:
Gyro static threshold=GYROCALITHR[15:0]/1000(°/s)
Example: Setting the Gyro Rest Threshold to 0.05°/s FFAA 61 32 00
When the angular velocity change is less than 0.05°/s and lasts for the time of "GYROCALTIME", the sensor recognizes it as stationary and automatically resets the angular velocity less than 0.05°/s to zero
The setting rule of the static threshold of the gyroscope can be determined by reading the value of the "WERROR" register. The general setting rule is: GYROCALITHR=WERROR*1.2, unit: °/s
This register needs to be used in conjunction with the GYROCALTIME register
Register Name: GYROCALTIME Register Address: 99 (0x63) Read and write direction: R/W
Default: 0x03E8
Bit
NAME
FUNCTION
15:0
GYROCALTIME[15:0]
Set gyroscope auto-calibration time
Example: Set gyroscope auto-calibration time to 500ms FF AA 63 F4 01
When the angular velocity change is less than "GYROCALITHR" and lasts for 500ms, the sensor recognizes that it is stationary and automatically resets the angular velocity less than 0.05°/s to zero
This register needs to be used in conjunction with the GYROCALITHR register
Register Name: KEY Register Address: 105 (0x69)
Read and write direction: R/W
Default: 0x0000
Bit
NAME
FUNCTION
15:0
KEY[15:0]
Unlock register: When performing a write operation, you need to set this register first
Example: Unlock, write 0xB588 to this register (other values are invalid)
FFAA 69 88 B5
Register Name: WERROR Register Address: 106 (0x6A) Read and write direction: R
Default: 0x0000
Bit
NAME
FUNCTION
15:0
WERROR[15:0]
Gyroscope change value=WERROR[15:0]/1000*180/3.1415926(°/s)
When the sensor is stationary, the "GYROCALITHR" register can be set by changing this register
Register Name: WZTIME Register Address: 110 (0x6E) Read and write direction: R/W
Default: 0x01F4
Bit
NAME
FUNCTION
15:0
WZTIME[15:0]
Angular velocity continuous rest time
Example: Set the angular velocity continuous static time to 500ms FFAA 6E F4 01
When the angular velocity is less than "WZSTATIC" for 500ms, the angular velocity output is 0, and the Z-axis heading angle is not integrated
This register needs to be used in conjunction with the "WZSTATIC" register
Register Name: WZSTATIC Register Address: 111 (0x6F) Read and write direction: R/W
Default: 0x012C
Bit
NAME
FUNCTION
15:0
WZSTATIC[15:0]
Angular velocity integration threshold=WZSTATIC[15:0]/1000(°/s)
Example: Set the angular velocity integration threshold to 0.5°/s FF AA 6F F4 01
When the angular velocity is greater than 0.5°/s, the Z-axis heading angle starts to integrate the acceleration
When the angular velocity is less than 0.5°/s, and the duration set by the register "WZTIME", the angular velocity output is 0, and the Z-axis heading angle is not integrated
This register needs to be used in conjunction with the "WZTIME" register
Register Name: XREFROLL~YREFPITCH Register address: 121~122 (0x79~0x7A) Read and write direction: R/W
Default: 0x00000
Bit
NAME
FUNCTION
15:0
XREFROLL[15:0]
Roll angle zero reference value=XREFROLL[15:0]/32768*180(°)
15:0
YREFPITCH[15:0]
Pitch angle zero reference value=YREFPITCH[15:0]/32768*180(°)
Example: The current roll angle is 2°, set the roll angle zero, subtract 2°, then XREFROLL[15:0]=2*32768/180=364=0x016C
FFAA 79 6C 01
Register Name: NUMBERID1~NUMBERID6 Register address: 127~132 (0x7F~0x84) Read and write direction: R
Default: none
Bit
NAME
FUNCTION
15:0
NUMBERID1[15:0]
15:0
NUMBERID2[15:0]
15:0
NUMBERID3[15:0]
15:0
NUMBERID4[15:0]
15:0
NUMBERID5[15:0]
15:0
NUMBERID6[15:0]
Device label:WT4200000001
Last updated