
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
Oke its great It gives no errors anymore I understand your explanation and saved it So I can learn more about i2C I2C Bus Extender order number 198280 I can not order it in Holland But is easy to make this myself So I can go on with this. Hans > > Corrected: > > AHA! > > Now I know why you are getting a lot of I2C Errors! > > You have not connected pins 5, 6 and 7. > > Pins 5, 6 and 7 are the I2C address selection pins and must also be connected to Vcc orGND. > > My example program uses address &h90, this means that pins 5,6 and 7 must also be connected to GND. > > > > To connect a 2nd DS1621 you need a different address which can be adjusted with these pins. > > Example: for the 2nd DS1621 connect pin5 to GND, pin 6 to GND and pin 7 to Vcc. > > This will adjust the 2nd DS1621 address to &h92. > > > > I2C Write address of the DS1621: > > [1][0][0][1][A2 pin 5][A1 pin 6][A0 pin 7][0] > > > > As you can see: connecting pin 5,6 and 7 to GND will create I2C address 10010000 -> &h90 > > &h90 is now the write address and &h91 is the read address > > > > Connecting pin 5 and 6 to GND and pin 7 to Vcc will create I2C address 10010010 -> &h92 > > &h92 is now the Write address and &h93 is now the Read address. > > > > The Read address is always the Write address + 1 > > > > If you follow the above then a can create an example for reading 2 DS1621Â’s. > > > > Greetings, > > H.J. Windt > > > > > > > AHA! > > > Now I know why you are getting a lot of I2C Errors! > > > You have not connected pins 5, 6 and 7. > > > Pins 5, 6 and 7 are the I2C address selection pins and must also be connected to Vcc orGND. > > > My example program reads from address &h90, this means that pins 5,6 and 7 must also be connected to GND. > > > > > > To connect a 2nd DS1621 you need a different address which can be adjusted with these pins. > > > Example: for the second DS1621 connect pin5 to GND, pin 6 to GND and pin 7 to Vcc. > > > This will adjust the second DS1621 address to &h92. > > > > > > I2C read address of the DS1621: > > > [1][0][0][1][A2 pin 5][A1 pin 6][A0 pin 7][0] > > > > > > As you can see: connecting pin 5,6 and 7 to GND will create I2C read address 10010000 -> &h90 > > > > > > Connecting pin 5 and 6 to GND and pin 7 to Vcc will create I2C address 10010010 -> &h92 > > > > > > If you follow the above then a can create an example for reading 2 DS1621Â’s. > > > > > > Greetings, > > > H.J. Windt > > > > > > > Hallo > > > > > > > > I want to measure 2 temp. and store it in the CF card. > > > > One of them is the temperature outside. For this I need a cable of +/- 8 meters. > > > > I donÂ’t know anything of a 12C Expander. But I want to know more about this. > > > > > > > > I have connected 1 ds.1621 and pin1 on port9, pin2 on port10,pin4 on min and pin5 on +5volt thatÂ’s all. |
| Antwort schreiben |