steve smith

V1 (mcf51jm128) IIC problems

Discussion created by steve smith on Oct 30, 2008
Latest reply on Nov 4, 2008 by steve smith
I'm trying to setup the mcf52jm I2C controller and having problems I did not see on V2 parts (thought this was a quick 1-hour job!). The example code in AN3464 does not seem to work (although the V2 examples are fine). I find the def's in the V1 headers do not properly set IIC register values. For example, lines like:

IIC1C1 &= ~IIC1C1_MST;  // do not correctly write and will not generate the stop

However, editing to:
IIC1C1 &= ~IIC1C1_MST_MASK;  // correctly generate a stop condition

Once I fix that, it's very buggy (hangs) on repetitive reads or writes (i'm trying to setup an eeprom). Scope SCL/SDA timing looks fine and is nicely adjustable.

Are there any example I2C read, write, and init routines that are known to work on the mcf51jm128? I'm using the PEMicro board for testing. Other controllers on the part have setup w/no problems (I'm paying for that now). This is a different version CW than I use for V2 parts. Is it something in CW I have setup wrong?

Thanks -