basheersubei
Member
I'm sorry for the late reply. I had some issues with the data being sent from the T3 to the PC (through USB Serial), and so I spent a lot of time trying to debug it and fix it.
Basically, whenever I use Serial.println to send commands, I would notice that (after about 10 mins from startup), the Teensy starts sending crazy values sporadically (every 1000 values or so, it would send minimum or maximum values [0 and some very high number]). I thought that I should send things through Serial.write instead of Serial.print, so I wasted hours implementing that and debugging my bit-shifting code. I found that the fix was to simply restart the T3 (no need for sending as bytes). Pretty lame.
Anyways, so back to the ADC: Thanks a million for the quote from the datasheet (I don't know how I missed that). I'm assuming that 16-bit accuracy is only achieved when using pins A10 and A11 in differential mode only (I tried using single-ended on A10 then on A11, but I got same noisy results as before).
I just need to ask if you can kindly help with the wiring if I'm using differential mode for the ADC:
So, I have an analog accelerometer, with VCC, GND and ZOUT (z-axis analog signal). I have the accelerometer powered by independent battery to 3.3VReg supply (so far, so good). And the T3 is powered by VUSB. (I also remember that I should join the T3's AGND with the accelerometer's supply GND; is that right? Or should it be T3's GND to accel supply GND?)
The actual question: What exactly do I attach to pins A10 and A11 on the T3? I'm guessing the signal pin ZOUT to A10, and then the accel VCC to A11 (I'm only 20% sure).
(of course, all above is assuming I have the caps set up as you kindly mentioned previously)
Finally, there is the fact that I need to look up how to set up the differential pins in code (but, I'll dig around and hopefully learn how).
If differential mode doesn't work out for me, my last chance is averaging...
Basically, whenever I use Serial.println to send commands, I would notice that (after about 10 mins from startup), the Teensy starts sending crazy values sporadically (every 1000 values or so, it would send minimum or maximum values [0 and some very high number]). I thought that I should send things through Serial.write instead of Serial.print, so I wasted hours implementing that and debugging my bit-shifting code. I found that the fix was to simply restart the T3 (no need for sending as bytes). Pretty lame.
Anyways, so back to the ADC: Thanks a million for the quote from the datasheet (I don't know how I missed that). I'm assuming that 16-bit accuracy is only achieved when using pins A10 and A11 in differential mode only (I tried using single-ended on A10 then on A11, but I got same noisy results as before).
I just need to ask if you can kindly help with the wiring if I'm using differential mode for the ADC:
So, I have an analog accelerometer, with VCC, GND and ZOUT (z-axis analog signal). I have the accelerometer powered by independent battery to 3.3VReg supply (so far, so good). And the T3 is powered by VUSB. (I also remember that I should join the T3's AGND with the accelerometer's supply GND; is that right? Or should it be T3's GND to accel supply GND?)
The actual question: What exactly do I attach to pins A10 and A11 on the T3? I'm guessing the signal pin ZOUT to A10, and then the accel VCC to A11 (I'm only 20% sure).
(of course, all above is assuming I have the caps set up as you kindly mentioned previously)
Finally, there is the fact that I need to look up how to set up the differential pins in code (but, I'll dig around and hopefully learn how).
If differential mode doesn't work out for me, my last chance is averaging...