3.14 Pulse Output Driver

Overview

Pulse Output Driver can be used to generate One shot Pulse or a series of output Pulses.Pulse Output Driver can be used to generate One shot Pulse or a series of output Pulses.

Features

  • User configurable Pulse ON time.
  • User configurable time interval between two consecutive Pulse to generate series of Output Pulses.
  • Pulse ON time and Pulse interval time value range varies based on the clock source selected from Hardware Dependency module (PLIB).
  • Pulse Output depends on Synchronization (Sync) and Trigger source.
    • In Sync operation, the Timer resets or clear occurs when the input selected by Sync is asserted.
    • In Trigger operation, the Timer is held in reset until the input selected by Trigger is asserted.

The following waveform represents effect Sync source on Pulse generation.The following waveform represents effect Sync source on Pulse generation.

Figure . 

The following waveform represents effect Trigger source on Pulse generation.

Figure . 

3.14.1 Module Documentation

3.14.1.1 Event Output Driver

Event output Driver is used to generate single or series of Low, High or Toggle Output using dsPIC MCUs.

3.14.1.1.1 Module description

Event output Driver is used to generate single or series of Low, High or Toggle Output using dsPIC MCUs.

Data structures
Definitions
Functions
Variables
  • const struct EVENTOUTPUT_INTERFACE Event_Output4

    Structure object of type EVENTOUTPUT_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Event_Output1 can be changed by the user in the MCCP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

3.14.1.1.2 Definition Documentation

Event_Output4_Deinitialize

#define Event_Output4_Deinitialize SCCP4_EventOutput_Deinitialize

This macro defines the Custom Name for SCCP4_EventOutput_Deinitialize API.

Event_Output4_Disable

#define Event_Output4_Disable SCCP4_EventOutput_Disable

This macro defines the Custom Name for SCCP4_EventOutput_Disable API.

Event_Output4_Enable

#define Event_Output4_Enable SCCP4_EventOutput_Enable

This macro defines the Custom Name for SCCP4_EventOutput_Enable API.

Event_Output4_EventOutput_CallbackRegister

#define Event_Output4_EventOutput_CallbackRegister SCCP4_EventOutput_CallbackRegister

This macro defines the Custom Name for SCCP4_EventOutput_CallbackRegister API.

Event_Output4_Initialize

#define Event_Output4_Initialize SCCP4_EventOutput_Initialize

This macro defines the Custom Name for SCCP4_EventOutput_Initialize API.

Event_Output4_SoftwareTriggerSet

#define Event_Output4_SoftwareTriggerSet SCCP4_EventOutput_SoftwareTriggerSet

This macro defines the Custom Name for SCCP4_EventOutput_SoftwareTriggerSet API.

Event_Output4_TransitTimeSet

#define Event_Output4_TransitTimeSet SCCP4_EventOutput_TransitTimeSet

This macro defines the Custom Name for SCCP4_EventOutput_TransitTimeSet API.

3.14.1.1.3 Function Documentation

SCCP4_EventOutput_Callback()

void SCCP4_EventOutput_Callback (void )

This is the default callback with weak attribute. The user can override and implement the default callback without weak attribute or can register a custom callback function using SCCP4_EventOutput_CallbackRegister.

Parameters:
none
Returns:

none  

SCCP4_EventOutput_CallbackRegister()

void SCCP4_EventOutput_CallbackRegister (void(*)(void) handler)

This function can be used to override default callback and to define custom callback for SCCP4 EventOutput event.

Parameters:
in handler

- Address of the callback function

Returns:

none  

SCCP4_EventOutput_Deinitialize()

void SCCP4_EventOutput_Deinitialize (void )

Deinitializes the SCCP4 to POR values.

Parameters:
none
Returns:

none  

SCCP4_EventOutput_Disable()

void SCCP4_EventOutput_Disable (void )

Disables the SCCP4 module.

Parameters:
none
Returns:

none  

SCCP4_EventOutput_Enable()

void SCCP4_EventOutput_Enable (void )

Enables the SCCP4 module with the corresponding operation mode.

Parameters:
none
Returns:

none  

SCCP4_EventOutput_Initialize()

void SCCP4_EventOutput_Initialize (void )

Initializes the SCCP4 Edge Event driver. This function must be called before any other SCCP4 function is called.

Parameters:
none
Returns:

none  

SCCP4_EventOutput_SoftwareTriggerSet()

void SCCP4_EventOutput_SoftwareTriggerSet (void )

Sets the software trigger.

Parameters:
none
Returns:

none  

SCCP4_EventOutput_TransitTimeSet()

void SCCP4_EventOutput_TransitTimeSet (uint32_t count)

Sets the compare values for SCCP4.

Parameters:
in count

- edge event wait time count  

Returns:

none  

3.14.1.1.4 Variable Documentation

Event_Output4

const struct EVENTOUTPUT_INTERFACE Event_Output4

Structure object of type EVENTOUTPUT_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Event_Output1 can be changed by the user in the MCCP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

3.14.2 Data Structure Documentation

3.14.2.1 EVENTOUTPUT_INTERFACE Struct Reference

Structure containing the function pointers of EVENTOUTPUT driver.

3.14.2.1.1 Detailed Description

Structure containing the function pointers of EVENTOUTPUT driver.

#include <eventoutput_interface.h>

Data Fields
  • void(* Initialize )(void)

    Pointer to SCCPx_EventOutput_Initialize e.g. SCCP1_EventOutput_Initialize.

  • void(* Deinitialize )(void)

    Pointer to SCCPx_EventOutput_Deinitialize e.g. SCCP1_EventOutput_Deinitialize.

  • void(* Enable )(void)

    Pointer to SCCPx_EventOutput_Enable e.g. SCCP1_EventOutput_Enable.

  • void(* Disable )(void)

    Pointer to SCCPx_EventOutput_Disable e.g. SCCP1_EventOutput_Disable.

  • void(* TransitTimeSet )(uint32_t count)

    Pointer to SCCPx_EventOutput_TransitTimeSet e.g. SCCP1_EventOutput_TransitTimeSet.

  • void(* SoftwareTriggerSet )(void)

    Pointer to SCCPx_EventOutput_SoftwareTriggerSet e.g. SCCP1_EventOutput_SoftwareTriggerSet.

  • void(* CallbackRegister )(void(*handler)(void))

    Pointer to SCCPx_EventOutput_CallbackRegister e.g. SCCP1_EventOutput_CallbackRegister.

  • void(* Tasks )(void)

    Pointer to SCCPx_EventOutput_Tasks e.g. SCCP1_EventOutput_Tasks (Supported only in polling mode)

3.14.2.1.2 Field Documentation

The documentation for this struct was generated from the following file:

source/

eventoutput_interface.h

CallbackRegister

void(* CallbackRegister) (void(*handler)(void))

Pointer to SCCPx_EventOutput_CallbackRegister e.g. SCCP1_EventOutput_CallbackRegister.

Deinitialize

void(* Deinitialize) (void)

Pointer to SCCPx_EventOutput_Deinitialize e.g. SCCP1_EventOutput_Deinitialize.

Disable

void(* Disable) (void)

Pointer to SCCPx_EventOutput_Disable e.g. SCCP1_EventOutput_Disable.

Enable

void(* Enable) (void)

Pointer to SCCPx_EventOutput_Enable e.g. SCCP1_EventOutput_Enable.

Initialize

void(* Initialize) (void)

Pointer to SCCPx_EventOutput_Initialize e.g. SCCP1_EventOutput_Initialize.

SoftwareTriggerSet

void(* SoftwareTriggerSet) (void)

Pointer to SCCPx_EventOutput_SoftwareTriggerSet e.g. SCCP1_EventOutput_SoftwareTriggerSet.

Tasks

void(* Tasks) (void)

Pointer to SCCPx_EventOutput_Tasks e.g. SCCP1_EventOutput_Tasks (Supported only in polling mode)

TransitTimeSet

void(* TransitTimeSet) (uint32_t count)

Pointer to SCCPx_EventOutput_TransitTimeSet e.g. SCCP1_EventOutput_TransitTimeSet.

3.14.3 File Documentation

3.14.3.1 source/eventoutput_interface.h File Reference

#include <stddef.h>
#include <stdint.h>

3.14.3.1.1 Data structures

3.14.3.1.2 Detailed Description

EVENTOUTPUT Generated Driver Interface Header File

3.14.3.2 source/sccp4.h File Reference

This is the generated driver header file for the SCCP4 driver.

#include <stddef.h>
#include "eventoutput_interface.h"

3.14.3.2.1 Functions

3.14.3.2.2 Macros

3.14.3.2.3 Variables

  • const struct EVENTOUTPUT_INTERFACE Event_Output4

    Structure object of type EVENTOUTPUT_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Event_Output1 can be changed by the user in the MCCP user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

3.14.3.2.4 Detailed Description

This is the generated driver header file for the SCCP4 driver.

SCCP4 Generated Driver Header File