Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Attached is the code which demonstrate how to measure average voltage of an AC signal using PSoC1. Following is the code flow:
Analog to Digital Conversion->Rectify and accumulate the samples->check if integral number of full cycle sample is acquired->divide the sum with the total number of sample->Print the average on the LCD.
Some samples may be missed due to processing delay . In order to avoid that ADC output is collected inside the interrupt and filled into a buffer.Hope this will help.