ATtiny1624/1626/1627

CTRLD

Control D

  0x03 8 - 0x00    

Control D

Bit  7 6 5 4 3 2 1 0  
          WINSRC WINCM[2:0]  
Access          R/W R/W R/W R/W  
Reset          0 0 0 0  

Bit 3 – WINSRC: Window Mode Source

Window Mode Source

This bit controls which source is used by the Window Comparator.
ValueNameDescription
0 RESULT ADCn.RESULT[15:0] is used as the Window Comparator source
1 SAMPLE ADCn.SAMPLE[15:0] is used as the Window Comparator source

Bits 2:0 – WINCM[2:0]: Window Comparator Mode

Window Comparator Mode

This bit field controls whether the Window Comparator is enabled or not, and which thresholds will set the Window Comparator (WCMP) interrupt flag.

In the table below, OUTPUT is the 16-bit result or sample selected by WINSRC. WINLT and WINHT are the 16-bit low threshold value and the 16-bit high threshold value, respectively.

ValueNameDescription
0x0 NONE Window Comparator disabled
0x1 BELOW OUTPUT < WINLT
0x2 ABOVE OUTPUT > WINHT
0x3 INSIDE WINLT < OUTPUT < WINHT
0x4 OUTSIDE OUTPUT < WINLT or OUTPUT >WINHT
Other - Reserved