Go Down

Topic: LCD QVGA Arduino shield (Read 21739 times) previous topic - next topic


The LCD is locate in the exact center of the shield,
the visible part with/without button : 52x72mm / 52x66mm



Thanks a lot.

I will keep you updated as to what happens  :)




have anybody tried the display with an ethernet shield? I got the display working with the ethernet shield, but only when I disconnect the touchscreen controller (ads7843). When I connect the touchscreen controller to the SPI ports (Pin 11,12,13), the ethernet shield stops working. I tried already to set CS of the touch contorller (Pin 9) to high. Have anyone a suggestion, how to solve this?



I've read about correct order for initialize ethernet shield on this display,
but don't remember where  :(
I'm continuing looking on documentation....


i've the problem solved.

the miso (pin 11) goes never to a high impendance, because it's driven by buffer chip (ic7) on the tft/touchscreen shield.   >:(

so you never can share the spi ports with other shields.  :(

for testing i've soldered the ethernet shield to the internal pins (miso,mosi,sclk) of the tft shield and than ethernet is working.


:o ...but the SPI port is already shared with SD card reader.
The single device/node will be select via CS pin.
I'm a bit confused, have you a schema/photo of your work ?

With this shield I'm in trouble with precision of the touch screen, now
I'm working to have a consistent read to use with on-screen button.


yes, the spi port is shared between the sd card reader and the touch controller, but the sharing is done before the buffer ic (ic7). because of this, the sharing is working. but when you try to share the miso pin with another shield, the miso pin of the shield (e.g. ethernet) is always connected to the output of the buffer ic (ic7), which is always at high or low state, but never on high impandance.

i disconnected the miso-h from pin 17/ic7 and i disconnected miso from pin3/ic7 and connected miso directly to the Arduino IO Pin 12. Then my ethernet shield is working fine.

here's the schematic


Great ! How did you find out?
In this way you can't use TouchScreen and SDcard, right ?
But why have not take MISO from 10PIN connector ?
The MISO signal is 3.3V, the Arduino signal is 5V !?!?.
You also may disconnect and tie to 3.3V the pin 19/ic7 (E), this isolate
the 2 side of bus without disconnect wire.
The IC7 in not a buffer, but a level translator IC, 5V-3.3V and also have a
DIRection PIN (used only on tft connection on IC3), maybe the problem is
this direction pin, tied fixed HIGH on IC7.
Take a look at SN74LVCH245 datasheet.


yes, you can use the sd card and touch screen, because the miso is shared on the internal bus. but you cann't share the miso with other shields, which are connected to the arduino pin headers. i know the ic7 is also a voltage converter, but the wiznet 5100 chip on the ethernet shield is also 3,3v and works fine without voltage translater. i didn't tried to disable the output of ic7 with pin19, because I searched the easiest way yesterday evening. ;)


SPI bus can share. It's a standard. SPI device must follow.
IC7 is only voltage converter. That mean, it's only connection line.
MISO of SD and touch screen device --> IC7 ---> arduino pin.
TFT board SPI bus have pull up resister with R16-18. The bus should go hi not tri-state or low.

It is important to reset touch screen device ADS7843 (TS.Reset()).
Even if no use device. It make sure that bus was control by device.

I have no other SPI device to test. I'm test reading SD card with out reset ADS7843. MISO sent pulse on miso bus. I'm reset ADS7843 with TS.Reset() function. test it again. MISO set bus to hi. I'm think. It can be interface with other device. please test with other device. and let me know. thank you for you information.


I think the problem is on the CS pin (device select).
In BL-TFT240320PLUS shield, Arduino Dpin10 is CS for SDcard and Dpin9
is CS for Touchscreen.
In the SPI Bus you need to select the device to operate via CS pin because
all the device on SPI Bus share MISO and MOSI signal,
if you do not select only single device, you don't know the sorce/destination of the Data on the SPI Bus.
The Ethernet shield of  "picknicker" need to select the wiznet 5100
device but maybe with pin already used on BL-TFT240320PLUS shield for
select touch-screen or SDcard device.



i'll get several problems, when you try to use the ethernet and the BL-TFT240320PLUS shield together. The first problem is that pin 10 is used by the sd card of the tft shield and also as CS for the ethernet shield. I don't need the sd card reader for my project, so i didn't solder pin 10 on the tft shield. The second problem is miso signal from the tft shield. the ic7 sets the level of miso on the arduino pin headers always to a high or low state and prevents the ethernet shield of sending data sucessfully to the atmel microcontroller. Another problem is the SEN pin of the wiznet chip on the orginial ethernet shield is always set to high. so you better use a ethernet shield with the WIZ811MJ Ethernet Modul. here you can read more about this problem: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248045864/0

i hope you can now understand the problem with the miso pin.  ;)



Yes, now is all clear.

Just for info :

It is important to reset touch screen device ADS7843 (TS.Reset()).
Even if no use device. It make sure that bus was control by device.

Explanation for this behavior is at the end of this thread :

You need to set the physical SS pin to HIGH before setting the Arduino in SPI Master mode, and SS is physically wired to pin 10.  Once you set it in Master Mode, you can use pin 10 for other uses.

Indeed, in the TS.Reset() function, the SPI Bus is configured and
after this function call, you can use Dpin10 (SS) to drive CS for SDcard.


Here a trouble with touch screen.
After some try to capture a stable single point to use with on-screen button,
the result is a good reading on Y axis and an inconsistent read on X axis.
During a prolungate touch you can see an horizontal line instead of a
single (or small group) of single point.
The follow 2 file are a source code for testing touch screen and
a modified version of original touchscreen library.
Please, try it, compare with original library and comment the result.
Any comments will be appreciated.



thanks for your post!
yeah, i also noticed a problem on the X axis.

i've done a quick test with your changed library and your calibration code and it worked well at the beginning but after some time i got again problems on the x axis and a reseting didn't solved it. i did a calibration and then i commented out the "touch_calibrate();". is there possible a problem with saving or reading the calibration data of the eeprom?

Go Up