Go Down

Topic: Please Help About Communication Codes With CS5490 Cirrus Entegrated (Read 28 times) previous topic - next topic

Hİ, I want to communicate with cs5490 energy measurement entegrated. Firstly i want to read that

entegrated.

it has some register codes. so i need to send it (0x8000) hexcodes to read. but i could not get answer from

arduino that is ADK model. I used some codes to get reply. But nothing happened.

This entegrated has 600 baud rates. I'm using program as name is ''termite'' that communicating serial

line. please kindly check my codes and give me idea what could was problem. Many thanks. Also it could

interest about termite program setting. I do not know well that program.


#include "Arduino.h"

int okunankod;
int resetpin = 7 ;


void setup() {

Serial1.begin(600);


pinMode(resetpin, OUTPUT);

digitalWrite(resetpin, HIGH);

delay(2000);

digitalWrite(resetpin, LOW);

}

void loop() {

Serial.print("register kod ="); 

if(Serial.available() > 0){

Serial.write(0x8000);

Serial.print("register kod =");

okunankod = Serial.read();

Serial.println(okunankod);

delay(5000);

}
}

Go Up