Dependencies:   mbed

Revision:
0:4fb921928934
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/4_20_Outputs.cpp	Fri Oct 04 21:09:15 2019 +0000
@@ -0,0 +1,49 @@
+/**-----------------------------------------------------------------------------
+      \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
+    
+}