400K I2C Object?!
Has anyone ever stripped out Mike Green's fast I2C object, or made one of their own.
I don't mind using his fast I2C but it has items in it that I can't use (using another object for the SD part). I would strip it out myself, but I'm scared I'll break it.
Anyone??
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
I don't mind using his fast I2C but it has items in it that I can't use (using another object for the SD part). I would strip it out myself, but I'm scared I'll break it.
Anyone??
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Comments
Mike,
That is exactly what I needed. I'm using it to write to I/O expanders, and didn't need the SPI.
I appreciate it.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
PUB computeTimes '' Set up timing constants in assembly ' (Done this way to avoid overflow) i2cDataSet1 := ((clkfreq / 10000) * 900) / 100000 ' Data setup time - 900ns (100KHz) i2cClkLow1 := ((clkfreq / 10000) * 4700) / 100000 ' Clock low time - 4700ns (100KHz) i2cClkHigh1 := ((clkfreq / 10000) * 4000) / 100000 ' Clock high time - 4000ns (100KHz) i2cDataSet4 := ((clkfreq / 10000) * 550) / 100000 ' Data setup time - 550ns (400KHz) i2cClkLow4 := ((clkfreq / 10000) * 1300) / 100000 ' Clock low time - 1300ns (400KHz) i2cClkHigh4 := ((clkfreq / 10000) * 1000) / 100000 ' Clock high time - 1000ns (400KHz)
Nick Mueller did some timing tests and recommended changes in the data setup times. These changes have already been made to the routines in FemtoBasic and its derivatives.
Mike,
Roger that. I'll make the changes to insure speed compatibility.
I have to add a few things to, that I am using which this version doesn't include. They all deal with the expanders, but it is much easier to add, than subtract.
I do appreciate it.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!