3.19 ZCD - Zero Cross Detector

3.19.1 Introduction

The MCC Melody Zero-Cross Detector (ZCD) PLIB Driver (Peripheral Library) generates APIs to support ZCD-specific peripheral functionality on AVRxxxDx target MCU's.

The ZCD module detects when an alternating voltage crosses through a threshold voltage, ZCPINV, near the ground potential.

3.19.2 Supported Device Families

AVR® DxAVR® Ex

3.19.3 Required Header Files:

#include "mcc_generated_files/zcd/zcd[X].h"
Note: Replace [X] with selected instance of the ZCD module.

3.19.4 Module Documentation

3.19.4.1 ZCD

This file contains the API prototypes for the ZCD module.

3.19.4.1.1 Module description

This file contains the API prototypes for the ZCD module.

Version: ZCD Driver Version 1.0.0
Functions
  • ISR (ZCDx_ZCD_vect)

    Interrupt Service Routine (ISR) called when a ZCD interrupt occurs.

  • int8_t ZCDx_Initialize (void)

    Initializes the ZCDx module.

3.19.4.1.2 Function Documentation

ISR()

ISR (ZCDx_ZCD_vect )

Interrupt Service Routine (ISR) called when a ZCD interrupt occurs.

Parameters:
None.
Returns:

None.

ZCDx_Initialize()

int8_t ZCDx_Initialize (void )

Initializes the ZCDx module.

Parameters:
None.
Returns:

None.

3.19.5 File Documentation

3.19.5.1 source/zcd.c File Reference

This file contains the API implementation for the ZCD module.

#include "../zcd.h"

3.19.5.1.1 Functions

  • int8_t ZCDx_Initialize (void)

    Initializes the ZCDx module.

  • ISR (ZCDx_ZCD_vect)

    Interrupt Service Routine (ISR) called when a ZCD interrupt occurs.

3.19.5.1.2 Detailed Description

This file contains the API implementation for the ZCD module.

Version: ZCD Driver Version 1.0.0

3.19.5.2 source/zcd.h File Reference

#include "../system/utils/compiler.h"

3.19.5.2.1 Functions

3.19.5.2.2 Detailed Description

ZCD0 Generated Driver API Header File