Hello,
I'm trying to program a Siemens SDA3302-5 chip with an Attiny85 via I2C.
But the data coming out of the I2C Bus doesn't look like expected and the 3302 chip does not do what is should.... Does anybody have an idea?
This is what I have so far:
#include <TinyWire.h>
#define I2C_ADDR B011000000 // I2C Address selection on SDA3302-5 chip byte: 1 1 0 0 0 MA1 MA0 0 A
void setup(){
TinyWire.begin(); // initialize I2C lib
TinyWire.beginTransmission(I2C_ADDR);
TinyWire.send(B01100111); // Prog. divider byte 1
TinyWire.send(B01001101); // Prog. divider byte 2
TinyWire.send(B10101110); // Control info. byte 1
TinyWire.send(B00000000); // Control info. byte 2
TinyWire.endTransmission(); // Send to the slave
}
void loop(){
}
.
.
.
The description of the I2C bus on Siemens side is the following:
SCL, SDA
Data are exchanged between the processor and the PLL on the I2C bus. The clock is produced by the processor (input SCL), while pin SDA works as an input or output depending on the direction of the data (open collector; external pullup resistor). Both inputs have hysteresis and a low pass characteristic, which enhances the noise immunity of the I2C bus.
The data from the processor are applied to an I2C bus controller and filed in registers according to their function. When the bus is free, both lines are in the marking state (SDA, SCL are high). Each telegram begins with a start condition and ends with the stop condition.
Start condition: SDA goes low while SCL remains high;
Stop condition: SDA goes high while SCL remains high.All further data exchanges occur while SCL is low and are accepted by the controller with the positive clock edge. For what follows, refer to the table of logic allocations. All telegrams are transmitted byte by byte, followed by a ninth clock pulse, during which the controller puts the SDA line on low (acknowledge condition). The first byte consists of seven address bits, with which the processor selects the PLL from a number of peripheral devices (chip select). The eighth bit is always low. In the data portion of the telegram the first bit of the first or third data byte determines whether a divider ratio or control information follows. In each case the byte following the first byte must be of the samedata type (or a stop condition).
.
.
The only signal I see is:
https://i.ibb.co/c3W61WJ/MAP001.png
Does anybody know if this is possible?
Best regards
Sebastian
