Hi
I need to hook up a 3.3v sensor (gyro) to the 5v zx. How do I set the vref on the zx to be 3.3v so I don't loose any resolution on the ADC?
I cant see a VREF pin?
Cheers
Ben
ADC VREF
ADC VREF
> ... I need it to be stable when servos are drawing power, at the
moment it resets when running at 3.3 and when resistance is introduced
to the servos.
What's the cause of that problem? Solve that one and you've solved
two. Surely shared power, common ground bounce or ground loop, no?
Tom
moment it resets when running at 3.3 and when resistance is introduced
to the servos.
What's the cause of that problem? Solve that one and you've solved
two. Surely shared power, common ground bounce or ground loop, no?
Tom
Tom
Re: ADC VREF
The Aref pin, which has a capacitor on it , isn't exposed on the 24-pin ZX devices.sturgessb wrote:I cant see a VREF pin?
One option is to use the internal 2.56V reference and divide your 3.3V signal to match that. A divider using 2.2K and 7.5K resistors will yield a ratio of 0.773, reducing the full-scale 3.3V to 2.55V.
Some time ago there was a series of posts about using the differential capabilities of the ADC. The example code given shows how to use special capabilities of the ADC and could be easily modified to use a different reference as suggested above. You'll need the Atmel datasheet for the AVR device used on your ZX device. The reference selection bits are in the ADMUX register on most devices.
See http://www.zbasic.net/forum/about87.html for more details.
- Don Kinzer
Re: ADC VREF
For most ZX devices, an operating voltage of 3.3V is out of spec for the crystal frequency. (The ZX-328L and ZX-32L, running at 7.37MHz, can run reliably at 3.3V however.)GTBecker wrote:Solve that one and you've solved two.
The attached image shows the typical speed-voltage curve for AVR devices. Given the 14.7MHz operating frequency, the minimum operating voltage is 3.5V.
- Attachments
-
- AVR Mega Speed-Voltage Curve
- mega644p_speed_vs_voltage.jpg (18.07 KiB) Viewed 5824 times
- Don Kinzer
Re: ADC VREF
It is more likely that the supply voltage drops enough to trigger the brownout detector (preset at 2.7V). The "reset cause" can be obtained from the value of Register.ResetFlags.GTBecker wrote:Do you think that his resets are due to supply droop that stops the oscillator?
- Don Kinzer
ADC VREF
> ... more likely that the supply voltage drops enough to trigger the
brownout detector...
So supply voltage out-of-spec for the oscillator means what? That it
might not start reliably, or the frequency might be sufficiently wrong?
Tom
brownout detector...
So supply voltage out-of-spec for the oscillator means what? That it
might not start reliably, or the frequency might be sufficiently wrong?
Tom
Tom
Re: ADC VREF
As is typically the case, the datasheet doesn't describe very explicitly what can go wrong when operating out of spec. My conjecture is that the various sub-systems (Flash, EEPROM, etc.) may fail to operate properly. Clearly, if a read of Flash memory returns the wrong value when operating out of spec things aren't going to turn out well.GTBecker wrote:So supply voltage out-of-spec for the oscillator means what?
We've had some customers attempt to operate ZX devices (running at 14.7MHz) at 3.3V. From all appearances, things seemed to go well until they tried to update the VM (which operation requires a Flash write). The update failed part way through leaving the device inoperable.
In the general case, operating outside the manufacturer's specifications is not a good idea.
- Don Kinzer