Please enable JavaScript.
Coggle requires JavaScript to display documents.
Start, User selects value to display. Voltage, current or power, INT0,…
Start
- Initialize UART
- Initialize ADC
- Initialize timers :
- Initialize display
Update display
Prepare for Sampling
- Set channel to voltage(ADC0)
Start sampling channel:
- n_cycles = 1;
- Enable auto trigger mode.
- Set TCNT0 to some arbitrary fixed value.
- Read adc values for the whole cycle
- Store values in appropriate array
-
- Disable ADC auto trigger.
- Do calculations for Vpeak, Irms and power.
- Store results.
-
-
-
-
- Set channel to voltage(ADC0)
User selects value to display. Voltage, current or power
-
-
-
-
n_cycles == 5,
channel==1,
INT0
-
-
-
-
-
-
-
-