Figure 40-12. Filter
D
Q
R
D
Q
R
D
Q
R
D
Q
R
FILTSEL
OUT
Input
GCLK_CCL
CLR
G
40.6.2.6. Edge Detector
The edge detector can be used to generate a pulse when detecting a rising edge on its input. To detect a
falling edge, the TRUTH table should be programmed to provide the opposite levels.
The edge detector is enabled by writing '1' to the Edge Selection bit in LUT Control register
(LUTCTRLx.EDGESEL). In order to avoid unpredictable behavior, a valid filter option must be enabled as
well.
Edge detection is disabled by writing a '0' to LUTCTRLx.EDGESEL. After disabling a LUT, the
corresponding internal Edge Detector logic is cleared one APB clock cycle later.
Figure 40-13. Edge Detector
40.6.2.7. Sequential Logic
Each LUT pair can be connected to internal sequential logic: D flip flop, JK flip flop, gated D-latch or RS-
latch can be selected by writing the corresponding Sequential Selection bits in Sequential Control x
register (SEQCTRLx.SEQSEL). Before using sequential logic, the GCLK clock and optionally each LUT
filter or edge detector, must be enabled.
Gated D Flip-Flop (DFF)
When the DFF is selected, the D-input is driven by the even LUT output (LUT2x), and the G-input is
driven by the odd LUT output (LUT2x+1), as shown in
.
Figure 40-14. D Flip Flop
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
979