The AD converter window function is controlled by two registers “ADUL” and “ADLL” containing upper and lower limit parameters used to set a valid AD converter range. The AD converter can optionally generate an interrupt if the result is inside or outside the specified range. This allows users to set a specific threshold and only generate an interrupt if the AD conversion result is within or outside this range or threshold, following which the software has to perform some specific operation. The window function can also be used in combination with Snooze Mode; however care needs to be taken as the compare registers only have 8-bit resolution, whereas the AD converter itself has 10-bit resolution.