Hi,
I've written some code that writes and reads to some i2c enabled
devices. I have written this code on the ATMega32 running on 3.68 Mhz
and everything works fine. TWBR = 10 (no prescaler), so according to the
datasheet the i2c interface should run at 100khz.
I now want to run the same code on an ATMega128 running as 16 Mhz. So I
changed the target to atmega128, changed the F_CPU define and changed
TWBR to 72 (still no prescaler). The code compiles and runs, but when I
try to write to a i2c address the code throws an bus error (TW_STATUS =
0) after writing the slaveaddress.
Got any suggestions were to look for the cause / solution? Is there a
extra fuse or register on the ATMega128 I should know about? The
ATMega103 compatibility mode Fuse has already waisted a lot of my time
:-( so it aint that.
Thanks in advanced for your help.
grz,
Onno
Ps.
I run the ATMega32 on an stk500 with the onboard oscilator running at
3.68 Mhz. SDA on Pc1 and SCL on Pc0
The ATMega128 I run on the stk501 addon with an external cristal running
at 16 Mhz. SDA on Pd1 and SCL on Pd0
Both pullups on the SCL and SDA line are 10k
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list