i2c attiny85 non responsive

hello all, im not getting any response from this, im thinking the pcf itself might not be compatible since data sheet says compatible with most mcu’s. have gotten other code to work on attiny including blink and some home brew stuff. this is just a test to lead to better stuff, and ive tried 2 different ic’s and 2 different attiny’s. datasheet here http://www.ti.com/lit/ds/symlink/pcf8574.pdf also, instead of ‘0’ (all on) ive sent different data, ie 254h which is some on some off.

#include <TinyWireM.h>

// address of PCF8574 IC on TWI bus
#define IO_ADDR 0x20
byte data = 0;
byte alloff = 0xFF;
void setup() {
  TinyWireM.begin();        // initialize the I2C/TWI interface
void loop() {}

Have you tried it with an Arduino?

yes, works as expected with an arduino uno. im sorry i should have mentioned that.

Quote from http://playground.arduino.cc/Code/USIi2c:

By default the I2C master library (TinyWireM) is set to run at 1MHz. To run at 8MHz, #defines in USI_TWI_Master.h / .cpp must be changed. No changes are necessary for the I2C slave library (TinyWireS).

Is your Tiny running at 1MHz? If not, have you changed the defines?

Check for the return value of TinyWireM.endTransmission()!

yes i fused the attiny85 to 8mhz, and changed the lines in both .cpp and .h to reflect the same.

#define SYS_CLK   8000.0 
#define F_CPU 8000000UL

im going to check for the return in a bit, ripped down the setup to play with 1307 breakout board that just arrived ]:D

no return value, set return flag to "1", would change to "0" upon success. im using pullups also. tried with and without lol. im stumped. i guess without the return the attiny isnt doing anything? got sda on pb0(pin5) and sck on pb2(pin7). pin 8 vcc and pin 4 ground. address on i/o expander is 0x20, a0-a2 grounded.

I guess you don't have a scope or better a logic analyzer to check what's going on on the two lines.

no, but im going to try this project again. ill keep you posted. im gonna dump a simple i2c sketch, maybe just getting the 2 to talk to eachother, then move forward one piece at a time. thanks pylon.