simple code problem

Status
Not open for further replies.

neelam29

New Member
Hi,
last night i was trying to interface ADE7754 with 89c51. I just gave 220 v AC voltage at Phase A input (via 1Mohm/1K resistor network) and read the value of AVrms register which is showing a huge value which changes with change in voltage. But the value is too large than maximum possible.

I doubt in one part of my code. Should the code be written as :-

CLR C
SETB SCLK
CLR SCLK ;SERIAL CLOCK TO ADE7754

MOV C, DOUT ;DOUT IS DATA OUT OF ADE7754
RLC A


or should this be as below????

CLR C
SETB SCLK

MOV C, DOUT
RLC A

CLR SCLK ;CLR SCLK SHOULD BE DONE AFTER RLC?????

Thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…