6 1-wire commands, 1 device identification, 2 protocol – Matrix Orbital PK202-24-USB User Manual
Page 29

This command will set the PWM frequency for startup. It does not alter the current PWM base frequency.
Refer to the “Set PWM base frequency” command for valid values of index.
6 1-Wire Commands
The 1-wire bus is capable of communicating with many devices over a single wire plus a ground refer-
ence. This chapter deals with the capabilities of the display and a brief introduction to the 1-Wire standard.
For more detail consult
¡ ¡ £¢v
%$"
S 7c&§w¢F
6.1 Device Identification
Each 1-wire device contains a unique 64-bit address in which to identify them with. The address is
guaranteed to be unique from any other device, allowing a virtually unlimited number of devices on to be
attached to the bus. The address itself contains a family code and a cyclic redundancy check (CRC). The
family code is unique to a particular device model. For example, the family code for the DS18S20 temper-
ature probes is 10H. The CRC byte is included as a verification that the correct address was transmitted or
received.
6.2 Protocol
The transaction sequence for accessing a 1-wire device is as follows;
1. Reset and detect presence.
2. ROM command, followed by any required data exchange.
3. Device specific function command, followed by any required data exchange.
Before communication can begin, the bus must be reset to force all devices to begin listening. After the
reset, all the devices will transmit a presence pulse which indicates that there is at least one device on the
bus. Once the presence of at least one device has been confirmed, the master must select which group of
devices will be involved in the rest of the transaction. A device will use a ROM command to determine if the
following transaction is intended for it. If not, the device will ignore all communication on the bus until the
next bus reset. Otherwise, the device will read and process the rest of the transaction. The final part of the
transaction is the device specific function command. To determine what functions the device will respond
to, consult the devices’ data sheet.
It is very important to follow this sequence for every transaction. If any of these steps are omitted or
performed in the wrong order, the devices will not respond.
None of the device addresses are known ahead of time, and as such, each of their addresses must be
searched out and determined. The 1-wire bus provides a means of searching the bus for devices and deter-
mining their address.
Matrix Orbital
PK202-24-USB
25