Hopefully this is the right place to post this...
Anyway, I'm running into a weird problem that I'm hoping someone here can help me understand.
I am building a simple voltage quantizer for use with synthesizers, so basically a variable voltage enters and some processing is done and the output voltage will be quantized to some sort of musically useful values (octaves/steps/etc...)
I am using a timer in fast PWM mode and varying the duty width to create the output voltage, I am then running this through a 10k resistor and a 100n cap set up as a simple rc filter. It works very well and in my experiments I am able to create stable output voltages between 0 and 4volts. So far so good.
The next step in this project was to port the code over to an attiny. I made sure to set everything up exactly the same as it was on the arduino, using timer0 for both, using a 16mhz crystal on both etc... same exact code. However, the scaling of the output voltage was different between the two.
After doing more experimenting I realized that the scaling would change depending on the power supply I am using, on both the arduino and the attiny. USB power vs external adaptor vs attinyprogrammer usb power vs regulated 5v supply all give different scaling to the output voltage. (which kind of makes this useless...)
It seems unlikely that the clock speed would actually be changing based on the power supply, but I can't figure out whats going on here...
Any help would be most appreciated.
