I've created a program that varies the gap and mark of two control valves.
but I've run into an issue where when I add a OLED display the refresh rate of the screen (about 60ms) throws out all my control. I can refshes the screen only on change and this helps, but I want to show the "Duty Cycles" of the respective valves which will cause an issue.
My train of thought was then to use an interrupt that the valves changes at a regular interval.
And after a lot of reaserch I seem to be banging me head against a brick wall.
Most of the time libraries I would like to use do not compile on my test Nano Every (Atmega4809)
Couple with the fact that I've got a PCB I've created with its own ATmega4809 and I use MegaCoreX and program via UPDI. Everything else works , button resitance ladder, buzzer, LED's, display, but I need this to run a timer within setup that would run a script.
i've tried various timer1, One, 2 libraries and manual setup, but I cant get anything to even come close to compiling.
Any help or nudge in the right direction would be appreciated, i've only just started looking at interrupts.