Am 02.04.24 um 06:16 schrieb Gregg Levine:
Hello! I've a new project taking shape at the moment. And it involves
making use of OWFS on the Raspberry Pi, a Pi Zero Wifi WH device in
fact. And I recalled that when I enabled the GPIO settings such as
the Serial port there, and typically the I2C settings, I would see
but not enable the one for One-Wire. Now the question is one of which
GPIO one that the system selected. The website makes a reference to
someone's work, but does not provide references.
The bitbanging onewire host works with GPIO4 (pin 7 on the 40-pin
connector) by default on the Raspberry Pi. Use
dtoverlay=w1-gpio
in /boot/config.txt. You can also select a different GPIO with
dtoverlay=w1-gpio,gpiopin=4
with 4 being the GPIO you want. (Note those are called "gpiopin" but
it's not the pin numbers on the 40-pin connector but the GPIO numbers.)
The additional option pullup=1 may be used to enable the high-side
transistor of the GPIO for a strong pullup during some operations.
Note that the Raspberry Pi is a 3.3V device, so that Onewire is going to
be a 3.3V Onewire. You have to wire a 1.5kΩ resistor to +3.3V to make it
work correctly. If you need a 5V Onewire instead, use a level shifter as
this one:
|
| +5V ----. ,-----+---- +3.3V
| | | |
| \ G | \
| / –––––' /
| \ ––– – ––– \
| | | ^ | |
| 5V bus line ---+-----' '--+-----+---- 3.3V bus line
| D S
|
The transistor is a small signal N-channel enhancement mode MOSFET, e.g.
a 2N7000, BS170 or MMBF170. The +5V pullup must be around 2.7kΩ.
Kind regards
Jan
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers