4.1 CLKREF - Clock Reference

4.1.1 Introduction

The MPLAB® Code Configurator (MCC) Melody Clock Reference Peripheral Library (PLIBs) drivers generates APIs to support CLKREF-specific peripheral functionality on target MCUs.

The Clock Reference (CLKREF) output module provides the ability to send a clock signal to the clock reference output pin (CLKR). The reference clock output can be routed internally as an input signal for other peripherals, such as the timers and CLCs.

The reference clock output module has the following features:
  • Selectable clock source using the CLKRCLK register
  • Programmable clock divider
  • Selectable duty cycle

4.1.2 Supported Device Families

PIC12/16F184xPIC16F145xPIC16F153xx
PIC16F171xxPIC16F178xPIC16F181xx
PIC16F183xxPIC16F184xxPIC16F188xx
PIC18F-K40PIC18F-K42PIC18F-K83
PIC18F-Q10PIC18F-Q20PIC18F-Q24
PIC18F-Q40PIC18F-Q41PIC18F-Q43
PIC18F-Q71PIC18F-Q83PIC18F-Q84

4.1.3 Required header files


#include "mcc_generated_files/system/clock.h"

4.1.4 Module Documentation

4.1.4.1 CLKREF

This file contains the API prototype for the CLKREF driver.

4.1.4.1.1 Module description

This file contains the API prototype for the CLKREF driver.

Version: CLKREF Driver Version 2.0.0

4.1.4.1.2 Function Documentation

CLKREF_Initialize()

void CLKREF_Initialize (void )

Initializes the CLKREF module.

Section: Included FilesSection: CLKREF APIs

Parameters:
None.
Returns:

None.

Section: Included FilesSection: CLKREF APIs

4.1.5 File Documentation

4.1.5.1 source/clkref.c File Reference

This file contains the API implementation for the CLKREF driver.

#include <xc.h>
#include "../clkref.h"

4.1.5.1.2 Detailed Description

This file contains the API implementation for the CLKREF driver.

CLKREF Generated Driver File.

Version: CLKREF Driver Version 2.0.0

4.1.5.2 source/clkref.h File Reference

#include <stdbool.h>
#include <stdint.h>

4.1.5.2.2 Detailed Description

CLKREF Generated Driver API Header File.