4.12.1 DSM

Data Signal Modulator

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

4.12.1.2 Supported Device Families

PIC16F176x PIC16F177x PIC16F183xx
PIC16F188xx PIC18F-K40 PIC18F-K42
PIC18F-K83 PIC18F-Q10 PIC18F-Q40
PIC18F-Q41 PIC18F-Q43 PIC18F-Q83
PIC18F-Q84

4.12.1.3 Required Header Files:

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

4.12.1.4 Module Documentation

4.12.1.4.1 DSMx

This file contains the API prototypes for the DSMx module.

Module description

This file contains the API prototypes for the DSMx module.

Version: DSMx Driver Version 2.01
Functions

Function Documentation

DSMx_Initialize()

void DSMx_Initialize (void )

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

Section: Included Files Section: DSMx APIs

Parameters:
None.
Returns:

None.

Section: Included Files Section: DSMx APIs

DSMx_ManualModulationClear()

void DSMx_ManualModulationClear (void )

Sets the modulation source signal to low.

Precondition:

DSMx_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSMx_ManualModulationSet()

void DSMx_ManualModulationSet (void )

Sets the modulation source signal to high.

Precondition:

DSMx_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSMx_ManualModulationToggle()

void DSMx_ManualModulationToggle (void )

Toggles the modulation source signal.

Precondition:

DSMx_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSMx_ModulationStart()

void DSMx_ModulationStart (void )

Enables the modulator and starts the signal modulation.

Precondition:

DSMx_Initialize() is already called.

Parameters:
None.
Returns:

None.

DSMx_ModulationStop()

void DSMx_ModulationStop (void )

Disables the modulator and stops the signal modulation.

Precondition:

DSMx_Initialize() is already called.

Parameters:
None.
Returns:

None.

4.12.1.5 File Documentation

4.12.1.5.1 source/dsm[x].c File Reference

This file contains the API implementations for the DSMx module.

#include <xc.h>
#include "../dsm[x].h"

Functions

Detailed Description

This file contains the API implementations for the DSMx module.

DSMx Generated Driver File.

Version: DSMx Driver Version 2.01

4.12.1.5.2 source/dsm[x].h File Reference

#include <stdint.h>

Functions

Detailed Description

DSMx Generated Driver API Header File.