|
Forum Index : Microcontroller and PC projects : Valid I2C addresses.....
| Author | Message | ||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9748 |
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. Smoke makes things work. When the smoke gets out, it stops! |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1668 |
Hi Grogster, I could not find that! But this (p 73): "The range of 08 to 77 (hex)" (or 9-119 dec) is correct for 7 Bit addresses. Best Regards Michael causality ≠ correlation ≠ coincidence |
||||
| BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
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 |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1668 |
correction
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 ZealandPosts: 9748 |
@ 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? Smoke makes things work. When the smoke gets out, it stops! |
||||
| BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
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 |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |