Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to debug writing registers in ade 7753

Status
Not open for further replies.

charlyking

Newbie level 4
Joined
Sep 6, 2008
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
HI ALL

I have a project using ADE7753.
Right now I am trying to write the registers inside ADE7753 with atmega168 microprocessor.
I modified some SPI code online and I do use oscilloscope to check the write and read sequence.
But the strange thing is that all the signal sequence looks fine.
I could read default value inside. The reading immediately after the write is fine but it I read the same address again, then it came out to the default value.

I am not sure if the writing is completely successful.
How could I debug the circuit and make sure the registers have been fully and successfully modified.

Thanks!
 

Hi

Find a register who can be READ from and write to and write & read the 0x55 and 0xAA value when you write & read is OK (verified) it can be say that communication is OK

All the best

Bobi

The microcontroller specialist
 

actually I found my problem.
The reset pin should not be floated.

However, currently I am working on the calibration.
the AENERGY and RAENERGY registers I have read are quite small, only in 0x0189~ 0x489

here is my current setting:
0x09, 2, 0x00, 0x81, 0x03, // Mode,
0x0A, 2, 0x00, 0x40, 0x03, // Interrupt enable register,
0x0F, 1, 0x00, 0x00, 0x03, // PGA Gain 0 for 0.5V,
0x10, 1, 0x00, 0x0D, 0x03, // PHCAL, phase calibration register
0x11, 2, 0x00, 0x00, 0x03, // APOS, active power offset correstion
//
0x12, 2, 0x00, 0xFF, 0x03, // WGAIN, Power Gain, output = Active Power * (1 + WGAIN/2^12).
// 0x7FF up by 50%, 0x0800 scale by -50%
0x13, 1, 0x00, 0x00, 0x03, // WDIV, Active energy divider, 8-bit unsigned
0x14, 2, 0x00, 0x00, 0x03, // CFNUM, CF Divider numberator
0x15, 2, 0x00, 0x10, 0x03, // CFDEN, CF Divider denominator CFDEN Lower den, higher freq.
0x1C, 2, 0x00, 0xFF, 0x03, // LINECYC, Line cycle energy accumulation mode

how to use the half line cycle registers?

Thanks!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top