Parse single-Bus Protocol (1-wire)

Source: Internet
Author: User
Tags reset

one, single Bus Protocol (1-wire)

1. Definition: The host and slave through 1 lines of communication, on a bus can be attached to the number of slave devices almost unrestricted.

2. Features: This is a communications technology introduced by Dallas Semiconductor. It uses a single signal line, both to transmit the clock, but also to transfer data, and data transmission is bidirectional.

3. Advantages: Single-bus technology has simple circuit, less hardware, low cost, easy bus expansion and maintenance.

second, single-bus communication process

1. Initialization

Initialization process = reset Pulse + slave response pulse.

The host generates a reset pulse by pulling down the single bus 480 ~ 960 us, then releasing the bus and entering the receive mode. When the host releases the bus, it produces a low-level hop to a high rising edge, and the single-bus device detects the rising edge, and the delay is up to $ US, and the single-bus device pulls down the bus for the response pulse. The host receives the slave's response pulses indicating that the single-bus device is ready and the initialization process is complete.

The initialization sequence diagram looks like this:


2. Write gap

There are two types of write clearances, including write 0 time slots and write 1 time slots.

When the data line is pulled down, the data line is sampled in the time window of ~ us. If the data line is low, write 0, or write 1 if the data line is high. The host to generate a write 1 o'clock gap, you must pull down the data line, in the write time after the gap begins to allow the data line to pull high. To generate a write-0 o'clock Gap, the host must pull down the data line and keep it up to us.

The time-of-write gap timing diagram is as follows:


3. Read-Time Clearance

When the host pulls the bus down is, and remains at least 1 us after releasing the bus, the data must be read within the US.

The read-time gap timing diagram is as follows:


three, single-bus communication equipment

For example, DS18B20, DHT11, etc. are all used for single-bus protocol communication.

Reference program for temperature sensor DS18B20 Link: http://blog.csdn.net/zhengqijun_/article/details/52515977



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.