Yahoo Groups archive

Lpc2000

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

Thread

I2C help for LPC2148

I2C help for LPC2148

2006-03-07 by Sutton Mehaffey

Just learning to play with I2C.

I am trying to address a RAMTRON Serial RAM chip and am having some
difficulty getting proper responses from it.  I have the chip
addressed as 000, to make it easy on the electrical hookups.

My first trial is to READ data from a particular (selective) memory
location.

By reading, and if I understand it correctly, I need to do the following:

1. Issue a START command
2. Read the I2C0STAT register to determine the code.
3. An 0x08 means that START command was sent.
4. If 0x08 is received, issue a command thru I2C0DAT that contains the
chip select ID and the Device address.  Mine is 1010000x, where 'x' is
read (1) or write (0).  In this case A0.
5. Clear SI bit.
6. Read the I2C0STAT register to determine the code.
7. Should be either 0x18, 0x20, or 0x38 according to the manual.

Here's the result: 

After issuing a START command, I do get a 0x08 in the I2C0STAT
register (indicating START sent).  Then, I put the chip address in the
I2C0DAT register (0x40) which includes the Write bit in Bit 0.  I,
then, clear the SI bit.  But, I still get an 0x08 in the I2C0STAT
register.  I can never get anything else.  I tried clearing the SI bit
before putting the address on the bus, but still I get an 0x08.  Any
ideas what I am doing wrong in the sequence?  Thanks.

Sutton

Re: [lpc2000] I2C help for LPC2148

2006-03-08 by Aalt Lokhorst

Hello Sutton,

I think you need to clear the STA-bit after getting the 0x08 status.

Success,

-- 
==============================
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@...
==============================
Show quoted textHide quoted text
> Here's the result:
> 
> After issuing a START command, I do get a 0x08 in the I2C0STAT
> register (indicating START sent).  Then, I put the chip address in the
> I2C0DAT register (0x40) which includes the Write bit in Bit 0.  I,
> then, clear the SI bit.  But, I still get an 0x08 in the I2C0STAT
> register.  I can never get anything else.  I tried clearing the SI bit
> before putting the address on the bus, but still I get an 0x08.  Any
> ideas what I am doing wrong in the sequence?  Thanks.
> 
> Sutton

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.