Marvee Amasi
DIIDevHeads IoT Integration Server
•Created by Dtynin on 9/13/2024 in #🪲-firmware-and-baremetal
How to prevent ADC interrupt from affecting LCD display on AVR MCU?
The
adcDataReady
is a volatile flag set in the ISR(ADC_vect)
exactly once the ADC conversion is complete. Did this to avoid the need for disabling interrupts while waiting for the LCD to be updated. The lcd_puts
is called only when adcDataReady
is 1
, making sure that the display is only updated when new ADC data is available13 replies