4.12.2 DSM with Slew Rate Control

Data Signal Modulator with Slew Rate Control

4.12.2.1 Introduction

The Data Signal Modulator (DSM) is a peripheral that allows the user to mix a data stream, also known as a modulator signal, with a carrier signal to produce a modulated output. Both the carrier and the modulator signals are supplied to the DSM module either internally, from the output of a peripheral, or externally through an input pin. The modulated output signal is generated by performing a logical “AND” operation of both the carrier and modulator signals, and then provided to the DSM_out pin. This variant of the module has a Slew Rate Control.

4.12.2.2 Supported Device Families

PIC12/16F182x PIC12/16F184x PIC18F-K80

4.12.2.3 Required Header Files:

#include "mcc_generated_files/dsm/dsm.h"

4.12.2.4 Module Documentation

4.12.2.4.1 DSM

This file contains the API prototypes for the DSM module.

Module description

This file contains the API prototypes for the DSM module.

Version: DSM Driver Version 1.0.0
Functions

Function Documentation

DSM_Initialize()

void DSM_Initialize (void )

Initializes the DSM module. This is called only once before calling other DSM APIs.

Parameters:
None.
Returns:

None.

DSM_ManualModulationClear()

void DSM_ManualModulationClear (void )

Sets the modulation source signal to low.

Precondition:

DSM_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSM_ManualModulationSet()

void DSM_ManualModulationSet (void )

Sets the modulation source signal to high.

Precondition:

DSM_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSM_ManualModulationToggle()

void DSM_ManualModulationToggle (void )

Toggles the modulation source signal.

Precondition:

DSM_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSM_ModulationStart()

void DSM_ModulationStart (void )

Enables the modulator and starts the signal modulation.

Precondition:

DSM_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSM_ModulationStop()

void DSM_ModulationStop (void )

Disables the modulator and stops the signal modulation.

Precondition:

DSM_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSM_ModulatorOutputDisable()

void DSM_ModulatorOutputDisable (void )

Disables the modulation pin output.

Precondition:

DSM_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSM_ModulatorOutputEnable()

void DSM_ModulatorOutputEnable (void )

Enables the modulation pin output.

Precondition:

DSM_Initialize() is already called.

Parameters:
None.
Returns:

None.

4.12.2.5 File Documentation

4.12.2.5.1 source/dsm.c File Reference

This file contains the API implementations for the DSM module.

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

Functions

Detailed Description

This file contains the API implementations for the DSM module.

DSM Generated Driver File.

Version: DSM Driver Version 1.0.0

4.12.2.5.2 source/dsm.h File Reference

#include <stdint.h>

Functions