0

Driving 2X RA8875 off of one microcontroller, can it be done
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Sat Nov 15, 2014 4:07 pm

Thanks for the suggestion - I'm giving the board 3000mA @ 5V but the situation doesn't change. It also didn't get better when I replaced the Yun's 32u4-processor with a teensy++ 2.0 or a teensy 3.1 which don't draw much power. So far, in my experience, multiple RA8875's can only be addressed under a plain Atmega 328P (Arduino Uno) (I had it FTDI-cable powered [500mA@5V]).

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by tdicola on Sun Nov 16, 2014 4:44 pm

Ah, thanks for checking the power connections. The only other difference I can think of is that the Yun's SPI connections are also connected to the AR9331 processor that runs Linux, and perhaps there is some unexpected interaction there.

Just on a hunch, have you tried moving the CS and RST pins for the second RA88752 to different digital outputs? Looking at the Yun schematic a bit it doesn't look like the current pins should collide with the SPI pins shared with the AR9331, but it's not super clear. I would try moving them to other pins like 5 and 4 to see if anything changes.

Also you might want to post in the Yun's forums to see if anyone else has run into issues sharing multiple SPI devices on the Yun: http://forum.arduino.cc/index.php?board=93.0 Folks there might know a bit more details about any potential SPI interactions with the AR9331.

tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Driving 2X RA8875 off of one microcontroller, can it be

by tdicola on Sun Nov 16, 2014 4:47 pm

Oh and one quick other note, try using Arduino 1.0.6 or 1.5.6-r2 just to rule out an issue with the newer toolchain. Both version 1.5.7 and 1.5.8 use the newer toolchain that we've seen some issues with in other libraries (1.5.7 introduced the updated compiler,etc.).

tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Sun Nov 16, 2014 5:36 pm

tdicola wrote:Just on a hunch, have you tried moving the CS and RST pins for the second RA88752 to different digital outputs? Looking at the Yun schematic a bit it doesn't look like the current pins should collide with the SPI pins shared with the AR9331, but it's not super clear. I would try moving them to other pins like 5 and 4 to see if anything changes.

Funny thing is: when I use pins 5 and 4 for the second RA8875, I get the following feedback over Serial:
Code: Select all | TOGGLE FULL SIZE
RA8875 start
Found RA8875
RA8875 2 start
RA8875 2 Not Found!

Using pins 8 and 7 however, I get
Code: Select all | TOGGLE FULL SIZE
RA8875 start
RA8875 Not Found!
.
Of course, the result remains the same: I cannot use the displays because the code hangs.

PS: I tried various other pins (13/12, 12/11, 5/4, 3/2) and always got
Code: Select all | TOGGLE FULL SIZE
RA8875 start
Found RA8875
RA8875 2 start
RA8875 2 Not Found!
Last edited by local_dani_21 on Sun Nov 16, 2014 5:46 pm, edited 2 times in total.

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Sun Nov 16, 2014 5:37 pm

tdicola wrote:Oh and one quick other note, try using Arduino 1.0.6 or 1.5.6-r2 just to rule out an issue with the newer toolchain. Both version 1.5.7 and 1.5.8 use the newer toolchain that we've seen some issues with in other libraries (1.5.7 introduced the updated compiler,etc.).

I've used 1.5.6-r2 and 1.5.7 and 1.5.8 with the same results.

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Sun Nov 16, 2014 5:41 pm

tdicola wrote:Also you might want to post in the Yun's forums to see if anyone else has run into issues sharing multiple SPI devices on the Yun: http://forum.arduino.cc/index.php?board=93.0 Folks there might know a bit more details about any potential SPI interactions with the AR9331.

I did under http://forum.arduino.cc/index.php?topic=279474.0. Hopefully someone knows something about it. I also contacted Paul Stoffregen (http://forum.pjrc.com/threads/24668-Teensy-3-*-Text-rendering-issue-with-RA8875-TFT-display?p=58035&posted=1#post58035), daddy of the teensy family, with which (teensy++ 2.0 and teensy 3.1) I tried to do the task of connecting multiple RA8875's as well (and also failed with the same error).
Thanks for helping! Dani

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Sun Nov 16, 2014 6:21 pm

Not sure what to think of it but maybe: Could it have something to do with the fact, that the hardware SS of the 32u4 cannot be set to output because it is not assigned to any pin (but to RXLED)? Isn't there something about that the hardware SS has always to be set as an output in order to use SPI properly?

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Sun Nov 16, 2014 6:40 pm

@adafruit_support_rick: Have you tried to replace your Arduino UNO with a LEONARDO (aka 32u4)? Or do you have also a YUN lying around? Would you be so kind to try it out with one of these to maybe reproduce my error messages? Thank you!

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by adafruit_support_rick on Sun Nov 16, 2014 6:53 pm

I can try both.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Driving 2X RA8875 off of one microcontroller, can it be

by adafruit_support_rick on Sun Nov 16, 2014 9:14 pm

Well, the good news is that you're not crazy. It definitely doesn't work with a Leonardo. I didn't bother with trying the Yun.

I tried it with a separate power supply. No luck. It really makes no sense to me.

It does work with a Mega, if that helps.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Driving 2X RA8875 off of one microcontroller, can it be

by tdicola on Mon Nov 17, 2014 12:13 am

Wow that is bizarre. Also interesting that the behavior changes when you switch to different CS and RST pins for the second display. I actually didn't realize the first issue you had was with the first display not turning on. It makes me think perhaps the CS and RST pins for the first display are the problem. Have you tried swapping the first display's CS and RST from 10 and 9 to other digital pins?

tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Mon Nov 17, 2014 4:56 am

Using 12/11 for the first and 3/2 for the second display yields the same result:
Code: Select all | TOGGLE FULL SIZE
RA8875 start
Found RA8875
RA8875 2 start
RA8875 2 Not Found!


Using 12/11 for the first and 10/9 for the second RA8875, I get
Code: Select all | TOGGLE FULL SIZE
RA8875 start
RA8875 Not Found!
Last edited by local_dani_21 on Mon Nov 17, 2014 4:59 am, edited 2 times in total.

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Mon Nov 17, 2014 4:57 am

adafruit_support_rick wrote:Well, the good news is that you're not crazy.

A was starting to doubt that - thanks!

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by local_dani_21 on Mon Nov 17, 2014 5:04 am

adafruit_support_rick wrote:It does work with a Mega, if that helps.

Well, that's at least something and a good plan b, thanks for checking that out!

However I think the problem should be looked at more generally - I think it would be very interesting to use these displays with all boards (and also boards with faster processors like teensy 3.1 or alike), because it takes quite some time to load an 800x480 pixel image. With a faster processor, smoother/faster installations would become possible. I'm wondering what the Yun guys think about that. I'm in Zürich, Switzerland, waiting for America to rise and shine in a few hours :)

local_dani_21
 
Posts: 126
Joined: Sun Apr 19, 2009 3:10 pm
Location: Zürich, Switzerland

Re: Driving 2X RA8875 off of one microcontroller, can it be

by paulstoffregen on Mon Nov 17, 2014 4:53 pm

I just placed an order for a 2nd RA8875 & 5 inch LCD. Adafruit order #631697-1196014723

I plan to look into this problem, of course after I receive the hardware....

paulstoffregen
 
Posts: 434
Joined: Sun Oct 11, 2009 11:23 am
Location: Portland, Oregon, USA

Please be positive and constructive with your questions and comments.