Yahoo Groups archive

Lpc2000

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

Thread

I2C

I2C

2006-03-10 by Sutton Mehaffey

I haven't totally gotten my I2C (LPC2148) to work with my RAMTRON
serial RAM yet.  All the status' look good on both writing and reading
to RAM, but still get 0xA1 after I write a 0x77.  

However, I noticed that even if I have no power on my RAM and no SDA
and SCK lines connected, all the status' are exactly the same and the
data is still 0xA1.  It seems as though if the RAM weren't responding
at all, you shouldn't get valid codes.  And, I have my ACKs turned on!
 Any ideas?

Sutton

Re: I2C

2006-03-10 by rtstofer

--- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@...> wrote:
>
> I haven't totally gotten my I2C (LPC2148) to work with my RAMTRON
> serial RAM yet.  All the status' look good on both writing and reading
> to RAM, but still get 0xA1 after I write a 0x77.  
> 
> However, I noticed that even if I have no power on my RAM and no SDA
> and SCK lines connected, all the status' are exactly the same and the
> data is still 0xA1.  It seems as though if the RAM weren't responding
> at all, you shouldn't get valid codes.  And, I have my ACKs turned on!
>  Any ideas?
> 
> Sutton
>

Two things:  First, I assume your I2C code is from the Philips samples
in the Files section, right?  I would certainly start with this before
branching off to bigger and better things.

Second, I haven't had much success getting I2C to work without a logic
analyzer.  I have a couple of them but even the cheap setup from
KronosRobotics will work.  See
http://www.kronosrobotics.com/Projects/KRAnalyzer.shtml

In one of my magazines I saw a circuit to detect the start condition
and use that to trigger a scope.  It also implemented some other
trigger conditions.  Unfortunately, I can't find the magazine.  I was
thinking about stuffing the circuit into a CPLD.

I don't know anything about the 2148 but I did use I2C on the 2106 and
it worked fine.  I grabbed the code from someplace - I don't even
remember where.  However, I was just talking to Microchip Port
Extenders and an LCD display.

Richard

Re: I2C

2006-03-10 by Mark Butcher

Hi Sutton

If you haven't done so yet, I think that it is time to reach for your 
oscilloscope. Perhaps the RAM is never responding at all because it is 
not being addressed properly (Its inbuilt address and bus 
configuration address).
To be sure that you are not being deceved, look at the SDA line during 
the 9th clock cycle sent from the master to see whether the slave (the 
RAM) is actually pulling it low and thus responding or not.
If it's not responding you will have to cure this first - although in 
this case I would also expect one of the following status in the 
interrupt after sending the address:
    case (0x48):                      // the slave address was sent 
but no ack was received (RX)
    case (0x20):                      // the slave address was sent 
but no ack was received (TX)

Cheers

Mark Butcher
www.mjbc.ch


--- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@...> wrote:
>
> I haven't totally gotten my I2C (LPC2148) to work with my RAMTRON
> serial RAM yet.  All the status' look good on both writing and 
reading
> to RAM, but still get 0xA1 after I write a 0x77.  
> 
> However, I noticed that even if I have no power on my RAM and no SDA
> and SCK lines connected, all the status' are exactly the same and the
> data is still 0xA1.  It seems as though if the RAM weren't responding
> at all, you shouldn't get valid codes.  And, I have my ACKs turned 
on!
Show quoted textHide quoted text
>  Any ideas?
> 
> Sutton
>

Re: I2C

2006-03-10 by charlesgrenz

Hi Sutton,

  What size pull-ups do you have and have you tried slowing the clock
down?

regards,
Charles

--- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@...> wrote:
Show quoted textHide quoted text
>
> I haven't totally gotten my I2C (LPC2148) to work with my RAMTRON
> serial RAM yet.  All the status' look good on both writing and reading
> to RAM, but still get 0xA1 after I write a 0x77.  
> 
> However, I noticed that even if I have no power on my RAM and no SDA
> and SCK lines connected, all the status' are exactly the same and the
> data is still 0xA1.  It seems as though if the RAM weren't responding
> at all, you shouldn't get valid codes.  And, I have my ACKs turned on!
>  Any ideas?
> 
> Sutton
>

Re: I2C

2006-03-11 by Sutton Mehaffey

Charles,

Using 10K pullups.



Mark,

Yes.  I was afraid I would have to get the scope out.  I was hoping
that it would be straight forward.  Hardware rarely is, I guess.  It
is strange that I am getting back all ACKs, (0x18 and 0x28s) during
the process.  Even to my surprise with the RAM chip not connected....
You know how it is, take a deep breath, sigh, and continue on.  I'll
figure it out.  It's probably something silly I'm missing.



Richard,

I have been using exclusively the LPC2148 user manual flow chart and
state algorithms.  And, I've looked over the sample code.  I am
getting the correct status, but now that I seem to get those status
(with ACKs) with the RAM chip not even connected, it looks like scope
time.

Sutton



--- In lpc2000@yahoogroups.com, "charlesgrenz" <charles.grenz@...> wrote:
Show quoted textHide quoted text
>
> Hi Sutton,
> 
>   What size pull-ups do you have and have you tried slowing the clock
> down?
> 
> regards,
> Charles
> 
> --- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@> wrote:
> >
> > I haven't totally gotten my I2C (LPC2148) to work with my RAMTRON
> > serial RAM yet.  All the status' look good on both writing and reading
> > to RAM, but still get 0xA1 after I write a 0x77.  
> > 
> > However, I noticed that even if I have no power on my RAM and no SDA
> > and SCK lines connected, all the status' are exactly the same and the
> > data is still 0xA1.  It seems as though if the RAM weren't responding
> > at all, you shouldn't get valid codes.  And, I have my ACKs turned on!
> >  Any ideas?
> > 
> > Sutton
> >
>

Re: I2C

2006-03-11 by rtstofer

--- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@...> wrote:
>
> Charles,
> 
> Using 10K pullups.
> 

10k isn't a pull-up when applied to I2C.  The absolute maximum that
might work on a good day is about 4.7k and a more realistic value is 2.2k.

You never provided a link to the RAM device (that I recall) but in
looking at the FM24CL64, they recommend a 1.1k pull-up.  The reason it
is so small is the lower VDD.  Normally, at 5V VDD the pull-up can go
as low as 2k, maybe 1.8k.  At 3.3V the resistor would be somewhat smaller.

But, again, I don't know which device you are using.

Richard

Re: I2C

2006-03-11 by Sutton Mehaffey

Thanks Richard.

I think I discovered 99% of the problem.  Apparently, I was shipped
samples of the Serial RAM FM24C256 chip that were true 5V parts and I
asked for 3.3V.  Makes it a little difficult to get the chip to work
:)  But, I will also change my pullups when I get the correct chip in.
 They are too high.  

I've been a software designer for many years and I am trying to learn
more about the hardware side and do some of the design myself.  I
found I don't learn how the hardware works as well if I have someone
else do all the hardware design.  So, sometimes I miss some things in
the datasheet that are very important (4.7K pullups instead of 10K). 
It's fun to learn, though.

Sutton



--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> --- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@> wrote:
> >
> > Charles,
> > 
> > Using 10K pullups.
> > 
> 
> 10k isn't a pull-up when applied to I2C.  The absolute maximum that
> might work on a good day is about 4.7k and a more realistic value is
2.2k.
> 
> You never provided a link to the RAM device (that I recall) but in
> looking at the FM24CL64, they recommend a 1.1k pull-up.  The reason it
> is so small is the lower VDD.  Normally, at 5V VDD the pull-up can go
> as low as 2k, maybe 1.8k.  At 3.3V the resistor would be somewhat
smaller.
Show quoted textHide quoted text
> 
> But, again, I don't know which device you are using.
> 
> Richard
>

Re: [lpc2000] Re: I2C

2006-03-11 by Tom Walsh

Sutton Mehaffey wrote:

>Thanks Richard.
>
>I think I discovered 99% of the problem.  Apparently, I was shipped
>samples of the Serial RAM FM24C256 chip that were true 5V parts and I
>asked for 3.3V.  Makes it a little difficult to get the chip to work
>:)  But, I will also change my pullups when I get the correct chip in.
> They are too high.  
>
>I've been a software designer for many years and I am trying to learn
>more about the hardware side and do some of the design myself.  I
>found I don't learn how the hardware works as well if I have someone
>else do all the hardware design.  So, sometimes I miss some things in
>the datasheet that are very important (4.7K pullups instead of 10K). 
>It's fun to learn, though.
>
>  
>

That's how we all did it, you can learn all you want in schools, but 
until you get into the real world ...

I've learned a lot by looking at other's designs, heh, I do not "know it 
all" and it is is fun to learn new stuff!

Enjoy,

TomW

>Sutton
>
>
>
>--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>  
>
>>--- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@> wrote:
>>    
>>
>>>Charles,
>>>
>>>Using 10K pullups.
>>>
>>>      
>>>
>>10k isn't a pull-up when applied to I2C.  The absolute maximum that
>>might work on a good day is about 4.7k and a more realistic value is
>>    
>>
>2.2k.
>  
>
>>You never provided a link to the RAM device (that I recall) but in
>>looking at the FM24CL64, they recommend a 1.1k pull-up.  The reason it
>>is so small is the lower VDD.  Normally, at 5V VDD the pull-up can go
>>as low as 2k, maybe 1.8k.  At 3.3V the resistor would be somewhat
>>    
>>
>smaller.
>  
>
>>But, again, I don't know which device you are using.
>>
>>Richard
>>
>>    
>>
>
>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>
>  
>


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Re: I2C

2006-03-11 by rtstofer

I come from the other side of the problem.  All of my background is in
hardware design.  I struggle with things like Linux and the GNU
toolchain but datasheets and timing specs are a cake walk.

But, we're all having fun or we wouldn't be here!

Richard



--- In lpc2000@yahoogroups.com, Tom Walsh <tom@...> wrote:
>
> Sutton Mehaffey wrote:
> 
> >Thanks Richard.
> >
> >I think I discovered 99% of the problem.  Apparently, I was shipped
> >samples of the Serial RAM FM24C256 chip that were true 5V parts and I
> >asked for 3.3V.  Makes it a little difficult to get the chip to work
> >:)  But, I will also change my pullups when I get the correct chip in.
> > They are too high.  
> >
> >I've been a software designer for many years and I am trying to learn
> >more about the hardware side and do some of the design myself.  I
> >found I don't learn how the hardware works as well if I have someone
> >else do all the hardware design.  So, sometimes I miss some things in
> >the datasheet that are very important (4.7K pullups instead of 10K). 
> >It's fun to learn, though.
> >
> >  
> >
> 
> That's how we all did it, you can learn all you want in schools, but 
> until you get into the real world ...
> 
> I've learned a lot by looking at other's designs, heh, I do not
"know it 
Show quoted textHide quoted text
> all" and it is is fun to learn new stuff!
> 
> Enjoy,
> 
> TomW
> 
> >Sutton
> >
> >
> >
> >--- In lpc2000@yahoogroups.com, "rtstofer" <rstofer@> wrote:
> >  
> >
> >>--- In lpc2000@yahoogroups.com, "Sutton Mehaffey" <sutton@> wrote:
> >>    
> >>
> >>>Charles,
> >>>
> >>>Using 10K pullups.
> >>>
> >>>      
> >>>
> >>10k isn't a pull-up when applied to I2C.  The absolute maximum that
> >>might work on a good day is about 4.7k and a more realistic value is
> >>    
> >>
> >2.2k.
> >  
> >
> >>You never provided a link to the RAM device (that I recall) but in
> >>looking at the FM24CL64, they recommend a 1.1k pull-up.  The reason it
> >>is so small is the lower VDD.  Normally, at 5V VDD the pull-up can go
> >>as low as 2k, maybe 1.8k.  At 3.3V the resistor would be somewhat
> >>    
> >>
> >smaller.
> >  
> >
> >>But, again, I don't know which device you are using.
> >>
> >>Richard
> >>
> >>    
> >>
> >
> >
> >
> >
> >
> >
> > 
> >Yahoo! Groups Links
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> >  
> >
> 
> 
> -- 
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------------------------------------------
>

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.