Question re: Arduino to Arduino I2C with Serial Monitor - Page 1
Forum section: electronics / general

author: Electro Fan
author_rank: Super Contributor
timestamp: November 06, 2015, 04:32:24 am
content: I've been trying to get this to work:I can't get the decoder to read the correct values.In this setup the IDE on the PC uses the Serial Monitor to send a simple "H" or "L" from the Master Uno to the Slave Uno. The H or L travels through a (Com 6) port via a PC USB connection to the Master Uno, which passes it along to the Slave Uno. The Slave Uno is apparently getting the code because it's L LED is turning on with the H and off with the L as it should.I have used my Rigol 2072 to monitor the SCLK and SDA and the scope captures the waveform each time I toggle between H and L through the serial monitor. At one point I fiddled with the Windows Device Manager port settings properties that allow you to turn off Flow Control or use Hardware or Xon/Xoff and I got a proper "H", but it must have been a random fluke because it wasn't repeatable. Other symptoms are that the R/W address is not showing the correct address (should be 5). Additionally, when I set the decoder to ASCII I don't get 1s and 0s. Something I have done is goofed up, no doubt..... Suggestions appreciated. ThanksUpdate: Binary is displaying as 1s and 0s - but not decoding properly.

author: Electro Fan
author_rank: Super Contributor
timestamp: November 06, 2015, 06:02:33 am
content: I used an Intronix LogicPort to monitor the Arduino to Arduino I2C connection and it shows that the H and L are being properly communicated between the two Arduinos. So, I think the issue must be in something I have not set up properly on the Rigol. There aren't that many settings on the Rigol but I'm sure I've missed something...Suggestions welcome. Thanks!

author: Electro Fan
author_rank: Super Contributor
timestamp: November 06, 2015, 06:29:15 am
content: I turned the scope off and on and for a few shots it started decoding the H and L. I twiddled with the trigger levels for SDA and SCLK and it seemed sensitive to that but the best results were near the middle of the waveforms (about 2.5V). After a few successes it went into lala land. I'm playing with the When, AddrBits, Address, and Directions settings but I'm not sure if I have those right - might be the settings where I'm off.I think the answer might be sitting in the LogicPort images above. I'm just starting to learn I2C and I'm not sure what the S, A, and P stand for; and I'd guess 2h might be code for the 5 address... but as you can see, I'm just guessin'. Need some help from an experienced I2Cer, Plz, Thx.Update: Always good to Read The Fine Manual (Intronix has pretty good help/documentation). S is start (duh), A is Acknowledge (sort of duh), HS is High Speed, and P is Stop (go figure). Now I just need to figure out how to use this info to get the Rigol to do it's thing properly.

author: Electro Fan
author_rank: Super Contributor
timestamp: November 06, 2015, 08:20:27 am
content: Update: on the digital channels of the MSO it decodes properly. I think there is a noise issue on the analog side.

author: Electro Fan
author_rank: Super Contributor
timestamp: November 06, 2015, 09:02:13 am
content: Update: in order to display the I2C address the Include R/W soft button needs to be set to Close. In open it will still display an address but it will be 0x0A.