MCP23017 with teensy 4.1 at 1MHz?

Status
Not open for further replies.

dizso

Member
Hi,
I try to set a project on teensy 4.1 with MCP4728 and MCP23017, both at 1MHz.
The MCP4728 works nicely at 1MHz, but the MCP23017 does not.
I have tried all the three I2C buses, none of them work.
Any idea, how can I make it works?
Best, Dezso
 
The MCP23017 datasheet says it supports 100kHz, 400kHz and 1.7MHz I2C, and has a section on timing requirements for each mode - that
probably explains why 1MHz is problematic.
 
Also, what power rail are you using? The datasheets don’t show characteristics for 1MHz, but at 1.7MHz they both need 4.5V or more. Try at 400kHz.

Cheers

Jonathan
 
Thanks for suggestions!
I though, anything can work under 1.7MHz (I am not professional in electronics...)
I use it at 3.3V. It is possible to us it at higher voltage than the voltage of the teensy 4.1?
 
I'd double-check if you really need more than 400kHz instead. Humans tend to overestimate some things..
 
I need the 1MHs for the MCP4728 to shorten the loops. I need a large set of DAC, and on the same I2C I would use the MCP23017.
 
I need the 1MHs for the MCP4728 to shorten the loops. I need a large set of DAC, and on the same I2C I would use the MCP23017.

You might also consider the SPI version: MCP23S17 which should work with 10MHz SPI clock.
 
I was thinking about the SPI version, but I need large set of MCP23017 too, so no chance to have enough pin for CS.
And the panels of the MCP23017 are ready...:)
I was thinking to make software I2C pins, but none of the libraries worked for me (SoftWire, SlowSoftWire, SoftI2CMaster, SlowSoftI2C...)
 
Thanks for suggestions!
I though, anything can work under 1.7MHz (I am not professional in electronics...)
I use it at 3.3V. It is possible to us it at higher voltage than the voltage of the teensy 4.1?

At least test at 400kHz to see if that's the issue... don't think you can use it even at 4.5V, as the minimum Vih is 0.8xVdd so 3.6V. You might find a sweet spot where Vdd is high enough to get 1MHz, and low enough to allow 3.3V (nominal) signals from the Teensy. Or an intermediate bus speed (say 700kHz) which works with 3.3V.

Cheers

Jonathan
 
400kHz works nicely with both chip at 3.3V!
So, I will try something under 1MHz. I let you know about the result!
 
At least test at 400kHz to see if that's the issue... don't think you can use it even at 4.5V, as the minimum Vih is 0.8xVdd so 3.6V. You might find a sweet spot where Vdd is high enough to get 1MHz, and low enough to allow 3.3V (nominal) signals from the Teensy. Or an intermediate bus speed (say 700kHz) which works with 3.3V.

Cheers

Jonathan

I have tried 700kHz, but the Wire setclock() did not change the rate. It could set 1000000 and 400000 and 100000 as i have found.
 
Something strange experience: if the pullup is 2.2k ond the sda and 10k on the sca! The 1MHz is working! :rolleyes:
 
i use a RaspPi 8xmcp23s17 breakout board on Teensy4, I only needed to run 6 wires between teensy and the breakoutboard to get 128gpio support at 10mhz
 
Sorry, i have just my phone on internet so no schematic is avaleable.
I used 10k on both and than 2.2k on both. The sda 2.2k with sca 10k works.
I need more tests with more chips on the same bus.
 
So, it looks like this:
Capture 2021_04_12.jpg
 
I can also highly recommend the SPI version, MCP23s17. especially as the set up of all eight chips on one CS line works very fast on polling loop, so no need to worry about dealing with interrupts and all the potential pitfalls of that approach. over a 100 in out on just one SPI, and dealt with via polling, worth another look if not too late for you.
 
Status
Not open for further replies.
Back
Top