3.3.1 LUT0 Configuration

LUT0 should only wake the CPU when the Ambient Light Sensor is not exposed to light AND when there is movement in front of the PIR sensor. This means LUT0 needs to be configured as an AND gate to achieve the wanted behavior.

  • IN[0] is connected to Event input 0
  • [IN1] is connected to Analog Comparator 0
  • [IN2] is masked (tied low internally)
  • LUT0 out is on PORTB 4, which is configured with edge interrupt on both edges
  • Value to put in TRUTH0 register to get this logic is 0x08

The CCL setup for LUT0 on how to create a 2-input AND gate can be found in the figure below.

Figure 3-4. LUT0 Connections and Truth Table