The test circuit used is attached and has only one adjustable voltage source at the input of the comparator (PD7).
Pin PB5 should change state depending on whether the external voltage is greater or less than the internal reference voltage.
I tested it with an external reference and that didn't work either.
The program used is:
DDRB |= (1<<PB5);
ACSR = (1<<ACBG) | (1<<ACIE);
DIDR1 = (1<<AIN1D) | (1<< AIN0D);
PORTB &= ~(1<<PB5);
PORTB |= (1<<PB5);
- You don't have permission to download attachments.
- (1 Kb) Downloaded 4 times