I have been struggling with the code on https://www.marcelpost.com/wiki/index.php/ATtiny85_ADC. The code as-is gives correct reading to my OLED screen. However I read somewhere that performance-wise it would be better to use ISRs. If I add: ADCSRA |= (1 << ADIE); to Example #1 and put in ISR ISR(ADC_vect), I noticed that the ISR routine is triggered however if I put the code which is in the loop to the ISR routine, no values are read anymore. Perhaps you have an idea to resolve this. Thanks in advance, Marcel
Hi Marcelpost,
ReplyDeleteI have been struggling with the code on https://www.marcelpost.com/wiki/index.php/ATtiny85_ADC. The code as-is gives correct reading to my OLED screen. However I read somewhere that performance-wise it would be better to use ISRs.
If I add: ADCSRA |= (1 << ADIE); to Example #1 and put in ISR ISR(ADC_vect), I noticed that the ISR routine is triggered however if I put the code which is in the loop to the ISR routine, no values are read anymore. Perhaps you have an idea to resolve this. Thanks in advance, Marcel