EmbeddedRelated.com
Forums

Need help setting up I2C on LPC2103

Started by Neil Jansen July 15, 2007
Yes, You are 100% right. Need to put time out routine too.

Warm Regards,

Mukund Deshmukh,
Beta Computronics Pvt Ltd.
10/1 IT Park, Parsodi,
Nagpur -440022 India.
Web site - http://betacomp.com

> You have to be careful with a simple test like this. With a timeout, if
> there is a problem on the I2C bus you can be grind to a halt. Try
> shorting the I2C SDA and SCL lines together for an example...
>
> Mike
> On Tue, 2007-07-17 at 14:22 -0700, Mukund Deshmukh wrote:
>>
>> I use
>>
>> while( ! (I2CONSET & 0x8)); // wait till status available
>> to test the busy status of I2C, after writing to I2CDAT
>>
>> Warm Regards,
>>
>> Mukund Deshmukh,
>> Beta Computronics Pvt Ltd.
>> 10/1 IT Park, Parsodi,
>> Nagpur -440022 India.
>> Web site - http://betacomp.com
>>
>> MEET US AT,
>>
>> K2007, Dusseldorf, Germany, Hall 12, Stall C36-2.
>>
>> ----- Original Message -----
>> From: "Neil Jansen"
>> To:
>> Sent: Sunday, July 15, 2007 11:57 PM
>> Subject: [lpc2000] Re: Need help setting up I2C on LPC2103
>>
>> I tried that but couldn't get it working. Which busy flag are you
>> referring to? I was waiting for SI (I2C interrupt flag) to go high,
>> but I guess that only happens with initerrupts enabled.
>>
>> --- In l..., "Mukund Deshmukh"
>> wrote:
>> >
>> > You can use I2C without interrupt. I am using for reading I/O
>> expander and
>> > EEPROM.
>> > Setup I2C, write to I2CDAT and watch the watch the busy flag.
>> > Its very simple.
>> >
>> >
>> >
>> > Warm Regards,
>> >
>> > Mukund Deshmukh,
>> > Beta Computronics Pvt Ltd.
>> > 10/1 IT Park, Parsodi,
>> > Nagpur -440022 India.
>> > Web site - http://betacomp.com
>> >
>> > MEET US AT,
>> >
>> > K2007, Dusseldorf, Germany, Hall 12, Stall C36-2.
>> >
>> >
>> >
>> >
>> > > What's the easiest way to set up I2C on an LPC2103? NXP's app note
>> > > uses interrupts, but I really don't want to use them if I don't
>> have
>> >
>>

An Engineer's Guide to the LPC2100 Series