OpenCores
no use no use 1/1 no use no use
i2c software examples
by salmansheikh on Oct 27, 2015
salmansheikh
Posts: 10
Joined: Jan 30, 2010
Last seen: May 12, 2023
Anybody have any software examples of how to write and read I2C using the OpenRISC?
RE: i2c software examples
by dgisselq on Oct 28, 2015
dgisselq
Posts: 247
Joined: Feb 20, 2015
Last seen: Jul 15, 2022

Are you referring to the software necessary to use the I2C project, or to the software necessary to bit-bang an I2C interface from a microcontroller?

Assuming you menat the I2C project, I checked the repository for software examples files, but only found a section of the specification that discussed programming examples (chapter 6). Perhaps you could share your work with the project when you are done so that others would have some examples to work with?

Dan

RE: i2c software examples
by rfajardo on Jan 7, 2016
rfajardo
Posts: 306
Joined: Jun 12, 2008
Last seen: Jan 6, 2020
Hello,

you can check this:
http://opencores.org/websvn,filedetails?repname=minsoc&path=%2Fminsoc%2Ftrunk%2Fsw%2Fdrivers%2Fi2c.h
http://opencores.org/websvn,filedetails?repname=minsoc&path=%2Fminsoc%2Ftrunk%2Fsw%2Fdrivers%2Fi2c.c

I have successfully used the code above with the I2C controller IP by Richard Herveille to read out temperatures from an I2C temperature sensor.

HTH,
Raul
no use no use 1/1 no use no use
© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.