Bus: 1-Wire (Dallas/Maxim 1-Wire protocol).
Connections: one pin (OWD) and ground.
Output types: open drain/open collector (pull-up resistor required).
Pull-up resistors: always required (2K – 10K, 2K or less for parasitic power parts).
Maximum voltage: 5.5volts (5volt safe).
1-Wire uses a single data signal wire. Most devices also require a power and ground connection. Some parts draw power parasitically through the 1-Wire bus and don’t require a separate power source.
| Syntax | Description |
| A/a/@ | Toggle auxiliary pin. Capital “A” sets AUX high, small “a” sets to ground. @ sets aux to input (high impedance mode) and reads the pin value. |
| D/d | Measure voltage on the ADC pin (v1+ hardware only). |
| W/w | Capital ‘W’ enables the on-board power supplies. Small ‘w’ disables them. (v1+ hardware only). |
| { or [ | 1-Wire bus reset. |
| ] or } | – |
| R or r | Read one byte. (r:1…255 for bulk reads) |
| 0b | Write this binary value. Format is 0b00000000 for a byte, but partial bytes are also fine: 0b1001. |
| 0h/0x | Write this HEX value. Format is 0h01 or 0×01. 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, 0h, or 0b is interpreted as a decimal value. |
| , | Value delimiter. Use a coma or space to separate numbers. Any combination is fine, no delimiter is required between non-number values: {0xa6,0, 0 16 5 0b111 0haF}. |
| & | Delay 1uS. (&:1…255 for multiple delays) |
| (#) | Run macro, (0) for macro list |
| Bitwise | |
| ^ | One clock tick, use data state from previous – or _ operation. (^:1…255 for multiple clock ticks) |
| / or \ | – |
| - or _ | Send 1-Wire 1 (-) or 0 (_) bit. |
| ! | Read one bit with clock. |
| . | – |
| Macro | Description |
| 0 | Macro menu |
| 1-50 | Reserved for device address shortcuts. |
| 51 | READ ROM (0×33) *for single device bus |
| 85 | MATCH ROM (0×55) *followed by 64bit address |
| 204 | SKIP ROM (0xCC) *followed by command |
| 236 | ALARM SEARCH (0xEC) |
| 240 | SEARCH ROM (0xF0) |
Notes:
1-Wire specifies a 2K or smaller resistor when working with parasitically powered devices. The Bus Pirate on-board pull-up resistors are 10K, so use an external pull-up resistor when working with these devices. Parasitically powered parts may appear to work with resistors larger than 2K ohms, but will fail certain operations (like EEPROM writes).
-
Wow…that was…um….who decided that these should be called guides? This told me nothing about how to read the information on a 1-wire device. Its not a guide, its more like a spec sheet….ish.
-
I understand how 1-wire works, what Im sayign is, when you call something a ‘guide’, it usually means that its an instruction of some sort.
This is a description of the 1-wire mode, I get that, but it is very misleading, thats all I am saying. You dont get a strategy ‘guide’ for a description of the game, you can read that on the back of the box.
I dunno, Im a complete newbie when it comes to the BP. I just got it in the mail, and extensive searching and googling and whathaveya only ever points me to info on how the stuff operates.
Im sorry, but I really am not interested in the how, so much as the how-to.
Maybe its just me, maybe Im just being a jerk because its early in the morning here, but maybe, just maybe, I have a point.
-
The chip demos show how-tos for dozens of chips, two are 1-wire. They both have some discussion of the 1-wire bus and how the part works:
http://dangerousprototypes.com/bus-pirate-manual/#demosEdit: I also changed the title to options instead of guide, is that less misleading?
-
Heh, Im sorry to cause a raucous, I mean. It was kinda misleading if you think about it. Realistically, its not a piece of hardware for a newbie, but we all gotta start somewhere. I did follow your link there and managed to figure out the iButton that I was working with, so thanks for that.
Off topic of the 1-wire stuff, is this thing capable of cloning? Or even better, rewriting the flash on a chip. ie. I semi-bricked a device (read: lost power during a firmware update), but I have the bin files for it. Can I interface said device with this and rewrite the flash?
Im sorta following how to do all of this, but at the same time, Im getting more confused. Like, I have old EEPROM chips, the kind you can erase with UV light, they are from a surveying insrument. One day, I forgot to put the main plate back on the body of the unit, and when I fired it up the next day, it seemed as though the chips were blank. The cables needed to interface and reconfigure the unit are proprietary and expensive as hell. We have another one, and Im wondering if I can use my BP to copy the chips from one to the other.
Maybe I should post this in the forums instead of asking you here. Sorry about that.
-
I’m glad you figured out your part. I haven’t tried the iButton, I’ll get one and do a demo soon.
I’m sorry you found the title misleading. Please remember that this is an open source device designed by volunteers, and documented and supported by volunteers. Compared to the stereotypical open source project, I think the documentation available is impressive. When you drop by to say our hard work sucks, it really does discourage participation. There was a discussion when we reformatted the old guide into these new pages, and they were well received.
The Bus Pirate can do all of the stuff you mention. You’ll need to get the manufacturer’s datasheet for the part, and then use these options pages as a reference on how to create the needed signals from the Bus Pirate interface. There’s also a Windows GUI for some EEPROM chips, support is going into a BIOS ROM flasher (flashrom), and there’s support for the Bus Pirate in AVRdude, which flashes some ROMs. Also, there’s a directory of user-submitted demo scripts in Python and Perl that you could modify to read or write your own chips.
The best resource for all things Bus Pirate related is the manual:
http://dangerousprototypes.com/bus-pirate-manual/The forum is also well attended, with several developers who can answer your questions right away.
-
Oh, I didnt mean to say that the work sucks, and I am deeply sorry if thats how I came off. I understand that it is developed by vounteers, Ive been using *nix for quite a long time, and I fully realize the load placed on the individuals who take the time out of their personal lives to make all of this possible.
Again, thank you so much for all of your information, and to all who have worked so hard on this project, I am very sorry if it came out that what you did was subpar so to speak.
-
Also, if you dont have any, I have a somewhat limitless supply of iButtons, I could send you a few to play around with if you like. I work in an engineering firm, and the large format color printer we have uses iButtons on the ink tanks to tell the machine what has been plugged in. We are actually about to swap the tanks out, so I will have 3 or 4 of them soon. Hit me up at djcalarco at seiengr.com if you want them.

9 comments
Comments feed for this article