Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] OT: I2C question for the expert

2005-05-17 by microbit

Hi Gus,

> I need to move data fast between 2 I2C devices ASAP. One device is a 
> PIC18F458 micro and the other is an LPC2114 micro. 
> 
> 1) Is it best if I set up one as a slave and the other as master or 
> it is better to set them up both as master/slave?

It depends on who is likely to start the transfer.
 
> 2) It seems to be too slow to do stop/start conditions when sending 
> data. If data is going both dirrections at the same time, is there a 
> way to come over start/stop condisions?

Data can't go in both directions at same time, there's only clock & data.
If 2 devices want the bus, there must be "arbitration".
The data line is pulled low (perhaps on both sides), and then an ACK
is expected.
Due to this arbitration, one device is expected to acquire and one to relinquish the bus.
(Hence why I2C must be wired-OR).

> 3) What address am I allowed to use on I2C? Is there legal issues on 
> using sertain I2C addresses? I can only use 7-bit addressing

Dunno, if you just have these 2 devices, I'd do as I please (proviso you won't connect
I2C peripherals later).
Else the device has an I2C address dictated by what kind it is, and eg. with EEPROM
you'll get 3 ext address pins you can preset.

B rgds
Kris


[Non-text portions of this message have been removed]

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.