Teensy 4.1 SPI SCK pin13 (LED) issue

Thanks.

In my last code posting you will see I had that line commented out. That is because, as I replied to J , it did not make any difference to the output. (It is true that LED does get brighter). I was probably erroneously basing my expectations of what these functions really to on UNO implementations which is quite different hardware. That is why I generally try to avoid these dumb-me-down libraries doing stuff analogWrite to a gpio pin !


Code:
pinMode(LED_PIN, OUTPUT);

Uncommenting this line I'm still getting erratic input data, but with a brighter LED.
Code:
IO pin test.
pin10 = 0
pin10 = 1
pin10 = 1
pin10 = 1
pin10 = 1
pin10 = 1
pin10 = 1
pin10 = 1
pin10 = 0
pin10 = 1
pin10 = 0
pin10 = 0
pin10 = 0
pin10 = 0
pin10 = 0

Can you suggest a suitable current limitting resistance and/or potential divider values to reduce the risk of input damage connecting to a 5V IMU?

Where is the 470R resistor on 4.0 if I want to lift it off?
Thanks.
 
Last edited:
I tried again with the code from msg #22 but with the pinMode line. I can't reproduce the problem. Here is a screenshot so you can see the result as I'm seeing it on my screen.

screen.png
 
Thanks, I'm not doubting you !

Can you help me localise the 470R resistor?

To avoid 5V abuse would a 33k / 66k divider be suitable on inputs?
 
Can you help me localise the 470R resistor?

This is a bad idea. Something is clearly wrong. You're (probably) only going to make matters worse and more confusing if you start desoldering parts!

But if you really want to go down that path, on the Teensy 4.0 page scroll down to Technical Information and look for "Schematic" and "Component Locations". You'll see it's R1 on the schematic and you can find R1 location the back side with the Component Location diagram.

Again, something is very wrong here because you're getting the wrong result from such a simple test.

I ran it again on Teensy 4.0. Here is a photo.

sc.jpg


And again, it gives the correct result.

Code:
IO pin test.
pin10 = 0
pin10 = 1
pin10 = 0
pin10 = 1
pin10 = 0
pin10 = 1
pin10 = 0
pin10 = 1
pin10 = 0
pin10 = 1
pin10 = 0
pin10 = 1
 
Looking at that photo, I realize the angle makes seeing the wiring difficult. Here is another photo from a better angle, so you can easily see the wire really is connected between pin 13 and pin 10.

sc2.jpg


If you're still getting wrong results like msg #26, maybe before you desolder parts you could try sharing photos of how you've really connected the pins?
 
while looking at R1 I noticed C5,C13 seem damaged.
 

Attachments

  • teensy-resistors.png
    teensy-resistors.png
    543.5 KB · Views: 57
Back
Top