Writing Values Greater Than 0xFF to OCR1A in AVR C Code: How?

Hello, is anyone here ?? 🧐
Solution
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


This should work in IDE 18.1.9 as well.
Was this page helpful?