cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Keerthy
Moderator
Moderator

 Hi,

   

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.

   

Thanks and Regards,

   

Keerthy

0 Likes
1 Solution
ETRO_SSN583
Esteemed Contributor

No attachment present, use IE or Firefox.

   

 

   

Regards, Dana.

View solution in original post

0 Likes
3 Replies
ETRO_SSN583
Esteemed Contributor

No attachment present, use IE or Firefox.

   

 

   

Regards, Dana.

View solution in original post

0 Likes
Keerthy
Moderator
Moderator
        Attached is the project.   
0 Likes
ETRO_SSN583
Esteemed Contributor

Keerthy, a couple of observations -

   

 

   

1) I had to update project, translate you should be using latest version of

   

Designer when you post projects.

   

 

   

2) Looking at main.c I see a sparsity of comments relating to goal and reason of

   

project, methods, and code comments. Forum is a diverse group of skill sets,

   

generally you should target the beginners when you post a "how to" project.

   

 

   

3) The part you choose is not ( I am going out on a limb here) mainstream part

   

like the 29466 (PSOCEval1 kit or -001 kit), or 24xxx, 27xxx series. Just a thought.

   

 

   

Regards, Dana.

0 Likes