Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

I2c problem.....

I2c problem.....

2005-05-21 by jase_ko

hey guys Iam stuck with in the infinte loop of the sendI2C function.

the loop is while(STA != 0x08).

So wht shd be done to get out of this porblem.

Re: I2c problem.....

2005-05-21 by Thiadmer Riemersma (ITB CompuPhase)

> the loop is while(STA != 0x08).

This is a little confusion: for me, STA stands for a bit in the
control register (I2CONSET) and it has the constant value 0x20. A
while loop comparing two different constants will indeed be an endless
loop.

But perhaps, you are referring to STA to mean the state register
(I2STAT). There may be a number of reasons why the state does not
switch to 8. In general, it is a bad idea wait until a known state is
entered; it is far better to wait (or interrupt)on the SI signal (in
I2CONSET) and respond to the state that is entered.

I hope this helps,
Thiadmer

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.