The DATA pin goes back to high, then to low, then the CLK pin goes up, shortly followed by the data pin. Translating to human numbers, we read: 128 + 64 + 32 + 8 = 232! Exactly the number I was trying to send to address 0. This time, data is actually being sent! The pattern goes 8 bits of data, followed by 1 response bit. In decimal, I think you can guess what it is! After that, 1 read/write bit, 1 response bit (pulled low by the receiver), and then a little gap in the CLK before reading again. We can read the address again (which is pretty simple this time around) to being: 0000000. Again, the DATA pin is pulled down, shortly followed by the CLK being pulled down. Now we're talking! Data actually being sent! It's amazing. After fiddling around with other knobs and buttons, this is what I finally saw:
I set 2.00V per division (per square) for both the DATA and CLK, and set the trigger on the rising edge of the clock. This is where the trusty oscilloscope comes in! I hooked up Channel 1 to Data and Channel 2 to Clock. Each Arduino Mega gets its own data packet sent to them by my one master Mega, and if each of the Arduino's wanted to, they could become the master Mega as well.Īfter a while of being amazed at how awesome my boards were, I realized I couldn't even visualize the bits of data that I was sending. Compared to the UART (universal asynchronous receiver-trasmitter) and the SPI (serial peripheral interface) communication protocols, this allows for transmission of data without a bunch of wires or pins being used. Data can be sent 2 ways, meaning the readers can become writers with the same wires. I do this with only 3 pins (DATA, CLK, and GROUND). Although it doesn't look too impressive, I'm actually sending bytes of data to 5 different Arduino Megas.