So I've been discussing this issue with a person from Microchip and decided to look for any other transmissions on the bus that might somehow get the device into an odd state.
There was a burst of data being sent to address 0x62 (the MCP23008 is...
Capture below shows the result of writing 255 to the port when configured as output, then immediately reading back the port value. Bit 2 does NOT get set but all others are.
Checking that all bits are configured as outputs during initialisation by reading back register 0x00 ie IO direction register. It confirms that this has been set to 0x00 ie all bits as output. This is on I2C bus 2 which is showing the issue with...
Another data point that makes it a bit weirder I think, turning them all on in a single message ie 0xFF still results in gpio2 not being set, only on I2C2.
Reading back the port value I get 251, so bit2 is not set.
Will look more into the bit...
Hi MarkT, yes that would be the most plausible if it didn't work just fine when I put it back onto I2C1.
Issue repeats for multiple boards of that type and another board design. Also with MCP23008 of different production batches/years.
Not driving the line. Everything on I2C is open drain so the signal will always float high (pullup resistor) when nothing is active. That bobble should be no problem as what matters is that data is stable before the rising edge of the clock.
Ok good point. However the problem I have is this is the only difference I can see between the two buses and this is the bus that gio2 on the expansion chip cannot be activated. The traces look identical otherwise I believe.
UhClem, thanks for making me take a closer look, you are definitely correct..... and this may help me find the root cause of the issue.
Those blips in the SDA2 line are not actually a start or a stop and maybe I have something else in the system...
I don't see extra start conditions in your plot. There is a start at the beginning (data high to low while clock is high) and a stop at the end. (Data goes low to high while clock is high. No extra starts in the middle.
I have a support request in with Microchip, lets see what they say.
Missing from the initial submission, I am using the Adafruit library:
https://github.com/adafruit/Adafruit-MCP23008-library
Thinking of changing over to this one as it is...
Hi All,
I have a project with a number of MCP23008 digital io expanders on both the I2C bus 1 and bus 2. This is on a Teensy 4.1, running teensyduino 1.59 and being built in Platform IO.
Curiously I am not able to set the GIO2 output on when...
As I'm sitting here trying to debug why my RaspberryPIW running the Apache web server is seizing up every few days to a few weeks, it dawned on me that my T4.1 based server running your QNEthernet hasn't crashed in a few years !! I have been...
Confessions are good for the soul! Sorry for your loss :(
I don't use the IDE setting (or rather, have it set to 600), just what I set in code. I poll the tempmon each second and have a graph overlay available that stays on top of my UI showing...
The HX711 chip alas doesn't use a multiple of 8 bits in its SPI interface. The datasheet example code implies the top bit of the 24 bit result needs complementing, which is simply wrong - its a 2's complement 24 bit output. I can imagine...
Hey folks, I'm happy to report I was able to create a custom teensy with sdram using this thread as a reference 😁
I was already in the throws of designing a custom teensy board that had usb host, usb device, and microsd all on a single edge...
PJRC will have a Black Friday sale this year.
Sweet discount on Teensy 4.0 and Audio Shield. Prices to be announced when the sale starts.
Sale will run Nov 25 to Dec 2, or until inventory allocated to the sale runs out. Will limit to 50 per...
Lately been trying to consolidate/organize my IMU efforts and decided to grab a couple of new sensors that are used on the Nano Sense V2, the BMI270/BMM150 specifically. For reference Sparkfun has a BMI270 sensor and Waveshare has a BMM150...
The block diagram above shows an ADC chip by TI that has 4x internal ADCs which therefore allows it to sample all channels at the same time, eliminating and phase/time shift between samples.
This may be beyond what you are trying to do, I'm not...