Naved Maududi
/
DebugMonitor_revised
revised code
4_20_Outputs.cpp
- Committer:
- nmaududi
- Date:
- 2019-10-05
- Revision:
- 2:64a34ae90bb1
- Parent:
- 0:4fb921928934
File content as of revision 2:64a34ae90bb1:
/**----------------------------------------------------------------------------- \file shared.h -- -- -- ECEN 5803 Mastering Embedded System Architecture -- -- Project 1 Module 4 -- -- Microcontroller Firmware -- -- shared.h -- -- -- ------------------------------------------------------------------------------- -- -- Designed for: University of Colorado at Boulder -- -- -- Designed by: Tim Scherr -- Revised by: Student's name -- -- Version: 2.1 -- Date of current revision: 2017-09-25 -- Target Microcontroller: Freescale MKL25ZVMT4 -- Tools used: ARM mbed compiler -- ARM mbed SDK -- Freescale FRDM-KL25Z Freedom Board -- -- -- Functional Description: Header file for all globals -- -- Copyright (c) 2015, 2016 Tim Scherr All rights reserved. -- */ #include "shared.h" void PwmOutputs_flowmeter(void){ PwmOut FLOW_4_20(PTE30); FLOW_4_20.period(1/flow); // set PWM pulses proportion to the frequency outputs FLOW_4_20 = 0.5; // set duty cycle to 50% for the PWM pulses } void Pulse_Output_Frequency(void){ PwmOut Frequency_4_20(PTE31); // TMP0 channel 4 used to display the pulsed outputs Frequency_4_20.period(1/freq_value); // set PWM pulses proportion to the frequency outputs Frequency_4_20=0.5; // set duty cycle to 50% for the PWM pulses }