Pages: [1]   Go Down
Author Topic: Can the Arduino Ethernet handle this LCD? Is there a better choice?  (Read 1018 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a project that requires a device to connect to the network, pull a simple text file from a web server, parse and display it on a touchscreen LCD, and send an email via SMTP if a button on the touchscreen is pressed. At the moment, I am thinking of using an Arduino Ethernet w/PoE module (due to location) and this 3.2" Touchscreen TFT LCD shield. This shield uses a SSD1289 LCD controller and ADS7843 touchscreen controller. I do not need the SD storage, but I already realize that there is a conflict on pins (pin10 used by Arduino Ethernet for Ethernet SS and used by the shield for Touchscreen SS). My plan for that would be to cut pin 10 on the shield and solder a jumper wire to another unused pin (8\). As I said, I don't need SD so the SD SS on pin 4 of the Arduino Ethernet shouldn't interfere with the LCD data pins. Below is a table of pins used by the shield as provided by the seller.

Will this combination work? I'm not doing heavy graphics (text with maybe one small image) so I don't think I'd overload the processor/RAM. Are there any larger color LCDs with touchscreen that would work? This is the largest Arduino-ready LCD I could find, but I'm not opposed to making my own if someone could give me some guidance on how they are typically interfaced with an Arduino. I would love to use something like this Newhaven 4.3" touchscreen LCD or Displaytech 3.5" (8bit?) touchscreen LCD but I don't know what would be involved in driving it. Any input is appreciated!


LCD Shield Pins    Pins used for
0-7Data bus
9SD SS
10Touchscreen SS
11MOSI
12MISO
13SPI Clock
A0Another chipselect(?)
A1Data/Command_Select (RS)
A2Write (WR)
A3Reset (RST)
A4Touch IRQ (IRQ)
A5Latch signal (ALE)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anybody have any insight? I just want to make sure there are no known issues with this LCD + an Arduino Ethernet before I push "Buy"...
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To anybody wondering, I managed to get this working as intended (albeit with a bit more forced learning of the SPI protocol and the libraries used :-)).

First off, I had to use some shield stacking headers to get the LCD connected because the POE module sticks up a bit past the built-in headers. Once that was done, I snipped off pins digital 9-10 on the header and then soldered LCD pin 10 (SS) to Arduino pin 9. Then, in the main sketch I had to make the change for the SS pin but I also had to swap the MOSI/MISO assignments to work with the Arduino-supplied SPI library.

//myTouch(TCLK,TCS,DIN,DOUT,IRQ);
// Original: ITDB02_Touch  myTouch(13,10,11,12,A4);
ITDB02_Touch  myTouch(13,9,12,11,A4);//Swapped pin 10 for 9 and 12<->11

Once that was done I changed the "void ITDB02_Touch::read()" function in ITDB02_Touch.cpp to utilize the SPI library. My sketch calls the Touch.init() function to set the SS to HIGH, then the Ethernet library to initialize the SPI interface. Below is the changed function (commented the original code).

Code:
void ITDB02_Touch::read()
{
unsigned long tx=0;
unsigned long ty=0;

digitalWrite(T_CS,LOW);                   
unsigned char buf_data[4];

SPI.transfer(0x90);
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
buf_data[2] = SPI.transfer(0);
buf_data[3] = SPI.transfer(0);
SPI.transfer(0xD0);
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
buf_data[0] = SPI.transfer(0);
buf_data[1] = SPI.transfer(0);
/*for (int i=0; i<prec; i++)
{
touch_WriteData(0x90);       
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
ty+=touch_ReadData();

touch_WriteData(0xD0);     
digitalWrite(T_CLK,HIGH);
digitalWrite(T_CLK,LOW);
tx+=touch_ReadData();
}*/

digitalWrite(T_CS,HIGH);
tx  = (unsigned int)buf_data[0] << 5; // Shift 7 bit High
tx |= (unsigned int)buf_data[1] >> 3; // Shift 5 bit low
ty  = (unsigned int)buf_data[2] << 5;    // Shift 7 bit High
ty |= (unsigned int)buf_data[3] >> 3;    // Shift 5 bit low

TP_X=tx/prec;
TP_Y=ty/prec;
}
Logged

Colorado, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm glad you got it going. Have you tried any graphics yet? How long did it take to receive it after ordering it?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't done actual images (just lines/text are necessary for my project) but I doubt I would have any issues doing so if I wanted/needed it. It works great although I can see a bit of the refresh cycle which can get a bit annoying if staring at it for extended periods of time. I ordered it on 8/13 and it arrived on 8/23, not too shabby :-)
Logged

Colorado, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for posting your work. I might try one too although I don't have an immediate use for one.
Logged

Pages: [1]   Go Up
Jump to: