Skip to content

i2c example using reserved i2c address #2969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bperrybap opened this issue Apr 12, 2015 · 6 comments
Closed

i2c example using reserved i2c address #2969

bperrybap opened this issue Apr 12, 2015 · 6 comments
Labels
Component: Documentation Related to Arduino's documentation content
Milestone

Comments

@bperrybap
Copy link

The example on this page:
http://arduino.cc/en/Tutorial/MasterWriter

Is using i2c address 0x4 which appears to be in the reserved address space.
0 to 7 are reserved.

Not sure what to pick for an address. It probabaly doesn't matter, but it would be best to update the example to avoid using an address from the reserved address range.

It's been a while since I've tested, but I believe that these reserved addresses don't work on the pic32 processors.

@facchinm facchinm added the Component: Documentation Related to Arduino's documentation content label Apr 14, 2015
@agdl
Copy link
Member

agdl commented Apr 17, 2015

@bperrybap you are right, but the example is intended to be used with two Arduino so the address doesn't matter. Thank you!

@agdl agdl closed this as completed Apr 17, 2015
@bperrybap
Copy link
Author

Yes it does!
Just because it doesn't matter on an AVR doesn't mean it doesn't matter on other chips.
The low addresses will not work on Pic32 chips. I have no idea what happens on some of the ARM based chips.
Why continue to promote an example that is known to be incorrect and violates specifications?
Fix the code. It is a trivial fix.

@matthijskooijman
Copy link
Collaborator

+1 for fixing this.

@svgeesus
Copy link

Hello Arturo,

Friday, April 17, 2015, 11:07:04 AM, you wrote:

@bperrybapyou are right, but the example is intended to be used
with two Arduino so the address soesn't matter. Thank you!

That is a totally bogus answer.

And when someone builds on that example to talk between an Arduino and
something else?

Fix the example, please.

Best regards,
Nantonos mailto:nantonos@epona.net

agdl added a commit to agdl/Arduino that referenced this issue May 7, 2015
@agdl
Copy link
Member

agdl commented May 7, 2015

I made a PR because the on-line page takes the code from git. I fix the problem in all the examples. Let me know if it is ok.

#3100

@agdl
Copy link
Member

agdl commented May 7, 2015

I adde this statement here:
www.arduino.cc/en/Reference/Wire

"However the addresses from 0 to 7 are not used because are reserved so the first address that can be used is 8. "

Is it ok in this way?

agdl added a commit to agdl/Arduino that referenced this issue May 14, 2015
This fixes the Wire examples that uses I2C reserved address (from 0 to 7) substituting them with 8 that is the first one available and that can be used.

I also modified the wire reference
http://www.arduino.cc/en/reference/wire
according to this fact.
ffissore added a commit that referenced this issue May 14, 2015
Fix for #2969 (I2C reserved addresses)
@ffissore ffissore modified the milestone: Release 1.6.5 May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Related to Arduino's documentation content
Projects
None yet
Development

No branches or pull requests

6 participants