Go Down

Topic: I2C and SPI conflict (Read 10264 times) previous topic - next topic

apollonios

#15
Jul 25, 2013, 06:06 pm Last Edit: Jul 25, 2013, 06:46 pm by apollonios Reason: 1

Quote

If your's is RGB it should have more than the 16 pins. You didn't provide a link to your hardware so it's almost impossible for us to help you further.


I couln't find any help, discussion or schematic for the 18 pins. Only a photo with 3 colors together side by side that was writing  'normal or reverse polarity' I think.

another strange thing, as you are from arduino stuff
the Serial.available should wait until one char is pressed. But not in me, it sends ch=-1 continuously, thousands. So I had to make a function to control it.
-->
char   Readchar()
{ char ch;
ch=' ';
 while (ch!=-1)
 {
ch= Serial.read();
 // Serial.print(" sec -> "); Serial.println(ch);
return ch;
 if (ch=-1) break; // I put this because while works funny, destroy the last char, should be repeat
 }
}
also I got one error (stk500_getsync(): not in sync:) from Ubuntu, during upload, serial monitor works ok.
I found also others have the same problem but no solution.
Also, there is not ''leonardo'' choice in Ubuntu  arduino compiler. Must have a newer version

---

Also I made matrix for Greek chars. There are 10 (??????????) but leonardo only 8 can accept , so the last 2 go to 1st and 2nd position.
Can't change this? Or is possible in other model of arduino?

Thanks and excuse me for the little off-topic

pylon

Don't you have a link to the page where you bought that stuff? If not, please make a sharp picture of it, maybe one of the forum members recognize the model and can provide a link to the datasheet.

jack wp

Oh, I thought I understood him to say both devices were I2C devices. If they were both run as I2C, on the same bus, then it may eliminate some problems. May not be able to configure them that way I guess.

Thanks for the info.

Jack

arbutus

My system is working - the problem was because pins 2,3,4 were being used for the Adafruit LCD backpack. See previous post from me.

The backpack is http://learn.adafruit.com/i2c-spi-lcd-backpack I AM NOT USING I2C for the LCD!  It uses the Adafruit SPI protocol. This backpack could use I2C, and the address is selectable so it could work comfortably with the RTC.

The I2C device is a DS1307 RTC module using SDA/SCL (also D2,D3 on the Leonardo) address 0x68

Multiple I2C devices can be used on an I2C bus provided each device has an unique address.

Similarly the Adafruit 'SPI' system also allows multiple devices to share DAT and CLK, with device selected by LAT.

Don't breath in the magic smoke!

apollonios

#19
Jul 25, 2013, 08:34 pm Last Edit: Jul 25, 2013, 08:39 pm by apollonios Reason: 1

Quote

My system is working - the problem was because pins 2,3,4 were being used for the Adafruit LCD backpack. See previous post from me.


look, I have this LCD with the pins I wrote,
can you please write to me where to put this pins on leonardo board and then we will see about the software.

thanks!

arbutus

http://wiring.org.co/learning/libraries/realtimeclock.html

I would wire SDA on the clock to the Leonardo SDA pin near the Aref pin, and SCL on the clock to the SCL pin on the Arduino.
Don't breath in the magic smoke!

apollonios


http://wiring.org.co/learning/libraries/realtimeclock.html

I would wire SDA on the clock to the Leonardo SDA pin near the Aref pin, and SCL on the clock to the SCL pin on the Arduino.


I think you are kidding!

arbutus

OK look here first:

http://arduino.cc/en/Tutorial/LiquidCrystal

You will see that pins D2 and D3 are used in the sketch - those are conflicting with D2, D3 used for the I2C Clock.  So in the sketch and wiring, change those connections.

This is a 4 wire (4 bit) interface which is how most LCDs are connected. It is possible to use all 8 inputs but not necessary.

The reason I used the Adafruit LCD backpack is because it provides a connection to the Arduino using 2 or 3 wires (plus pwr/gnd) and therefore saves a lot of wiring.


Hope this helps!
Don't breath in the magic smoke!

apollonios

#23
Jul 27, 2013, 03:35 pm Last Edit: Jul 27, 2013, 03:37 pm by apollonios Reason: 1

OK look here first:

http://arduino.cc/en/Tutorial/LiquidCrystal

You will see that pins D2 and D3 are used in the sketch - those are conflicting with D2, D3 used for the I2C Clock.  So in the sketch and wiring, change those connections.

This is a 4 wire (4 bit) interface which is how most LCDs are connected. It is possible to use all 8 inputs but not necessary.

The reason I used the Adafruit LCD backpack is because it provides a connection to the Arduino using 2 or 3 wires (plus pwr/gnd) and therefore saves a lot of wiring.


Hope this helps!


...now you are clear.... this -> http://www.adafruit.com/products/399 is very interesting, only I can't buy only one or two...

Go Up