Home > AVR > Energy meter
Uploaded: 15-02-2011
Code Rating:
Chip: AVR
Dev Tool: C
File Size: 1KB
Uploaded by: ashar.msrit
Downloads: 1
Points Required: 5

Code Description

This is the program I have done until now. I find a problem to detect the first sample:

Each time i have a sample avaiable, an input call IRQ will go low, and this calls the subroutine ”°INTERRUPT”± (external interrupt). Here i take the sample, procces it and add to the average-data. Ok this is fine, the problem is.. how can i detect the first sample???

I have other input call ZX, wich is high in the positive semiperiod of the voltage sample and low in the negative one, but i cant program it. I have been triying to introduce a bool variable like StartAveraging if first detect a 0, and then a 1 (this mean i have the first positive sample)

Latest Codes

Download

 Download [Click to enter the download page]

Todays Top Downloads

Top Downloads this Month

Top downloads