Skip to content
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

I2C speed #228

Closed
carlosperate opened this issue Mar 7, 2016 · 4 comments
Closed

I2C speed #228

carlosperate opened this issue Mar 7, 2016 · 4 comments

Comments

@carlosperate
Copy link
Contributor

There is no mention anywhere about the default clock speed of the I2C interface, and the current interface does not allow to change this. As both the accelerometer and compass are normal and fast mode compatible, could it be possible to add that option to the I2C module? Does the DAL currently support that?

@dpgeorge
Copy link
Member

dpgeorge commented Mar 8, 2016

The default I2C clock speed is 100kHz. The DAL does not support changing the frequency, but the underlying mbed interface does. We can expose this, eg i2c.init(freq=250000).

@carlosperate
Copy link
Contributor Author

Being able to set the frequency would be quite useful. I'm not quite sure
how the mbed interface relates to micropython (I assume both share the same
DAL), is it currently possible to implement it?
On 8 Mar 2016 10:39, "Damien George" notifications@github.com wrote:

The default I2C clock speed is 100kHz. The DAL does not support changing
the frequency, but the underlying mbed interface does. We can expose this,
eg i2c.init(freq=250000).


Reply to this email directly or view it on GitHub
#228 (comment)
.

@dpgeorge
Copy link
Member

dpgeorge commented Mar 9, 2016

is it currently possible to implement it?

Yes, rather easy to do.

@dpgeorge
Copy link
Member

dpgeorge commented Mar 7, 2018

Commit e88e3b2 added an option in i2c.init() to set the frequency.

@dpgeorge dpgeorge closed this as completed Mar 7, 2018
@microbit-carlos microbit-carlos added this to the v1.0 milestone Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants