My code is supposed to check a 50Hz signal with AVR ATMEGA32's ADC. It works at 6MHz with an external clock in both real and simulator. But when I use a 12MHz external clock the ADC doesn't work well at all in real and it almost missed the AC signals.
When I use the simulator, it's perfect but in real it's not.. I have set the fuse bit and I turn the ADC on and off before any reading.
Any idea? thx