I have some code written in Arduino which is a PID loop for an external heater with temp and PWM displayed on an OLED. Code works perfectly on Arduino Nano and Uno so its not the code.
On my standalone QNF Atmega328PB-MU the code runs extremly slow.
The OLED updates one line at a time. I have ruled out I2C as the issue sincee PWM updates(on my scope) with the oled changing, which means the whole board is slow, not I2C connections.
My thoughs on what could be the issue:
Is this a clock issue? I dont think the clock is being set correctly? Or something entirley else?
I am using a USBASP which throws an SCK error. This apperently normal according to the internet. No matter if I select internal or external clock in minicore, the outcome stays the same. There is no external clock. It should not work with external clock selected (i think) but it does, so I think the clock is not set properly. ive also set the fuse bits for internal clock.
What could be the issue here? It works fine on an arduino.
Please help if you can, ill provide any additional info. Thanks!!