Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:55 14 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Valid I2C addresses.....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9593
Posted: 02:41am 23 Apr 2015
Copy link to clipboard 
Print this post

I was playing around with some Master/Slave micromite setups tonight, and came across an error when specifying the slave address:

I2C SLAVE OPEN &B0000000,0,0,TXD,RXD
Error: Invalid 7 bit device address


MM manual page 71 states that 7-bit addresses should be in the range of 08h - 77h, or between 000 and 111 in BCD.

This gives eight possible addresses, but that may be limiting in some situations.

3-BIT ADDRESS TRUTH TABLE:

000(0)
001(1)
010(2)
011(3)
100(4)
101(5)
110(6)
111(7)


&B0000000 does not work, neither does &B1111000, but &B1010000 does, as I plopped the standard 1010 EEPROM devices group ID in front of my tinkering.

I can find nothing in the manual that tells me to stick to the 1010 EEPROM device addressing group, so can I just get some clarification here?

EDIT: Redo truth table so BCD in parenthesis mathematically match the binary notation.Edited by Grogster 2015-04-24
Smoke makes things work. When the smoke gets out, it stops!
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1576
Posted: 02:53am 23 Apr 2015
Copy link to clipboard 
Print this post

Hi Grogster,

  Grogster said  MM manual page 71 states that 7-bit addresses should be in the range of 08h - 77h, or between 000 and 111 in BCD.

I could not find that!

But this (p 73):
  Quote  Another indicator that a vendor is using 8-bit addresses instead of 7-bit addresses is to check the address range.
All 7-bit addresses should be in the range of 08 to 77 (hex). If your slave address is greater than this range then probably your vendor has specified an 8-bit address.


"The range of 08 to 77 (hex)" (or 9-119 dec) is correct for 7 Bit addresses.

Best Regards
MichaelEdited by twofingers 2015-04-24
causality ≠ correlation ≠ coincidence
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 03:06am 23 Apr 2015
Copy link to clipboard 
Print this post

Not sure what you mean by 08h to 77h or 000 to 111 in BCD.
However, the range in hex is as you said and that is 8 to 119 in decimal for 7 bit addressing. &B1111000 is out of range which is why it is invalid. It is used for 10 bit addressing.

See the attachment
2015-04-23_130513_I2C_Slave_Addressing.pdf Edited by BobD 2015-04-24
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1576
Posted: 03:16am 23 Apr 2015
Copy link to clipboard 
Print this post

correction
  Quote  "The range of 08 to 77 (hex)" (or 9-119 dec) is correct for 7 Bit addresses.


Should be:
"The range of 08 to 77 (hex)" (or 8-119 dec) is correct for 7 Bit addresses.

causality ≠ correlation ≠ coincidence
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9593
Posted: 03:31pm 23 Apr 2015
Copy link to clipboard 
Print this post

@ twofingers & BobD - Sorry, that is a typo the 000-111 thing. As you have stated, it should have been 008-119. My mistake - sorry.

Thanks very much for the PDF - that clears up many of my addressing questions, and now that I know there are some reserved address ranges as per the table on page 1 of that PDF, I can now choose any other address and it is working fine.

Thanks guys, and where did you find that PDF?Edited by Grogster 2015-04-25
Smoke makes things work. When the smoke gets out, it stops!
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 04:15pm 23 Apr 2015
Copy link to clipboard 
Print this post

Grogs
There is actually a comment in the PDF as to its source. However, that source has been superseded by I2C bus Specification and User Manual rev 6 by NXP Semiconductors. See page 13 for details about addressing.

I can't be sure about this now but I think I ripped the info from that reference doc and tarted it up in MS Word then produced a PDF. I have the original in a DOCX format. The table is on page 17 of the ref document.
Bob
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025