Hi folk,
Would you like show me an example, how can I set ADE7169F16 rising ADE_ISR() interrupt subroutine.
Thanks & Best Regards,
Cuong,
say, Pograf, don't you feel that you should have informed the OP about the assumptions you made by posting this code:
void DelayMs(unsigned char Ms) { int i; for(i=0;i<Ms*48;i++); }
?
Looks like you've been getting just pretty useless responses to your question. Ba'al, once again, giving his typical style response.
Anyway, I'm not familiar with the particular device, but a quick glance at the datasheet suggests that interrupt pins are configurable just like a standard 8052; i.e., selectable between level or falling edge.
I cannot see an option for a rising edge selection.
If it cannot be done, then one option is to use an inverter for the input. If you want to make it programmatic between rising/falling edge, then the inverter can be an EOR gate with one input use for the source and the other driven by an output pin of the CPU. Toggle the output pin and you toggle the edge detection logic. If you want a basic outline circuit of this, to better explain it, please just ask.