Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HydraFW 1 wire guide
HydraFW Bus 1-wire
Bus: 1-wire Connections: One pin and ground Output types: open drain/open collector Pull-up resistors: required for open drain output mode (2K – 10K). Pull-up/down resistors Integrated in MCU: Between 30 to 50K (Typical 40K). Maximum voltage: 5.5volts (5volt safe)
This guide is updated towards firmware release HydraFW v0.9 Beta
Protocol configuration syntax description:
showShow 1-wire parameters or
show pinsShow pins used in this mode
floatingto choose internal MCU pull up/down or no pull/external
lsb-firstto send/receive respectively MSB first or LSB first.
scanDiscovers device on the 1-wire bus and displays their addresses.
exitto exit 1-wire mode
Note default value: > 1-wire Device: onewire1 GPIO resistor: floating Bit order: LSB first
onewire1> show pins PIN: PB11
Protocol configuration example:
Configuration of onewire1 wit internal pullup :
> 1-wire Device: onewire1 GPIO resistor: floating Bit order: LSB first onewire1> pull up onewire1> show Device: onewire1 GPIO resistor: pull-up Bit order: LSB first onewire1>
Protocol interaction syntax description:
trigger configures the trigger mode
read Read one byte. (r:1…255 for bulk reads)
hd Read one byte. (hd:1…4294967295 for bulk reads). Displays a hexdump of the result (See Hexdump guide)
write Followed by values to write byte(s). (w:1…255 for bulk writes)
0 Write this Octal value. Format is prefixed by a 0 (values from 000 to 077)
0b Write this binary value. Format is 0b00000000 for a byte, but partial bytes are also fine: 0b1001.
0x Write this HEX value. Format is 0x01. Partial bytes are fine: 0xA. A-F can be lower-case or capital letters.
0-255 Write this decimal value. Any number not preceded by 0x or 0b is interpreted as a decimal value.
" Write an ASCII-encoded string
Write support optional repeat
: (eg.: 10:1…255 for repeated write of same value 10 in this example)
space Value delimiter.
Use a space to separate numbers/commands.
Any combination is fine, delimiter is required between each number/command, example:
[ 0x1 0xff 0 10 0b11 077 ]
& Delay 1uS. (&:1…1000000 for multiple delays)
% Delay 1mS. (%:1…1000000 for multiple delays)
~ Write a random byte. (~:10 repeats the same random byte 10 times)
Protocol interaction example usage onewire1 write/read:
onewire1> scan Discovered devices : 28 FF 10 2E A6 15 01 3B onewire1> [ 0x33 hd:8 WRITE: 0x33 28 FF 10 2E A6 15 01 3B | (......;
Additional informations about 1-wire
For more information about the 1-wire protocol, see : https://www.maximintegrated.com/en/app-notes/index.mvp/id/1796