We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X

What Is Zero Cross Detect (ZCD)?


Zero Cross Detect (ZCD) detects when an Alternative Current (AC) signal crosses through the ground potential. The ZCD module is useful when monitoring an AC waveform for purposes such as TRIAC dimming, AC period measurement and minimizing EMI caused by switching transients.

How Can Your Design Benefit From an On-Chip ZCD?


If the microcontroller (MCU) you have selected doesn’t have an on-chip ZCD, you will need to build an external circuit with passive components. This will not only lead to higher power consumption and BOM costs, but it will also result in a current injection into the substrate, which may damage the MCU.

The on-chip ZCD peripheral in PIC® and AVR® MCUs can take the signal directly from the AC main with only a resistor or a capacitor in series. This saves BOM costs and reduces energy loss while also preventing substrate current injection.

The ZCD peripheral can be easily configured with MPLAB® Code Configurator (MCC) for PIC MCUs and Atmel START for AVR MCUs. 

200206-MCU8-GRAPH-ZeroCrossDetector-7x5

How Is ZCD Used?


ZCD Operating Circuit

To safely interface with the AC input signal, a current-limiting resistor (and/or capacitor in some cases) is needed in series with the input. The value of that resistor/capacitor is calculated based on the AC input voltage and the current specs of the ZCD peripheral. An optional pull-up or pull-down resistor can also be added to balance zero-crossing voltage offset.

ZCD Configuration and Output

The ZCD peripheral is very easy to configure. The ZCD output signal is a simple digital level that toggles from active low to high when the signal crosses from negative to positive or vice versa. The output signal can be used to trigger other peripherals internally, or output to a GPIO pin externally. You can also configure the peripheral to trigger an interrupt when the signal crosses positively, negatively, or both.

8-bit Microcontrollers with Zero Cross Detect


View All Parametrics
Product Status 5K Pricing CPU Type Architecture Family Program Memory Size (KB) Program Memory Size (KWords) Bootload capable SRAM (Bytes) Emulated EEPROM in Flash DMA Channels Max I/O Pins Pin count Max CPU Speed (MHz) ADC with Enhanced Features Peripheral Pin Select / Pin Muxing Vbat/Vddbu battery backup Brown-Out Reset Low Voltage Detection Power On Reset Internal Oscillator Hardware RTCC/RTC Watch Dog Timer Windowed Watch Dog Timer (WWDT) Number of Comparators Number of Op Amps Number of ADCs ADC Input Max ADC Resolution (Bits) Max ADC Sampling Rate (ksps) ADC with Computation Number of DACs DAC Outputs Max DAC Resolution (Bits) Internal Voltage Reference (Bandgap) Zero Cross detect Slope Compensation / Programmable Ramp Generator Data Signal Modulator CTMU Max 8-Bit Digital Timers Max 16-Bit Digital Timers Signal Measurement Timer Hardware Limit Timer Stand alone PWMs Capture / Compare/PWM (CCP) Enhanced Capture/Compare/PWM (ECCP) Max PWM outputs (including complementary) Number of PWM Time Bases PWM Max Resolution (Bits) Quadrature Encoder Interface Angular Timer Math Accelerator UART SPI I2C Number of USB Modules USB Interface USB Active Clock Tuning Number of CAN Modules CAN Transmit Buffers CAN Receive Buffers Ethernet LIN IrDA Parallel Port Class B Support CRC Configurable Logic Cell (CLC/CCL) Complementary Waveform Generator / Complementary Output Generator Numerically Controlled Oscillator Programmable Switched Mode Controller Hardware Touch Peripheral Hardware Direct Touch Channel Buttons Hardware Touch Matrix Nodes Touch Library Support Hardware Cap Voltage Divider Segmented LCD Keeloq Hardware Crypto Engine JTAG Temp Range Min Temp Range Max Operation Voltage Min (V) Operation Voltage Max (V) High Voltage Capable Packages
PIC16F15375 In Production $0.90 8-bit PIC MCU 8 8-bit MCU 14 8 No 1024 0 / HEF 0 36 40 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 0 1 35 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 2 2 0 None No 0 0 0 None Yes No No No No 4 1 1 0 No 0 No No None -40 125 1.8 5.5 No 40/PDIP, 40/UQFN, 44/QFN, 44/TQFP
PIC16F1703 In Production $0.65 8-bit PIC MCU 8 8-bit MCU 3.5 2 Yes 256 0 / HEF 0 12 14 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 0 2 1 8 10 100 No 0 0 0 Yes Yes 0 0 No 2 1 0 0 0 2 0 2 1 10 0 No No 0 1 1 0 None No 0 0 0 None Yes No No No No 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/QFN
PIC16F1704 In Production $0.70 8-bit PIC MCU 8 8-bit MCU 7 4 No 512 0 / HEF 0 12 14 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 8 10 100 No 1 2 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 8 3 10 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 1 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/QFN, 16/UQFN
PIC16F1705 In Production $0.77 8-bit PIC MCU 8 8-bit MCU 14 8 Yes 1024 0 / HEF 0 12 14 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 8 10 100 No 1 2 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 8 3 10 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 1 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/QFN
PIC16F1707 In Production $0.81 8-bit PIC MCU 8 8-bit MCU 3.5 2 Yes 256 0 / HEF 0 18 20 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 0 2 1 12 10 100 No 0 0 0 Yes Yes 0 0 No 2 1 0 0 0 2 0 2 1 10 0 No No 0 1 1 0 None No 0 0 0 None Yes No No No No 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 20/PDIP, 20/QFN, 20/SOIC, 20/SSOP
PIC16F1708 In Production $0.87 8-bit PIC MCU 8 8-bit MCU 7 4 Yes 512 0 / HEF 0 18 20 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 12 10 100 No 1 2 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 8 3 10 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 1 0 0 No 0 No No None -40 125 1.8 5.5 No 20/PDIP, 20/QFN, 20/SOIC, 20/SSOP, 20/UQFN
PIC16F1709 In Production $0.92 8-bit PIC MCU 8 8-bit MCU 14 8 Yes 1024 0 / HEF 0 18 20 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 12 10 100 No 1 2 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 8 3 10 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 1 0 0 No 0 No No None -40 125 1.8 5.5 No 20/PDIP, 20/QFN, 20/SOIC, 20/SSOP
PIC16F1713 In Production $0.97 8-bit PIC MCU 8 8-bit MCU 7 4 Yes 512 0 / HEF 0 25 28 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 17 10 100 No 2 4 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 0 3 10 0 No No 1 1 1 0 None No 0 0 0 None No No No No No 4 1 1 0 No 0 No No None -40 125 1.8 5.5 No 28/QFN, 28/SOIC, 28/SPDIP, 28/SSOP, 28/UQFN
PIC16F1716 In Production $1.03 8-bit PIC MCU 8 8-bit MCU 14 8 Yes 1024 0 / HEF 0 25 28 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 17 10 100 No 2 4 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 0 3 10 0 No No 1 1 1 0 None No 0 0 0 None No No No No No 4 1 1 0 No 0 No No None -40 125 1.8 5.5 No 28/QFN, 28/SOIC, 28/SPDIP, 28/SSOP, 28/UQFN
PIC16F1717 In Production $1.43 8-bit PIC MCU 8 8-bit MCU 14 8 Yes 1024 0 / HEF 0 36 40 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 28 10 100 No 2 4 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 0 3 10 0 No No 1 1 1 0 None No 0 0 0 None No No No No No 4 1 1 0 No 0 No No None -40 125 1.8 5.5 No 40/PDIP, 40/UQFN, 44/QFN, 44/TQFP
PIC16F1718 In Production $1.10 8-bit PIC MCU 8 8-bit MCU 28 16 Yes 2048 0 / HEF 0 25 28 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 17 10 100 No 2 4 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 0 3 10 0 No No 1 1 1 0 None No 0 0 0 None No No No No No 4 1 1 0 No 0 No No None -40 125 1.8 5.5 No 28/QFN, 28/SOIC, 28/SPDIP, 28/SSOP, 28/UQFN
PIC16F1719 In Production $1.48 8-bit PIC MCU 8 8-bit MCU 28 16 Yes 2048 0 / HEF 0 36 40 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes 2 2 1 28 10 100 No 2 4 8 Yes Yes 0 0 No 4 1 0 0 2 2 0 0 3 10 0 No No 1 1 1 0 None No 0 0 0 None No No No No No 4 1 1 0 No 0 No No None -40 125 1.8 5.5 No 40/PDIP, 40/UQFN, 44/QFN, 44/TQFP
PIC16F1764 In Production $0.96 8-bit PIC MCU 8 8-bit MCU 7 4 Yes 512 0 / HEF 0 12 14 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 2 1 1 8 10 100 No 2 2 10 Yes Yes Yes 1 No 4 3 0 3 2 1 0 6 4 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 1 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/QFN
PIC16F1765 In Production $1.03 8-bit PIC MCU 8 8-bit MCU 14 8 Yes 1024 0 / HEF 0 12 14 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 2 1 1 8 10 100 No 2 2 10 Yes Yes Yes 1 No 4 3 0 3 2 1 0 6 4 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 1 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/QFN
PIC16F1768 In Production $1.13 8-bit PIC MCU 8 8-bit MCU 7 4 Yes 512 0 / HEF 0 18 20 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 4 2 1 12 10 100 No 4 4 10 Yes Yes Yes 2 No 4 3 0 3 4 2 0 12 5 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 2 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 20/PDIP, 20/QFN, 20/SOIC, 20/SSOP, 20/VQFN
PIC16F1769 In Production $1.21 8-bit PIC MCU 8 8-bit MCU 14 8 No 1024 0 / HEF 0 18 20 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 4 2 1 12 10 100 No 4 4 10 Yes Yes Yes 2 No 4 3 0 3 4 2 0 12 5 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 3 2 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 20/PDIP, 20/QFN, 20/SOIC, 20/SSOP, 20/VQFN
PIC16F1773 In Production $1.48 8-bit PIC MCU 8 8-bit MCU 7 4 Yes 512 0 / HEF 0 25 28 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 6 3 1 17 10 100 No 6 6 10 Yes Yes Yes 3 No 5 3 0 4 6 3 0 21 7 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 4 3 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 28/SOIC, 28/SPDIP, 28/SSOP, 28/UQFN
PIC16F1776 In Production $1.55 8-bit PIC MCU 8 8-bit MCU 14 8 Yes 1024 0 / HEF 0 25 28 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 6 3 1 17 10 100 No 6 6 10 Yes Yes Yes 3 No 5 3 0 4 6 3 0 21 7 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 4 3 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 28/SOIC, 28/SPDIP, 28/SSOP, 28/UQFN
PIC16F1777 In Production $1.92 8-bit PIC MCU 8 8-bit MCU 14 8 Yes 1024 0 / HEF 0 36 40 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 8 4 1 28 10 100 No 8 8 10 Yes Yes Yes 4 No 5 3 0 4 8 4 0 28 8 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 4 4 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 40/PDIP, 40/UQFN, 44/QFN, 44/TQFP
PIC16F1779 In Production $2.02 8-bit PIC MCU 8 8-bit MCU 28 16 Yes 2048 0 / HEF 0 36 40 32 Yes No Programmable BOR None Yes 32 MHz, 32 kHz No Yes 8 4 1 28 10 100 No 8 8 10 Yes Yes Yes 4 No 5 3 0 4 8 4 0 28 8 16 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 4 4 0 0 0 0 No 0 No No None -40 125 1.8 5.5 No 40/PDIP, 40/QFN, 40/UQFN, 40/VQFN, 44/QFN, 44/TQFP
PIC16F15313 In Production $0.46 8-bit PIC MCU 8 8-bit MCU 3.5 2 No 256 0 / HEF 0 6 8 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 1 0 1 5 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 8/PDIP, 8/SOIC, 8/UDFN
PIC16F15323 In Production $0.50 8-bit PIC MCU 8 8-bit MCU 3.5 2 No 256 0 / HEF 0 12 14 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 11 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 1 1 1 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/UQFN, 16/VQFN
PIC16F15324 In Production $0.56 8-bit PIC MCU 8 8-bit MCU 7 4 No 512 0 / HEF 0 12 14 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 11 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 1 1 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/UQFN, 16/VQFN
PIC16F15325 In Production $0.63 8-bit PIC MCU 8 8-bit MCU 14 8 No 1024 0 / HEF 0 12 14 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 11 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 1 1 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 14/PDIP, 14/SOIC, 14/TSSOP, 16/UQFN, 16/VQFN
PIC16F15344 In Production $0.63 8-bit PIC MCU 8 8-bit MCU 7 4 No 512 0 / HEF 0 18 20 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 17 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 1 1 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 20/PDIP, 20/QFN, 20/SOIC, 20/SSOP, 20/UQFN
PIC16F15345 In Production $0.70 8-bit PIC MCU 8 8-bit MCU 14 8 No 1024 0 / HEF 0 18 20 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 17 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 1 1 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 20/PDIP, 20/QFN, 20/SOIC, 20/SSOP, 20/UQFN, 20/VQFN
PIC16F15355 In Production $0.80 8-bit PIC MCU 8 8-bit MCU 14 8 No 1024 0 / HEF 0 25 28 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 24 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 2 2 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 28/QFN, 28/SOIC, 28/SPDIP, 28/SSOP, 28/UQFN, 28/VQFN
PIC16F15356 In Production $0.88 8-bit PIC MCU 8 8-bit MCU 28 16 No 2048 0 / HEF 0 25 28 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 24 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 2 2 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 28/QFN, 28/SOIC, 28/SPDIP, 28/SSOP, 28/UQFN, 28/VQFN
PIC16F15376 In Production $0.98 8-bit PIC MCU 8 8-bit MCU 28 16 No 2048 0 / HEF 0 36 40 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 35 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 2 2 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 40/PDIP, 40/UQFN, 40/VQFN, 44/QFN, 44/TQFP
PIC16F15385 In Production $0.88 8-bit PIC MCU 8 8-bit MCU 14 8 No 1024 0 / HEF 0 44 48 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 43 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 2 2 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 48/TQFP, 48/UQFN
PIC16F15386 In Production $0.97 8-bit PIC MCU 8 8-bit MCU 28 16 No 2048 0 / HEF 0 44 48 32 Yes No BOR None Yes 32 MHz, 32 kHz No Yes Yes 2 0 1 43 10 100 No 1 2 5 No Yes 0 0 No 1 2 0 1 4 2 0 10 1 10 0 No No 2 2 2 0 None No 0 0 0 None Yes No No No No 4 1 1 0 0 0 No 0 No No None -40 125 1.8 5.5 No 48/TQFP, 48/UQFN
AVR64DD28 Future Product Call for pricing 8-bit AVR MCU 8 8-bit MCU 64 32 No 8192 256 23 28 24 Yes No Programmable BOR Programmable LVD Yes Yes Yes Yes 1 0 1 19 12 130 Yes 1 1 10 Yes Yes 0 No 0 3 0 0 6 0 0 0 0 0 0 No No 2 1 1 0 None No 0 0 0 None No No No No Yes 1 0 0 0 0 No No 0 -40 125 1.8 5.5 Please call for package information
AVR64DD32 Future Product Call for pricing 8-bit AVR MCU 8 8-bit MCU 64 32 No 8192 256 27 32 24 Yes No Programmable BOR Programmable LVD Yes Yes Yes Yes 1 0 1 23 12 130 Yes 1 1 10 Yes Yes 0 No 0 4 0 0 8 0 0 0 0 0 0 No No 2 1 1 0