I2C Method
masselon
Posts: 51
in Propeller 2
I am trying to to running the jm_at24c32_demo and jm_ds3231_demo codes but its didn´t writes in the correspondeing register, only read the registers.
Is there something must be included in the codes to its work completely?
Thank you very much,
Masselon
Comments
I just ran the programs that I provided during training and they're working fine. I've re-attached so you have the latest of everything. My JonnyMac is busy on the low end, so I used pins 40 (SCL) and 41 (SDA) for the I2C bus. I always run the scanner first to see what devices are available. This is what I got with the RTC/EEPROM module (two chips on board).
Here's the output from the EEPROM demo which shows that write and read modes work.
Jon,
Just a quick shout out for your quality work on this. I've just jumped into I2C for the first time and got a little surprise by the sequence complexity. Building up the specific sequences, using the basic jm_i2c.spin2, that I needed worked a treat after getting used to how I2C actually works.
Thank you, Evan, I appreciate that, and I'm happy that you found the basic driver useful. I2C isn't difficult IF -- and, yes, that's a big IF -- the manufacturer provides clean documentation of their sequences. Years ago, it seemed every part had really good transaction diagrams in the docs. I've run into some vendors lately, though, who say, "Just look at our code." Yes, I can usually translate other languages, but I'd rather see a language-agnostic diagram and write my code from there.