Hardware Differences LC vs 4.0, SPI, I2C and decisions to make

Status
Not open for further replies.

blakeAlbion

Well-known member
Hello,

I am working on a hobby project using I2C for an OLED display and SPI for an SD card reader plus 3 digital potentiometers.

For the Teensy 4, the SD reader does not initialize. It's one of those super-cheap things with a 5-to-3.3v regulator and level shifters. I disabled the regulator on the card reader, and still no success. About to give up, I swapped my Teensy LC and witnessed the card reader able to initialize, read and write without a problem. But then I noticed the LC has problems with the OLED display. As per suggestion on the forum (thanks Frank), I boosted the pull-up resistors on the I2C pins and got the OLED display to work _better_ but still a little flaky. Of course I had to change timing on my loop() method on the LC but it's okay. (Did I forget to say I'm also receiving serial MIDI?)

So. Yes I am curious as what accounts for the differences here (seems like voltage/current more than timing or speed).

But mostly I'm trying to get a sense of which Teensy is right for my project. I would prefer to use a Teensy 4, but I'm not crunching numbers or driving the Audio Library. If the best advice is "don't be so cheap and get a better SD card reader", I'll take my medicine and do that.

Thanks,

Ben
 
With many things like this, it might help to see the code that is not working. For example which library? What version of Teensyduino? How do you have the SD Card wired?

Dito for what OLED display? How is it wired? Things like how long are the wires? Do they make good connections? Which Library? what does it setClock to? Have you tried a lower speed to see if that helps?

What would I do?

I would tend to maybe try to use a Teensy that has the SD Built in if I could (T4.1 or T3.5/6) why? One less piece of hardware to have to make work...
T4 you have this option as well, although connecting up a SD adapter to the bottom pins through things like Ribbon cables or castellated adapter can be problematic.
 
I had to rollback the beta Teensyduino before I could test it with the Teensy 4, because I could not compile my project for the LC with that beta.
(Also, noticed Teensy Loader would not launch.)
I will try it again when I finish the POC I am doing at this time with controlling a guitar pedal with digital pots.
I'm excited to try some STL. Collection classes?
 
No, sorry, I did not know this was not a known issue. I am using Big Sur (I think). When I changed the board manager to use Teensy 4, the loader came up on compile. Seems like something got stuck when I switched back to 1.53, but now fixed.
 
I don't know why I did not ask this before, but is there an example of how to set up SPI with the SD library?
How do I override the SPI settings the SD library uses?
Thanks,
Ben
 
Status
Not open for further replies.
Back
Top