Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5162

Interfacing (DSI, CSI, I2C, etc.) • Re: i2cset not working on sc16is752

$
0
0
Thanks for the further things to try out.

Using the command

Code:

pi@raspberrypi:~ $ sudo i2cset -f -y 3 0x4d 0x03 0x00pi@raspberrypi:~ $ sudo i2cget -y 3 0x4d 0x030x28
Does no change to the result, and sorry to say i2ctransfer is the same;

Code:

pi@raspberrypi:~ $ i2ctransfer -y 3 w2@0x4d 0x03 0x00pi@raspberrypi:~ $ i2ctransfer -y 3 w1@0x4d 0x03 r1@0x4d0x28
I might have to get hold of the Pimoroni guys and get more info on how i2c-3 has been created.

Of note is that I made a small bit of rough code in the arduino mega to set and read the register.

Code:

byte c=0;void setup() {  // put your setup code here, to run once:  Wire.begin();  Serial.begin(9600);}void loop() {  Serial.println("Sending 77 3 0");  Wire.beginTransmission(77);  Wire.write(3);  Wire.write(0);  Wire.endTransmission();  Serial.println("Reading Register 3");  Wire.beginTransmission(77);  Wire.write(3);  Wire.endTransmission();    Wire.requestFrom(77,1);  while(Wire.available()) {    c = Wire.read(); // Receive a byte as character    }  Serial.println(c);         // Print the character  delay(500);
It returns;

Code:

Sending 77 3 0Reading Register 340
So it seems the arduino is not setting it either. At least the read value is consistent.

Statistics: Posted by midworld08 — Mon May 20, 2024 3:04 am



Viewing all articles
Browse latest Browse all 5162

Trending Articles