Daemach wrote:I'm trying to use a TXS0108 to translate 3.3v to 5v I2C and SPI. The I2C side works great, but the SPI side doesn't. It seems that MISO and SCK are being driven high, possibly due to the pullup resistors in the TXS0108. This interferes with all of the SPI devices as well as trying to burn a bootloader.
I doubt the pullups are the problem, for a couple of reasons. First, the datasheet lists them as having values of 4k or 40k, depending on whether you're trying to pull up or down. Any pin on a '328 should be able to swing that kind of resistance around without trouble. Second, both I2C and SPI require clocks. I can't see any obvious reason why the pullups should kill one clock and not the other.
I notice that you have another chip connected to the SPI lines on the 3v3 side, so it's possible you're seeing interaction between that and the level shifter. That would still be wierd, but it's at least something to check.
My first suggestion would be to benchmark the SPI lines by disconnecting everything from them and making sure SCK and MISO actually work. It's always a good idea to verify the obvious before looking for anything more complicated.
If SCK and MISO do work as advertised with no load, try connecting only the level shifter. If the problem comes back, make a note of it but check all the other connections in isolation just to be sure. If the problem only exists when the level shifter is connected, that's probably your culprit, and your best bet will be to try the other chip. If you see the problem in other conditions, you'll have more ideas for what to check.
The only other obvious question I can think of is, "what's your SPI clock speed?" The datasheet says the TXS is rated for speeds up to 20MHz, so it's hypothetucally possible you're trying to push it too fast, though I doubt it.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.