Yahoo Groups archive

Lpc2000

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

Message

Re: Don't understand I2C addresses on Ashling LPC2106 eval board

2004-10-06 by embeddedjanitor

--- In lpc2000@yahoogroups.com, brust@s... wrote:
> 
> I'm trying to implement I2C communication with my Ashling LPC2106 
> eval board, and to get started, I've been reviewing the Ashling 
Full 
> example.  That project communicates with two I2C devices on the 
eval 
> board, a 7-segment LED and a DIP switch.  The documentation 
> indicates the 7-segment display is at I2C address 0x01 and the DIP 
> is at I2C address 0x00.  However in the code, writes to the 7-
> segment LED use an address data byte of 0x42, which I interpret as 
a 
> slave address of 0x21 and a direction bit of 0 (for writing).  
> Similarly, when reading the DIP switch, the address data byte is 
> 0x41, or a slave address of 0x20 and a direction bit of 1 (for 
> reading).  Is this an error in the eval kit documenation, or must 
> the high nibble in the address be set to 0x2 for some reason?

What you see is correct.

The address allocation is governed by a specification and an I2C 
committee. The address is typically made up of two parts: a class 
address and a device address. The "class address" is defined in the 
silicon and the "device selector" is typically the address that you 
can manipulate via address selection pins. The least significant bit 
is the r/w selector.

For example:
The IO devices you have area all 0010xxxy
Microchip (and perhaps other) SEEPROMs are all 1010xxxy


This strategy allows you to determine what type of devices are 
attached by the addresses. It also allows for easier device selection 
pinning and reduction of conflicts between devices.

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.