ethernet shield and 2.8 " tft touch shield problem

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
james95
 
Posts: 2
Joined: Mon Jun 10, 2013 3:33 pm

ethernet shield and 2.8 " tft touch shield problem

Post by james95 »

Hi everybody,

i've got a problem combining arduino uno, ethernet shield and the 2.8" tft touch shield
which i bought recently.

The testprogram for the sd-card-bmps woof, miniwoof and tiger ran correctly
(without ethernet shield).

But i want to use the shield simultaneously with the arduino ethernet shield.
I also want to use the sd-card of the ethernet shield.

I read in the forum that pin D4 is used by both shields, so it must be changed
-for example- to D1.

Therefore i changed the 4 macros of the pin_magic.h in the uno section:

// These are macros for I/O operations...
//scanf - only to test that the compiler looks here...

// Write 8-bit value to LCD data lines
//original
//#define write8inline(d) { \
// PORTD = (PORTD & B00101111) | ((d) & B11010000); \
// PORTB = (PORTB & B11010000) | ((d) & B00101111); \
// WR_STROBE; } // STROBEs are defined later

//changed
#define write8inline(d) { \
PORTD = (PORTD & B00111101) | ((d) & B11000010); \
PORTB = (PORTB & B11000010) | ((d) & B00111101); \
WR_STROBE; } // STROBEs are defined later

// Read 8-bit value from LCD data lines
//original
//#define read8inline() (RD_STROBE, (PIND & B11010000) | (PINB & B00101111))
//changed
#define read8inline() (RD_STROBE, (PIND & B11000010) | (PINB & B00111101))

...

// drawing method. The default state has them initialized for writes.
//original
//#define setWriteDirInline() { DDRD |= B11010000; DDRB |= B00101111; }
//changed
#define setWriteDirInline() { DDRD |= B11000010; DDRB |= B00111101; }

//original
//#define setReadDirInline() { DDRD &= ~B11010000; DDRB &= ~B00101111; }
//changed
#define setReadDirInline() { DDRD &= ~B11000010; DDRB &= ~B00111101; }

#else // Uno w/Breakout board

Unfortunately there's an error message, when starting tft_bmpshield / serial monitor:

ÿUnknown LCD driver chip: 832A
If using the Adafruit 2.8" TFT Arduino shield, the line:
#define USE_ADAFRUIT_SHIELD_PINOUT
should appear in the library header (Adafruit_TFT.h).
If using the breakout board, it should NOT be #defined!
Also if using the breakout, double-check that all wiring
matches the tutorial.

So what can i do? - Thanks for any help!

james95

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: ethernet shield and 2.8 " tft touch shield problem

Post by adafruit_support_mike »

james95 wrote:But i want to use the shield simultaneously with the arduino ethernet shield.
I also want to use the sd-card of the ethernet shield.
Can't be done, at least not without major effort.

The SD library is built around the assumption that you have a single card connected to your Arduino. It isn't capable of talking to two different cards at the same time. The best you could possibly do is shut down the connection to one card, then open a connection to the other one. Alternatively, you could create a modified library and have redundant blocks of SD code for each card.

Making that work will probably involve cutting traces in one of the shields and rewiring the connections. I'm pretty sure there's a pin conflict between the Ethernet's CS pin (pin 4, IIRC) and the pins used by the TFT Shield.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”