- Baud rate: 9600 or 115200
- Provide 51 single-chip microcomputer program
- Provide the stm32 program
پروتکل ارتباطی:
- A serial port to send command byte
1).( A serial port communication parameters (baud rate, the default value of 115200 BPS, it can be set through software
Baud rate: 9600 BPS check digit: N data bits, stop bits: 1
Baud rate: 115200 BPS check digit: N data bits, stop bits: 1
2).( Type the command module, the external controller to GY - MCU90615 module (hexadecimal
1. Frame head: 0 xa5
(Instruction format: frame head + command + checksum (8 bit) (such as read automatically temperature instruction = 0 xa5 + 0 x45 + 0 xea
2. :Command
(Continuous output instructions
(0 xa5 + 0 x45 + 0 xea---------- temperature data (module return 0 x45 data type
:Query output command
(0 xa5 + 0 x15 + 0 xba ----------- temperature data (module return 0 x45 data type
(Configuration instructions: come into force after the restart when power supply drop
:Baud rate configuration
0 xa5 + 0 xae + 0 x53 ---------- 9600
0 xa5 + 0 xaf + 0 x54 ----------115200 (the default
:Electricity is sent automatically temperature data configuration
(0 xa5 + 0 x51 + 0 xf6 ---------- after power on automatically output temperature data
(0 xa5 + 0 x52 + 0 xf7 ---------- after the electricity is not automatically output temperature data (the default
- :A serial port to receive
1) (A serial port communication parameters (baud rate, the default value of 115200 BPS, it can be set through software
Baud rate: 9600 BPS check digit: N data bits, stop bits: 1
Baud rate: 115200 BPS check digit: N data bits, stop bits: 1
2). :(Modules, output formats, each frame contains 9 bytes (hexadecimal
1. Byte0: 0x5a frame head mark
2. Byte1: 0x5a frame head mark
3. (Byte2: 0x45 this frame data types (0 x45: temperature data
4. (Byte3: 0x04 data (the four data 2 group as an example
5. Byte4: 0 x00 - 0 XFF data 1 high order 8-bit
6. Byte5: 0 x00 - 0 XFF data 1 low order 8-bit
7. Byte6: 0x00 to 0 XFF data 2 high order 8-bit
8. Byte7: 0 x00 - 0 XFF data 2 low order 8-bit
9. (Byte8: 0 x00 - 0 XFF checksum (low data accumulation and front, leaving 8
3) data calculation method
- :Temperature calculation method
(Low temperature high = 8 8 | < < 8 bits (results for practical Angle is multiplied by 100
Example: send instructions: A5 45 EA, receives a frame of data:
< 5 a - a - 45-04-0 c - 78-19 - A7 > 0 d -
Indicates TO (signed 16 bit, represents the target temperature) : TO = 0 x0c78/100 = 31.92
Indicates TA (signed 16 bit, environment temperature) : TO = 0 x0d19/100 = 33.53
دیدگاه خود را بنویسید