I'm assuming your are using Arduino 1.04 or greater.
You can ignore this error: "Please define PAGEL and BS2 signals in the configuration file for part ATtiny85avrdude.exe"
But not this: "Yikes! Invalid device signature." "Device signature = 0xffffff"
This usually happens when something isn't hooked up correctly.
1) Double and triple check your connections. Use your multimeter to do continuity tests to make sure none of your wires are bad. Put your probe directly on the chip's pins to make sure it's not a flaky connection to the breadboard. And, make sure you don't have the chip backwards! (ask me how I know)
2) Use a multimeter to make sure you actually have voltage at vcc and gnd on the tiny when hooked up to the Arduino programmer
3) Add the status leds (with resistors) to your programmer circuit so you can get a little more feedback.
pin 9 -> heartbeat
pin 8 -> error
pin 7 -> programming
4) Attinys from the factory are set to 1 Mhz. You have to flash the fuses to change it. To do that, under Tools->Board you choose the device at the speed you want (e.g. Attiny 85 @ 8mHz). Then you choose Tools->Burn Bootloader. It doesn't actually add a bootloader, but it does set the fuses. But, don't worry about doing this until you can get programming to work.
Just assume your Attiny is 1 Mhz.
5) If it still doesn't work, uninstall (delete?) the MIT files, or create a separate Arduino installation, and use this instead: http://code.google.com/p/arduino-tiny/
I played with the MIT tiny stuff first and then I found the arduino-tiny. I can't remember why, but I found it much better than the MIT version and it's been working for me ever since.
6) If it still doesn't work, I might try a different Attiny chip in case you have a bad one.
A few things to make sure of:
- Make sure you have decoupling capacitors (e.g. 100nF) on all opamp power pins.
- As a unity gain configuration is sensitive to capacitive load (the ADC input pin), try isolating it using a series resistor (between opamp output and ADC input), value say between 220Ω and 820Ω.
- Make completely sure there is nothing else affecting the ADC input, and it is set correctly as an analog input - check it with a known source such as a signal generator to confirm the same does not happen.
- Make sure the analog section and the uC share a common ground.
- Check none of the opamps are oscillating at any point.
- Check supply rails are okay (check under load also)
Let us know how it goes, it should be a reasonably easy issue to track down, but no doubt Murphy will have something to say about that ;-)
A proper schematic with all parts present would be helpful (i.e. I'm assuming the opamps have decoupling caps but you did not include them on the LTSpice schematic)
Best Answer
See data sheet section 28.8 ADC Characteristics: typical offset error 2 LSB and typical gain error 2 LSB. Absolute accuracy (INL, DNL, gain error, offset error, etc) could be typically 4.5 LSB under some operating conditions. These are Typical, not Min/Max guaranteed specs. So yes it’s pretty much normal behavior. You can buy an external ADC that has guaranteed min/max performance specs. But the internal ADC trades convenience for performance. Oh and by the way, your multimeter probably has its own measurement error specs, check the booklet it came with.