Dallas one-wire, Piezo buzzer – Matrix Orbital GLK24064-25 Legacy User Manual
Page 35

35
7. Dallas One-Wire
7.1. Search for a One-Wire
Device
Dec
Hex
254 200 2
FE C8 02
Sends a search query to each of the up to 32 devices on the one wire bus. Any connected device will respond with
an identification packet.
Response
14 bytes, identification packet as shown below
Table 32: Dallas One-Wire Packet Information
Offset Length Value
Description
0
2
9002
Preamble
2
1
138
Another device packet will follow
OR
10
Last device packet
3
1
49
Packet Type
4
1
0
Error Code (0 indicates success)
5
8
Device Address
13
1
0
CRC8 address check (0 indicates validity)
7.2. Dallas One-Wire
Transaction
Dec
Hex
254 200 1
FE C8 01
Flags Send Bits Receive Bits Data
Flags Send Bits Receive Bits Data
Performs a single Dallas 1-Wire transaction. Consult your device documentation for information regarding device
specific protocols. If an error is encountered, a corresponding value will be returned by the device.
Flags
1 byte, flags for transaction, see below
Send Bits
1 byte, number of bytes to be sent to the device
Receive Bits
1 byte, number of bytes expected to be received from the device
Data
Variable, data to be transmitted LSB to MSB
Table 33: Dallas One-Wire Flag Table
Bit
Flag Description
7
6
Unused
5
4
0 (Future Compatibility)
3
Add CRC8 to transaction
2
0 (Future Compatibility)
1
Read CRC8 from transaction
0
Reset Bus prior to transaction
Table 34: Dallas One-Wire Error Table
Code
Error Description
0
Success
1
Unknown Command
2
No Devices Found
3
Fatal Search Error
8. Piezo Buzzer
8.1. Activate Piezo Buzzer
Dec
Hex
254 140
FE 8C
Time
Time
Activates a 488Hz buzz from the onboard piezo buzzer for a specified length of time.
Time
Length of buzzer sound in 100ms.