36.3.1 Initialization
For basic operation, follow these steps:
- Configure the desired input pin in the PORT peripheral as an analog pin with digital input buffer disabled. Internal pull-up and pull-down resistors must also be disabled.
- Optional: Enable the output pin by
writing a ‘
1
’ to the Output Enable (OUTEN) bit in the Control A (ZCDn.CTRLA) register. - Enable the ZCD by writing a
‘
1
’ to the ENABLE bit in ZCDn.CTRLA
After the ZCD is enabled, there is a start-up time during which the output of the ZCD may be invalid. The start-up time can be determined by referring to the ZCD electrical characteristics for the device.