Skip to main content
Topic: Trouble using bit bang mode with 1-wire protocol ?.. (Read 457 times) previous topic - next topic

Trouble using bit bang mode with 1-wire protocol ?..

Hello,

I'm playing around with python scripting for the BP through the bit bang mode. I've got a Dallas 1-wire temperature sensor (18B20) that I have no problem communicating with through the serial terminal.  When I try to do the same through bit bang mode I'm unable to read data. Here's what I'm attempting:

1. Open the proper port
2. Send as string of twenty 0x00 to put it in bit bang mode (sends back BBIO1 as expected)
3. Send 0x04 to get into 1-wire mode (sends back 1W01 as expected)
4. Turn on voltage regulator by sending 0x48 (LED lights up as expected)
5. Scan for 1-wire address by sending 0x08 (Expected address comes back)
Here's where the problems start?
6. I need to send a matchrom signal (0x55) followed by the 8-byte address, then the start conversion command (0x44). I send the bulkwrite command in front of these like so: 0x19 0x55 0x28 0xa8 0xcd 0x5e 0x02 0x00 0x00 0xaf 0x44. I get back a six 0x01.
7 I then need to read the temp so I send 0xbe instead of 0xhh at the end: 0x19 0x55 0x28 0xa8 0xcd 0x5e 0x02 0x00 0x00 0xaf 0xbe.

No dice. I get a string of 0x01 back again.

Any idea why I'm not getting the expected results for steps 6 and 7?

thanks
jackyjoy