Yahoo Groups archive

Lpc2000

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

Message

Re: initializing I2C problem

2005-04-15 by semetex01

--- In lpc2000@yahoogroups.com, "neptunus1000" <roykrikke@h...> wrote:
> 
> Hello everybody,
> 
> is there realy nobody how had ths problem before. Or is there realy 
> nobody how now's a solution.
> 
> Thanks Roy
> 
> --- In lpc2000@yahoogroups.com, "neptunus1000" <roykrikke@h...>
wrote:
> > 
> > Hello,
> > 
> > "Was there indeed a pull-up resistor missing on the Olimex
board?" 
> > YES there was one missing.
> > 
> > I put for the testing two pull-up on the bus of 4,7K and
connected 
> to 
> > the 3.3 Volt. When I'm debugging the program. The program is
still 
> > hanging on the while(I2STAT != 0x08);. When I measure the both
I2C 
> > lines with pull-up, the lines have 3.3 Volt. The program is not 
> > working. If I disconnect the pull-up resistor the SDA line is 3.3 
> > Volt and the SCL line is 0 Volt. This is oke if I look in the 
> schema 
> > of the Olimex board. I really don't understand why it is not 
> working.
> > 
> > Of course I can build some code for 'bit-bang', but if the uC has
a 
> > I2C bus. Then it is ugly to build a 'bit-bang' routine.
> > 
> > I measured with a FLUKE 123 scope meter.
> > 
> > Best Regards
> > Roy
> > 
> > --- In lpc2000@yahoogroups.com, "Aalt Lokhorst" <lokhorst@s...> 
> wrote:
> > > Hello Roy,
> > > 
> > > Was there indeed a pull-up resistor missing on the Olimex board?
> > > 
> > > If you can measure low and high levels on both I2C lines now
then 
> I 
> > > expect that the hardware is fine. If there is also a I2C device 
> on 
> > the 
> > > bus and it is still not working then i assume it is a software 
> > problem.
> > > 
> > > In the past I used I2C on a 8051 with some 'bit-bang' routines. 
> > Until 
> > > now I didn't use the I2C of the ARM. This will change in the
next 
> > few 
> > > weeks but for the moment I can't help you.
> > > 
> > > In the files section of the yahoo group are some examples. If
the 
> > > pull-up indeed was missing in the hardware then you probably 
> spend 
> > a lot 
> > >   of time with software debugging without any change to succeed.
> > > Might be the moment to start debugging again, use an
oscilloscope 
> > if you 
> > > have it and study the signals to see where it fails.
> > > 
> > > Best Regards
> > > Aalt,
> > > 
> > > 
> > > -- 
> > > ==============================
> > > Aalt Lokhorst
> > > Schut Geometrische Meettechniek bv
> > > Duinkerkenstraat 21
> > > 9723 BN Groningen
> > > P.O. Box 5225
> > > 9700 GE Groningen
> > > The Netherlands
> > > Tel: +31-50-5877877
> > > Fax: +31-50-5877899
> > > E-mail: Lokhorst@S...
> > > ==============================
> > > 
> > > 
> > > neptunus1000 wrote:
> > > > 
> > > > Hello Aalt,
> > > > 
> > > > with on both lines a pull-up the code is still not working
oke.
> > > > Please help my.
> > > > 
> > > > --- In lpc2000@yahoogroups.com, "Aalt Lokhorst"
<lokhorst@s...> 
> > wrote:
> > > >  > Hello Roy,
> > > >  >
> > > >  > Is there a pull-up on the SCL line? I can't find it in the
> > > > schematic
> > > >  > drawing but probably I missed it.
> > > >  >
> > > >  > As far as I know both lines need a pull-up because SDA and 
> SCL
> > > > lines are
> > > >  > 'open-drain' outputs.
> > > >  >
> > > >  > Best Regards,
> > > >  > Aalt
> > > >  >
> > > >  > --
> > > >  > ==============================
> > > >  > Aalt Lokhorst
> > > >  > Schut Geometrische Meettechniek bv
> > > >  > Duinkerkenstraat 21
> > > >  > 9723 BN Groningen
> > > >  > P.O. Box 5225
> > > >  > 9700 GE Groningen
> > > >  > The Netherlands
> > > >  > Tel: +31-50-5877877
> > > >  > Fax: +31-50-5877899
> > > >  > E-mail: Lokhorst@S...
> > > >  > ==============================

Roy,

I had this problem (I2C start not generated and I2C status at 0xf8
forever) on an Olimex board (LPC-WEB 2124) and a pull-up on SCL fixed
it.

H.A.

Attachments

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.