Go Down

Topic: DS2482-800 1-wire master  serial (Read 1 time) previous topic - next topic


Aug 06, 2010, 04:53 am Last Edit: Aug 06, 2010, 06:33 am by xpxp1719 Reason: 1
Dear arduino fans[ch65306]
    I want to use the one wire master ds2482  to control the ds2413 in long disance.Now the application note say that use the one wire command A5h to wire a byte in one wire.But now I want to send a serial data to one wire.The application have a operation OWBlock which used to send a serial data.But it don't give the HEX code for OWBlock such like A5h. I ask the code for OWBlock.and If you have some experience in one wire master,give me some advise or code for sending serial data to one wire! thank you! :-?
Code: [Select]
#include <OneWire.h>
#include <Wire.h>
//#include <DS2842.h>

void setup()
void loop()
 Wire.beginTransmission(0x1c);  //the address             
 Wire.send(0xF0);    //reset the devices
 Wire.send(0xA5);    //one wire write             ds2482 protocal
 Wire.send(0x55);    //match ID                ds2413 protocal
 Wire.send(0x3A);    // ds2413 protocal say the ID must follow the match command
 Wire.send(0x3A);              //ID end
 Wire.send(0x5A);              // PIO Access write        ds2413 protocal
 Wire.send(0xFD);              // PIO status write
 Wire.send(2);                   //  PIO status complement

I use the USBee to see the wave. It only show me that transmit the only byte 3A. So I want to send

Go Up