Odd digitalread problem

Status
Not open for further replies.

kdharbert

Well-known member
I'm digitally sampling a pin @80khz. The readings are coming back all zero and they should not. I am measuring the pin with a scope and it shows the square wave I am expecting with 3.3v max. If I short the input pin to the 3.3V pin on the Teensy, the readings come back as all '1's. I also drove it with a square wave generated by the teensy and it seemed to read the pin just fine. It only seems to be failing when its driven by my existing circuit, even when the voltage levels observed at the pin are 3.3v.

Can it be possible that my circuit is not supplying enough current or some such? Are there specs on this?
 
if your generator is 0 to 3.3 no load and 0 to 3.3 when hooked to teensy then current load is not a player.
have you looked at the gen both before and after connection to teensy? also - just be be safe set gen
to do 0.25 to 3.0 v so that even with some measurement error you are not driving the input past 0 and 3.3.
which teensy?
 
Check the ground wire between your external circuit and Teensy's GND.

These sorts of ground problems can be particularly frustrating when using grounded test equipment like an oscilloscope. Teensy gets an earth ground connection via the scope probe ground and things work and everything appears to be correcnt, but then you remove the test gear and suddenly nothing works.
 
This was actually a miracle of bad sampling. My diagnostic output perfectly jumped in the troughs of the square wave I was sampling and falsely output zero the whole time.
 
Status
Not open for further replies.
Back
Top