5.1 CLKREF - Clock Reference

5.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

5.1.2 Supported Device Families

PIC12/16F184x PIC16F145x PIC16F153xx
PIC16F171xx PIC16F178x PIC16F181xx
PIC16F183xx PIC16F184xx PIC16F188xx
PIC18F-K40 PIC18F-K42 PIC18F-K83
PIC18F-Q10 PIC18F-Q20 PIC18F-Q24
PIC18F-Q40 PIC18F-Q41 PIC18F-Q43
PIC18F-Q71 PIC18F-Q83 PIC18F-Q84

5.1.3 Required header files


#include "mcc_generated_files/system/clock.h"

5.1.4 Module Documentation

5.1.4.1 CLKREF

This file contains the API prototype for the CLKREF driver.

5.1.4.1.1 Module description

This file contains the API prototype for the CLKREF driver.

Version: CLKREF Driver Version 2.0.0

5.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

5.1.5 File Documentation

5.1.5.1 source/clkref.c File Reference

This file contains the API implementation for the CLKREF driver.

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

5.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

5.1.5.2 source/clkref.h File Reference

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

5.1.5.2.2 Detailed Description

CLKREF Generated Driver API Header File.