Camila_99$$
DIIDevHeads IoT Integration Server
•Created by Camila_99$$ on 8/28/2024 in #firmware-and-baremetal
Writing Values Greater Than 0xFF to OCR1A in AVR C Code: How?
Can anyone tell me if any of you have successfully written a value greater than 0xFF into OCR1A, and if so, how?
Personally, I do it in assembly using AVR STUDIO 7, and my tests show that values such as 0x3344, for example, are correctly handled, and TCNT1 counts up to this value before toggling the corresponding output (OC1A).
However, under IDE 18.1.9, there's no way to directly write such a value in C. Even when incorporating my assembly code into C, the compilation goes fine, but OCR1H always remains at zero.
Does anyone have a solution?
5 replies