Got the code working using port manipulation and it's quite a bit shorter than the previous implementation, but the problem still persists.
Whenever I raise the power value too fast, it doesn't work (the device simply doesn't produce a signal at all)
void setPowerValue(unsigned char value){
PORTA = ~value;
previousValue = value;
}
I'm afraid this problem isn't really Arduino-related, but if anyone has any ideas, please let me know.
Thanks