??? 10/17/08 18:58 Read: times |
#159165 - Hmmm Responding to: ???'s previous message |
If it works in the simulator but not on the actual hardware then you have to consider how the simulator differs from the real world. For example the simulator doesn't take into account electrical characteristics.
Put a scope on the I2C bus - do you see the start condition? Check the voltages on the microcontroller pins - are they within the spec. Can you download and run a simple program to toggle a pin? Verify it works with a scope on the pin. etc. When you ran the code in the simulator were you able to put a breakpoint at the start of the ISR and see the values in the I2C registers? Is the interrupt triggered more than once? Is the I2C state machine going through the correct states? Andy |