You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -216,12 +216,14 @@ App|Description
216
216
---|---
217
217
[hello_pio](pio/hello_pio) | Absolutely minimal example showing how to control an LED by pushing values into a PIO FIFO.
218
218
[apa102](pio/apa102) | Rainbow pattern on on a string of APA102 addressable RGB LEDs.
219
+
[clocked_input](pio/clocked_input) | Shift in serial data, sampling with an external clock.
219
220
[differential_manchester](pio/differential_manchester) | Send and receive differential Manchester-encoded serial (BMC).
220
221
[hub75](pio/hub75) | Display an image on a 128x64 HUB75 RGB LED matrix.
221
222
[i2c](pio/i2c) | Scan an I2C bus.
222
223
[ir_nec](pio/ir_nec) | Sending and receiving IR (infra-red) codes using the PIO.
223
224
[logic_analyser](pio/logic_analyser) | Use PIO and DMA to capture a logic trace of some GPIOs, whilst a PWM unit is driving them.
224
225
[manchester_encoding](pio/manchester_encoding) | Send and receive Manchester-encoded serial.
226
+
[onewire](pio/onewire)| A library for interfacing to 1-Wire devices, with an example for the DS18B20 temperature sensor.
225
227
[pio_blink](pio/pio_blink) | Set up some PIO state machines to blink LEDs at different frequencies, according to delay counts pushed into their FIFOs.
226
228
[pwm](pio/pwm) | Pulse width modulation on PIO. Use it to gradually fade the brightness of an LED.
227
229
[spi](pio/spi) | Use PIO to erase, program and read an external SPI flash chip. A second example runs a loopback test with all four CPHA/CPOL combinations.
@@ -232,7 +234,6 @@ App|Description
232
234
[uart_tx](pio/uart_tx) | Implement the transmit component of a UART serial port, and print hello world.
233
235
[ws2812](pio/ws2812) | Examples of driving WS2812 addressable RGB LEDs.
234
236
[addition](pio/addition) | Add two integers together using PIO. Only around 8 billion times slower than Cortex-M0+.
235
-
[clocked_input](pio/clocked_input) | Shift in serial data, sampling with an external clock.
This example demonstrates how to use link:https://www.analog.com/en/technical-articles/guide-to-1wire-communication.html[1-Wire] devices with the Raspberry Pi Pico (RP2040).
4
+
1-Wire is an interface that enables a master to control several slave devices over a simple shared serial bus.
5
+
6
+
The example provides a 1-Wire library that is used to take readings from a set of connected link:https://www.analog.com/media/en/technical-documentation/data-sheets/ds18b20.pdf[DS18B20] 1-Wire temperature sensors. The results are sent to the default serial terminal connected via USB or UART as configured in the SDK.
7
+
8
+
The library uses a driver based on the RP2040 PIO state machine to generate accurate bus timings and control the 1-Wire bus via a GPIO pin.
9
+
10
+
_1-Wire(R) is a registered trademark of Maxim Integrated Products, Inc._
11
+
12
+
== Wiring information
13
+
14
+
Connect one or more DS18B20 sensors to the Pico as shown in the diagram and table below.
15
+
16
+
Connect GPIO 15 to 3V3(OUT) with a pull-up resistor of about 4k ohms.
0 commit comments