CS5490 Power Metering IC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I have a PSOC 5 front end interface collecting data from a Cirrus Logic CS5490. I successfully am reading all registers except for the temperature, which for some reason is refusing to update. I know it is not my register read code because the status bit showing an update happened never fires.

   

http://www.mouser.com/ds/2/76/CS5490_F3-473097.pdf

Any ideas on what is happening? I have been working at this issue for a few days now.

Here is the datasheet and my project is attached.

   

The PSOC program puts the CS5490 into continuous conversion mode. When the UART interfacing to the PC sends an upload command (command ID 1), the PSoC polls the status register until it is set, indicating data is available. Then the PSoC program uploads all the data from the registers I specified, except for the temperature. A timer in a VB app issues the command every 1060 mS.

0 Likes
1 Reply
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Not sure if this will make a difference but should this -

   

 

   

    // Write bytes to register.  
    METER_PutChar((data & 0x000000FF) >> 0);
    METER_PutChar((data & 0x0000FF00) >> 8);
    METER_PutChar((data & 0x00FF0000) >> 16);
 

   

change to -

   

 

   

    // Write bytes to register.  
    METER_PutChar( (uint8) ( ( data & 0x000000FF ) >> 0 ) );
    METER_PutChar( (uint8) ( ( data & 0x0000FF00 ) >> 8 ) );
    METER_PutChar( (uint8) ( ( data & 0x00FF0000 ) >> 16 ) );
 

   

Regards, Dana.

0 Likes