I'm trying to sample a signal in the hundreds of Hz (around 100-500 Hz), and I'm using an ATtiny84. To test the sampling speed, I simple alternated writing a digital pin HIGH then LOW each time the signal was sampled. I then measured the time between the digital pin changes on a scope, and it's around 700-800 Hz, which seems quite slow to me. Is there a way to set the sampling speed? Or am I doing something incorrect here?
Processor is running at 1 MHz? 8 MHz?
The ADC clock should be configured for 125 KHz. A sample is 13 or 23 ADC clock cycles. So, if you have not just changed the reference, each sample should take...
1/125000*1000000*13 = 104 microseconds
Which should be about 9615 samples per second. An order of magnitude slower than what you're seeing. Are you certain the fuses are set for 8 MHz?
Please post your code.