Presentation is loading. Please wait.

Presentation is loading. Please wait.

Water Flow GROUP A. Analogue input voltage results: Motor Input voltage( V) pin 12 Analogue input voltage (V) Display number 0.50.585 0.60.9825 0.71.331.

Similar presentations


Presentation on theme: "Water Flow GROUP A. Analogue input voltage results: Motor Input voltage( V) pin 12 Analogue input voltage (V) Display number 0.50.585 0.60.9825 0.71.331."— Presentation transcript:

1 Water Flow GROUP A

2 Analogue input voltage results: Motor Input voltage( V) pin 12 Analogue input voltage (V) Display number 0.50.585 0.60.9825 0.71.331 0.81.640 0.91.7846 12.153 1.12.258 1.22.559 1.32.665 1.42.973 1.5376 1.63.588 1.73.897 1.83.8EE

3 Hardware

4

5 Block diagram of software functions: AD Converter Decoder Signal input 7-Segment decoder “ad_output” Averaging device “number0” & “number1” The relative 7-segment values output and display on 7-segment Microcontroller “ad_average_output”

6 Timer flow chart: Update the variable “ad_average_output” to “number1” and “number0” Every 10ms Convert the result to Left Digit (Tens) and Right Digit (Unit) Check “current” Current= 0 YES NO Invert “current” byte for next cycle Display the Left Digit (Tens) Display the Right Digit (Units) The odd number of timer ISR The even number of timer ISR Continue timer thread

7 Check counter =129=129 Enable_AD_ISR Counter = 0 CounterAD + 1 Check counterAD counterAD = 0 YESNO Load the “sum_of_adoutput” and divide it by 64 Store the final result to “ad_average_output” 2 YESNO Load the “ad_output” and add it to “sum_of_adoutput” Counter 1 to 128, Trigger the ADC and obtain results The odd number of timer ISR The even number of timer ISR Counter 129, updata the average ADC result for 7- segment display There are 64 results of ADC Continue timer thread Timer thread finish Counter is only counting from 1 to 129 This loop determine do we need to updata the ADS results

8

9

10

11

12


Download ppt "Water Flow GROUP A. Analogue input voltage results: Motor Input voltage( V) pin 12 Analogue input voltage (V) Display number 0.50.585 0.60.9825 0.71.331."

Similar presentations


Ads by Google