Datasheet
ASAIR
®
6
/
8
Figure 9 Single Bus Decomposition Timing Diagram
、
5.5 Peripheral read flow chart
The flow chart diagram of AM2311A sensor read one-wire
bus is shown in figure 11. At the same time, our company
also provides an example of reading code. For customers
who need to download, please log on our company's
website (www.aosong.com) for relevant downloading.
、、
www.aosong.com Guangzhou Aosong Electronics Co.,Ltd. Tel: 400-630- 5378 Versior:V1. 0
AM2311A Technical Manual
Table 7 One-wire bus signal characteristics
Note: To ensure accurate communication of the sensor, please
strictly in accordance with parameters and timing design of Table 7
and Figure 8 when reading the sensors.
5.4 Peripheral read step example
Communication between the host and the sensor can
complete by the following three steps.
Step 1:
After the AM2311A is powered on (the AM2311A will
wait 2S to go beyond the unstable state, during which
time the device can not send any instructions), test the
environment temperature and humidity data, and
record the data, then the sensor automatically goes to
sleep. AM2311A SDA data line pulled up by the pull-up
resistor and then would keep high, at this state,
AM2311A is detect the external signal continuously,
and its SDA pin in the input state.
Step 2:
The I/O of the microprocessor is set to output and the
output is low, and the low hold time can not be less than
1ms. Then the microprocessor's I / O is set to the input
state, the bus is released. When the host release bus,
AM2311Asend a response signal, mean 80ms low
output as a response signal. After that an 80ms high
output to inform the peripherals ready to receive data,
the signal transmission shown in Figure 9:
Step 3:
After AM2311A sends the response, then the data bus
SDA continuously outputs 40 bits of data, and the
microprocessor receives 40 bits of data according to the
change of I/O level.
The format of the bit data "0" is: 50 ms low level plus
26-28 ms high level;
The format of the bit data "1" is: 50 ms low level plus
70 ms high leve;
The format of the bit data "0", bit data "1" are shown in
Figure 10.
Symbol Parameter min type max Units
T
be
Time of the host start signal is pulled low 0.8 1 20 mS
T
go
Time of the host releases the bus 10 30 200 µS
T
rel
Time to response low level 75 80 85 µS
T
reh
Time to response high level 75 80 85 µS
T
LOW
Signal“0”“1”low level time 48 50 55 µS
T
H0
Signal“0”high level time 22 26 30 µS
T
H1
Signal “1”high level time 68 70 75 µS
T
en
Time of the sensor releases the bus 45 50 55 µS
Figure 10 One-wire bus decomposition sequence diagram
After the data bus SDA of AM2311A outputs 40-bit data, it
continues to output the low level for 50 microseconds and
then turns to the input state. Due to the pull-up resistance,
it then changes to the high level.At the same time, the
internal temperature and humidity data of AM2311A were
retested, and the data were recorded. After the test record
was completed, the microcontroller automatically entered
the sleep state.MCU only received the host after the start
of the signal, to re-wake the sensor, into the working state.