Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 22625

Re: ADE7758 LCYCMODE IRQ PROBLEM

$
0
0

Hi Hmani!!

 

Thanks for the reply. About the first point, I have already solved the problem about the infinite loop, I've been using the PCINT0(pin change) pin of my Atmega 2560 instead of a INT0(falling edge interrupt) pin. When I changed, this, it started to work. Now, I have no problems with the /IRQ, It occurs at time, and after reading the reset interrupt status register, this output goes high again. However, I cheaked the status register and it shows different value from the one it should have: 0x1A80 or 0x1AC0. It's strange as I only recive interruptions from LENERGY. In my initialization I read twice RSTATUS, the first it shows a value different from 0x00, and the second most of times is 0x00 as expected.

 

About the AWATTHR register it seems to be working, every time I read it when LENERGY is set I has a higher value, I didn't cheak yet when it overflows. I will try also your recommendation here.

 

I also read the WFORM register, but it always was null. May be I should cheak for WFSM interrupt.

 

Here's my schematic, there are some differences as I realized i commited some mistakes, for example I now use a 10K pull-up resistor for /IRQ, And some of the pins used in my MCU changed. But what I think is the most important stands the same. I send a link if you can't see it properly.  Well I'm going to continue testing. Thanks for the help again!!

SCH.png


Viewing all articles
Browse latest Browse all 22625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>