I've tried to set OCR1BH using OCR1B or OCR1BH but when I read them back they are always wrong.
I did notice that if I write ICR1 with data in ICR1H and put data in OCR1L. OCR1H reads back with the data of ICR1H.
Im using Uno on 1.8.5
void setup() {
Serial.begin(9600);
while (!Serial) {}
ICR1 = 6500;
OCR1B = 6250;
//OCR1BH = 24;
//OCR1BL = 106;
Serial.print( "ICR1 = ");
Serial.println(ICR1, DEC);
Serial.print( "ICR1L = ");
Serial.println(ICR1L, DEC);
Serial.print( "ICR1H = ");
Serial.println(ICR1H, DEC);
Serial.print( "OCR1B = ");
Serial.println(OCR1B, DEC);
Serial.print( "OCR1BL = ");
Serial.println(OCR1BL, DEC);
Serial.print( "OCR1BH = ");
Serial.println(OCR1BH, HEX);
}
I get the following outputs setting the registers different ways. OCR1B and OCR1BH always read wrong.
// ICR1 = 6500;
// OCR1B = 6250;
ICR1 = 6500
ICR1L = 100
ICR1H = 25
OCR1B = 106
OCR1BL = 106
OCR1BH = 0
// ICR1 = 6500;
// OCR1BH = 24;
// OCR1BL = 106;
ICR1 = 6500
ICR1L = 100
ICR1H = 25
OCR1B = 106
OCR1BL = 106
OCR1BH = 0
// ICR1 = 6500;
// OCR1BL = 106;
ICR1 = 6500
ICR1L = 100
ICR1H = 25
OCR1B = 6506
OCR1BL = 106
OCR1BH = 25
Does anyone have any ideas as to why I'm not able to set OCR1BH correctly?