Teensy 4 ADC

Status
Not open for further replies.

pwd847

Active member
I have researched this to death. Not sure what to do at this point. I am sending a 50Hz sine wave into A0 to be read by the ADC. I print the values to the serial monitor. The values don't make any sense. What is the input range of the T4's ADC? I read it is 0 to 1.2V, but tonight it seemed like it was willing to take more. The values I'm getting do not span the full range of 0 to 1023, and they tend to sit at funny values for longer than normal periods of time. I set the ADC to 10 bit length. I'm generating the 0.1V to 1.1V sine wave from pixelpulse program connected to the ADALM1000.
 
the default analog Reference is 3.3v. You can use analogReference(INTERNAL); to reduce the range to 0 to 1.2v

As the forum rule states, please provide complete source code that demonstrates your problem.
 
Use the serial plotter instead of the monitor to get a visual picture of the waveform. Also, a sine wave does hover near it's min and max values compared to the central region, dV/dT ~ 0.

PS
Oops, serial plotter not working with T4, only TyTools monitor.
 
I've got the TyCommander installed so it apparently grabs the connection first. Next time I update Arduino I'll try it before installing Ty.
 
You can always go into TyCommander, and choose the Integrate with Arduino, choose your install, and then there is an option to restore back to not using tycommander...
 
Works fine now. I had it installed when I was working on a project that used three Teensy boards and had to see and program all of them. Now it's just one board at a time so will uninstall Ty.
Thanks.
 
Status
Not open for further replies.
Back
Top