Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
I am working with an AVR MCU and have encountered an issue with an interrupt routine affecting my LCD display. Specifically, I have an analog potentiometer connected to an analog pin, and the interrupt associated with the ADC conversion seems to be interfering with the LCD_display method. I need to ensure that interrupts are paused while executing the LCD update code to avoid conflicts.
I used `cli()` to disable interrupts before updating the LCD and `sei()` to re-enable interrupts after the update is complete. This prevents the ADC interrupt from interfering with the LCD display operations.
Is there a better way to manage interrupt handling without affecting the LCD display? my code snippet is in the attached file.
CONTRIBUTE TO THIS THREAD