Bryan and Naved Debub monitor
Embed:
(wiki syntax)
Show/hide line numbers
4_20_Outputs.cpp
00001 /**----------------------------------------------------------------------------- 00002 \file shared.h 00003 -- -- 00004 -- ECEN 5803 Mastering Embedded System Architecture -- 00005 -- Project 1 Module 4 -- 00006 -- Microcontroller Firmware -- 00007 -- shared.h -- 00008 -- -- 00009 ------------------------------------------------------------------------------- 00010 -- 00011 -- Designed for: University of Colorado at Boulder 00012 -- 00013 -- 00014 -- Designed by: Tim Scherr 00015 -- Revised by: Student's name 00016 -- 00017 -- Version: 2.1 00018 -- Date of current revision: 2017-09-25 00019 -- Target Microcontroller: Freescale MKL25ZVMT4 00020 -- Tools used: ARM mbed compiler 00021 -- ARM mbed SDK 00022 -- Freescale FRDM-KL25Z Freedom Board 00023 -- 00024 -- 00025 -- Functional Description: Header file for all globals 00026 -- 00027 -- Copyright (c) 2015, 2016 Tim Scherr All rights reserved. 00028 -- 00029 */ 00030 00031 00032 #include "shared.h" 00033 00034 void PwmOutputs_flowmeter(void){ 00035 00036 PwmOut FLOW_4_20(PTE30); 00037 00038 FLOW_4_20.period(1/flow); // set PWM pulses proportion to the frequency outputs 00039 FLOW_4_20 = 0.5; // set duty cycle to 50% for the PWM pulses 00040 00041 } 00042 00043 void Pulse_Output_Frequency(void){ 00044 00045 PwmOut Frequency_4_20(PTE31); // TMP0 channel 4 used to display the pulsed outputs 00046 Frequency_4_20.period(1/freq_value); // set PWM pulses proportion to the frequency outputs 00047 Frequency_4_20=0.5; // set duty cycle to 50% for the PWM pulses 00048 00049 }
Generated on Thu Jul 21 2022 22:29:23 by
1.7.2