wafa_ath
wafa_ath
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?
you need to ensure that both the high and low bytes are correctly written to OCR1AH and OCR1AL. Here’s how you can do it:
OCR1AH = (0x3344 >> 8); // High byte
OCR1AL = (0x3344 & 0xFF); // Low byte
OCR1AH = (0x3344 >> 8); // High byte
OCR1AL = (0x3344 & 0xFF); // Low byte
This should work in IDE 18.1.9 as well.
5 replies