Hello to all of you, I'm Luca, electrical and electronic technician 53 years old and this is my first post.
After Arduino UNO, i recently started with Teensy 4.1 and unfortunately I already have a problem trying to use the QuadEncoder library.
When I set pins 2 and 3 as channels A and B with the PULLUP option active, the encoder on that channel does not work correctly.
Below I have verified that the problem exists even without the library. I wrote this simple program:
View attachment enc_teensy.ino
where I simply set all pins as pullUp inputs on setup(). Loop() is empty.
All pins of Teensy are left unconnected. I connect only microUSB cable.
With the tester I read that the voltage on all pins is 3.21 Volt. On pins 3 and 9 it is 0.3 Volt and on pin 13 it is 1.69 Volt.
With teensy not powered and unconnected from all... Measuring with ohmmeter beetwin gnd and pins, I have value arround 56KOhm for all pins. For pin 3 i have 3.9KOhm for pin 9 I have 16 Ohm
Now I can understand the voltage on pin 13, since there is the LED, but those on 3 and 9 are strange to me.
Do I already have to think that my Teensy 4.1 was born badly? Or there are reasons that explain this. Note that if I program pin 3 or 9 for are Output they work correctly when i set I have 3.21 Volt and if reset I have 0 Volt.
After Arduino UNO, i recently started with Teensy 4.1 and unfortunately I already have a problem trying to use the QuadEncoder library.
When I set pins 2 and 3 as channels A and B with the PULLUP option active, the encoder on that channel does not work correctly.
Below I have verified that the problem exists even without the library. I wrote this simple program:
View attachment enc_teensy.ino
where I simply set all pins as pullUp inputs on setup(). Loop() is empty.
All pins of Teensy are left unconnected. I connect only microUSB cable.
With the tester I read that the voltage on all pins is 3.21 Volt. On pins 3 and 9 it is 0.3 Volt and on pin 13 it is 1.69 Volt.
With teensy not powered and unconnected from all... Measuring with ohmmeter beetwin gnd and pins, I have value arround 56KOhm for all pins. For pin 3 i have 3.9KOhm for pin 9 I have 16 Ohm
Now I can understand the voltage on pin 13, since there is the LED, but those on 3 and 9 are strange to me.
Do I already have to think that my Teensy 4.1 was born badly? Or there are reasons that explain this. Note that if I program pin 3 or 9 for are Output they work correctly when i set I have 3.21 Volt and if reset I have 0 Volt.