I have a problem with my board when I try to write data to a serial (I2C) RAM (FM24C16B).
I use PortF bits 2&3 with two 4.7K resistors (pull ups) and a bit banged I2C.
Transfers are correct as long as I do no set or clear any other PortF pin (prior to a transfer).
If I do then on the first byte that i send, the serial RAM does not acknowledge.
It also happens if I set a pin that is already set (I did it for testing).
Repeating transfers always fail.
Initially I used the on chip I2C interface but I had problems too. After a complete
transfer (Stop condition) the BUSY flag was set (not normal) and after the next transfer
the arbitration lost flag, ending as an unsucessful transfer.
There are no interrupt routines. The loads on PortF pins are small (optocouplers) and
are active when the port pins are cleared.Drive strength and slew rate are normal.
I use Codewarrior 6.3 assembler for the program.
To solve the problem I did the following:
Changed resistor values to 1.8K
Changed the MCU. The problem remains.Next step is to change the serial RAM...