--- In lpc2000@yahoogroups.com, "James Dabbs" <jdabbs@t...> wrote:
> > I have a problem with my lpc2292.
> > The I2C bus does not generate a interrupt after a writing or
> > a reading. When I set the interrupt manually by setting the
> > i2c interrupt bit high then it comes in my isr routine.
>
> I am in the late stages of trudging through an interrupt-driven I2C
> interface for the 2106.. I believe it's the same hardware.
>
> The I2C system interrupts you only on a 'state change'. Therefore, you
> have to read/write the data port at the right time to result in an
> interrupt. In my case, I had to set the STA flag, write bytes, then set
> the STO flag. I got an interrupt after setting the STA flag and after
> each write.
>
> I can see how setting the interrupt bit high will force the issue but
> then your status register will probably only give you an 0xf8.
>
> Good luck.
I still have no luck with the I2C on the lpc2292.
My init for i2c are:
i2cconclr=0x6c; //i2conclr all bits
temp32 = pclk / 50000
scll = temp32/2
sclh = temp32-scll
i2conset = 0x40
The interrupt is set just like the uarts and those are working.
by writing to the i2c device i do this
clear stopbit
clear interrupt bit
i2conset 0x60 //set start flag
//set enable
then a wait till the isr change the status of my register.
but the isr does not start at all. i2c does not generate a interrupt.
Does anyone know what i do wrong.
regards,
RemcoMessage
Re: I2C does not generate interrupt after writing or reading
2005-08-01 by catstransport
Attachments
- No local attachments were found for this message.