Yahoo Groups archive

Lpc2000

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

Thread

Don't understand I2C addresses on Ashling LPC2106 eval board

Don't understand I2C addresses on Ashling LPC2106 eval board

2004-10-05 by brust@symyx.com

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?

Thanks!
Bill

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.

RE: [lpc2000] Don't understand I2C addresses on Ashling LPC2106 eval board

2004-10-06 by Hugh O'Keeffe

Hi Bill,

Answer below; this is in HTML format, hence, Yahoo may munch it. Contact me
directly and I'll send you a Word or PDF version

Hugh @  <http://www.ashling.com/support/lpc2000/>
www.ashling.com/support/lpc2000/ 

 


 


The I2C device used on the LPC2xxx is a PCF8574T and the Address decoding
for this device is as below:

 


 


There are two PCF8574T devices on the LPC2xxx these are identified from each
other using the A (2..0) Bits. 

With the Least significant bit of the register determining whether it is a
read or a write. Therefore:

 

Address of 0x42 writes to seven-segment display.

Address of 0x41 reads from the DIPswitches and the Test points (TP1, TP2,
TP3 and TP4).

Address of 0x40 writes to the Test points (TP1, TP2, TP3 and TP4).
Show quoted textHide quoted text
-----Original Message-----
From: brust@... [mailto:brust@...] 
Sent: 06 October 2004 00:34
To: lpc2000@yahoogroups.com
Subject: [lpc2000] Don't understand I2C addresses on Ashling LPC2106 eval
board



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?

Thanks!
Bill





Yahoo! Groups Sponsor	

ADVERTISEMENT
 
<http://us.ard.yahoo.com/SIG=129m682pf/M=295196.4901138.6071305.3001176/D=gr
oups/S=1706554205:HM/EXP=1097105665/A=2128215/R=0/SIG=10se96mf6/*http://comp
anion.yahoo.com> click here	
 
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=
:HM/A=2128215/rand=488420195> 	


  _____  

Yahoo! Groups Links


*	To visit your group on the web, go to:
http://groups.yahoo.com/group/lpc2000/
  

*	To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
<mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
  

*	Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 




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

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.