PDA

View Full Version : I2C fast to slow at runtime



kenif
- 9th February 2018, 17:31
This project requires a 100k device and a 400k device on the same bus.
The I2C slow command appears to be compile only.
Is there a way to change fast to slow and back again at runtime?
Thanks.

pedja089
- 9th February 2018, 17:33
No. But as far as I know all 400K devices work on 100K.

kenif
- 9th February 2018, 19:24
No. But as far as I know all 400K devices work on 100K.
Yes, it works fine. At the moment we have a 900 us read (Honeywell pressure sensor), but at 400k it's about 225 us, and saving the extra time would be useful.

Dave
- 9th February 2018, 20:22
If you need the speed, then what devices are running at 100K?

richard
- 9th February 2018, 22:43
or use the mssp module if your chip has one
http://support.melabs.com/forum/picbasic-pro-compiler-3-0-and-later/working-code-examples/7062-example-code-for-using-pic-hardware-i2c

kenif
- 11th February 2018, 22:59
If you need the speed, then what devices are running at 100K?

Microchip TC74.
We used this for the TO-220 packaging - it is screwed to a motor where it is difficult to put a PCB.

kenif
- 11th February 2018, 23:03
or use the mssp module if your chip has one
http://support.melabs.com/forum/picbasic-pro-compiler-3-0-and-later/working-code-examples/7062-example-code-for-using-pic-hardware-i2c

Thanks, I'll look into that.