3.20.1 10-bit PWM

10-bit Pulse-Width Modulator

3.20.1.1 Introduction

This module is a 10-bit Pulse-Width Modulator (PWM) module that generates a pulse-width modulated signal determined by the duty cycle, period, and resolution.

3.20.1.2 Supported Device Families

PIC12/16F150xPIC12/16F161xPIC12/16F184x
PIC12/16LF155xPIC16F145xPIC16F152xx
PIC16F153xxPIC16F170xPIC16F171x
PIC16F176xPIC16F177xPIC16F180xx
PIC16F183xxPIC16F184xxPIC16F188xx
PIC16F191xxPIC16LF156xPIC18F-K40
PIC18F-K42PIC18F-K83PIC18F-Q10

3.20.1.3 Required Header Files

#include "mcc_generated_files/pwm/pwm[x].h"
Note: Replace [X] with the instance number of the selected PWM module.

3.20.1.4 Module Documentation

3.20.1.4.1 PWMx

This file contains the API prototypes for the PWMx driver.

Module description

This file contains the API prototypes for the PWMx driver.

Version: PWMx Driver Version 2.0.2

Function Documentation

PWMx_Initialize()

void PWMx_Initialize (void )

Initializes the PWMx interface.

Parameters:
None.
Returns:

None.

Section: Included FilesSection: PWM Module APIs

PWMx_LoadDutyValue()

void PWMx_LoadDutyValue (uint16_t dutyValue)

Loads the 16-bit duty cycle value.

Parameters:
uint16_t

dutyValue - PWMx duty cycle value to be loaded.

Returns:

None.

3.20.1.5 File Documentation

3.20.1.5.1 source/pwmx.c File Reference

This file contains the API implementations for the PWMx module.

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

Detailed Description

This file contains the API implementations for the PWMx module.

PWMx Generated Driver File

Version: PWMx Driver Version 2.0.2

3.20.1.5.2 source/pwmx.h File Reference

#include <xc.h>
#include <stdint.h>

Detailed Description

PWMx Generated Driver API Header File

Macro Definition Documentation

PWMX_INITIALIZE_DUTY_VALUE

#define PWMX_INITIALIZE_DUTY_VALUE 511

Section: Included FilesSection: Macro Declarations