Adafruit 3.5" TFT HX8357D

Status
Not open for further replies.

vee two

New member
G'day,

I have the Adafruit 3.5" touchscreen TFT with HX8357D chip and want to get it working with the Teensy 3.1 in SPI mode.

The Adafruit libraries (https://github.com/adafruit/Adafruit_HX8357_Library/) will not compile under TeensyDuino 1.20.

"In file included from sep_35_TFT_graphicstest_2.ino:18:0:
C:\Program Files (x86)\Arduino\libraries\Adafruit_HX8357/Adafruit_HX8357.h:163:14: error: 'RwReg' does not name a type"


Can anyone help me on how to adapt the library to work with the Teensy 3.1.

Thanks
 
Thanks Paul for such a quick response. Unfortunately the new library didn't work - it just yielded a blank screen.

However in trying everything to get something to work I tried the "Adafruit_ILI9341" library, and, having changed the TFT dimensions in the .h file, it works !

Scanning through the HX8357 and ILI9341 .cpp and .h files I see a number of differences in how the TEENSYDUINO is handled, however it is a little beyond my experience to know which of these make the difference.
 
Thanks Paul for such a quick response. Unfortunately the new library didn't work - it just yielded a blank screen.

However in trying everything to get something to work I tried the "Adafruit_ILI9341" library, and, having changed the TFT dimensions in the .h file, it works !

Scanning through the HX8357 and ILI9341 .cpp and .h files I see a number of differences in how the TEENSYDUINO is handled, however it is a little beyond my experience to know which of these make the difference.

So Vee two did you end up getting this working with the Teensy 3.1 in SPI mode correctly?
 
G'day solardude,

I ended up using the "Adafruit_ILI9341" library and just changed the TFT dimensions in the .h file. This works fine.

I cannot say if it is the fastest or most efficient way to address this display, but it does work. My project is a bedside clock so refresh speed etc is not important as the screen is only updated every 10 sec or so. The clock has been running for a few months now and is much nicer than the old monochrome Graphic LCD display!
 
G'day solardude,

I ended up using the "Adafruit_ILI9341" library and just changed the TFT dimensions in the .h file. This works fine.

I cannot say if it is the fastest or most efficient way to address this display, but it does work. My project is a bedside clock so refresh speed etc is not important as the screen is only updated every 10 sec or so. The clock has been running for a few months now and is much nicer than the old monochrome Graphic LCD display!

Awesome.

Thanks for the reply. I have the same LCD screen and may want to use it with the Teensy 3.1 so it's good to know there is a working library for it.

I'm working with a different LCD on the Teensy 3.1 now, but the color LCD was my first choice but it consumes way more power than the Sharp Memory LCD screen I'm working with now which is important for my battery based application.
 
Hi, folks!

I'm now struggling how to connect Adafruit 3.5" HX8357D to Teensy 3.1, so far without success. I used pin scheme as described here https://www.pjrc.com/store/display_ili9341.html and used optimized ILI9341 library. It seems that display responds but I don't see any picture on screen.

Could anybody please share how did you manage to make it work?

Cheers,
Albert
 
I don't see how the ILI9341 library could possibly work. This display has a different controller and more pixels.

Your best bet is to go back to using the code on message #2. Maybe post a photo of the wiring, so we can see exactly how you connected it.
 
Dear Paul,

I tried using code from message #2. The display also doesn't work. Furthermore, it's strange, but according to "\examples\graphicstest" Teensy should send messages via Serial, but it doesn't.

I tried using ILI9341 library because vee two posted a message that he managed to do it.

Double checked the wiring, there are no problems with wires. Currently, I'm using the following pin layout:
D/C - pin #9
CS - pin #10
MOSI - pin #11
MISO - pin #12
CLK - pin #13

I'm using Arduino 1.6.3 and Teensyduino 1.24.

Cheers,
Albert
 
Last edited:
I tried using code from message #2. The display also doesn't work.

Let's focus on figuring out why it isn't working!

I tried using ILI9341 library because vee two posted a message that he managed to do it.

I don't see how it could possibly work with this display! The controller and the screen res aren't the same.


Double checked the wiring, there are no problems with wires. Currently, I'm using the following pin layout:
D/C - pin #9
CS - pin #10
MOSI - pin #11
MISO - pin #12
CLK - pin #13

Please don't take this the wrong way.... but I'd like to ask you to post a photo of your wiring. I know you've double checked it... but believe me, it's pretty common to have a simple wiring error that you'll see as correct every time. Posting photos will let us look it over and maybe see something you might have missed.
 
Please don't take this the wrong way.... but I'd like to ask you to post a photo of your wiring. I know you've double checked it... but believe me, it's pretty common to have a simple wiring error that you'll see as correct every time. Posting photos will let us look it over and maybe see something you might have missed.

The wiring on display is temporary, but I sucessfully controlled it from Arduino.
No idea how photos will help you, vee two already posted that code doesn't work.

20150802_210357.jpg20150802_210727.jpg
 
Last edited:
I believe the code in message #2 should work, and the cause of failure is very likely a wiring error.

Posting these sorts of photos and description, which attempt to prove you've done things correctly rather than show what you've actually done, well, just isn't helping me to try to help you. Obviously the photos in message #11 aren't genuinely how you tested, because the USB cable isn't plugged in. How could Teensy possibly have a common ground with the display, as shown in that photo. Maybe there's more connections made to the display, since your photos don't show everything. Can you see how not showing everything, and taking staged photos that aren't how you actually had everything connected when actually running the code just aren't useful?

I want to help you. I also want to permanently resolve any compatibility issue with this Adafruit library. But I just don't see how that can happen... unless I buy this Adafruit display and wire it up here, and post real photos to show you how to connect it. I very well may do that, as I've done it for plenty of other Adafruit products. But so far, this is the first and only request on this particular display, so I'm not sure if it really merits that time and money.
 
Could anybody help with connecting resistive touchscreen pins X- X+ Y- Y+ to Teensy 3.1? I tried to use Touchscreen library but it seems it won't work with Teensy(
 
Greetings everyone,

I have been trying to get the teensy 3.1 to work with the Adafruit 3.5" tft lcd touchscreen for the last few days. I have gone through all of the various examples trying to get it to work.

I have it wired as follows:
8 : rst
9 : d/c
10: cs
11: mosi
12: miso
13: clk
gnd: gnd
3.3V: vin
I attached the following picture to confirm
20150905_144125.jpg

I have had pretty much the same experience as most of the people in this thread.

When I tried the ILI9341_t3 library, it compiled and the serial monitor printed everything in the test, but the lcd sceen only showed blank white. According to PaulStoffregen, that is what should happen because the 3.5" adafruit screen uses the HX8357_Library.

Next I downloaded the HX8357_Library that is linked to in the second post. https://github.com/PaulStoffregen/Ad...HX8357_Library. It compiled, but this time when it runs, nothing is printed in the serial monitor, and again the lcd screen is blank white.

Is there any other tests I can try, or info I can give to try and get it working?

Also, I have used the screen in 8-bit mode with a mega 2650, and it worked. My next step is to connect it to the mega 2650 through SPI to make sure the SPI works.

UPDATE:

I tried the SPI interface with the mega 2650, so I know that the screen's hardware is working.
Next I am going to try the SPI interface on the teensy with a sensor or something besides the display to make sure that SPI is working on the teensy.
 
Last edited:
Greetings everyone,

I have been trying to get the teensy 3.1 to work with the Adafruit 3.5" tft lcd touchscreen for the last few days. I have gone through all of the various examples trying to get it to work.

I have it wired as follows:
8 : rst
9 : d/c
10: cs
11: mosi
12: miso
13: clk
gnd: gnd
3.3V: vin
I attached the following picture to confirm
View attachment 5043

I have had pretty much the same experience as most of the people in this thread.

When I tried the ILI9341_t3 library, it compiled and the serial monitor printed everything in the test, but the lcd sceen only showed blank white. According to PaulStoffregen, that is what should happen because the 3.5" adafruit screen uses the HX8357_Library.

Next I downloaded the HX8357_Library that is linked to in the second post. https://github.com/PaulStoffregen/Ad...HX8357_Library. It compiled, but this time when it runs, nothing is printed in the serial monitor, and again the lcd screen is blank white.

Is there any other tests I can try, or info I can give to try and get it working?

Also, I have used the screen in 8-bit mode with a mega 2650, and it worked. My next step is to connect it to the mega 2650 through SPI to make sure the SPI works.

UPDATE:

I tried the SPI interface with the mega 2650, so I know that the screen's hardware is working.
Next I am going to try the SPI interface on the teensy with a sensor or something besides the display to make sure that SPI is working on the teensy.

Going from your picture your powering the screen from the Teensy 3.3Vout correct? Well if so DONT. You could kill your Teensy. The backlights are power hungry, you could be browning out the screen because of the power draw from the backlight.

Use the Vin connection, the Vin connects to the USB 5v and does not draw power from the Teensy itself. The screen supports 3-5V in.
 
Thanks so much, Donziboy2. I moved the vin pin on the screen to the vin on the teensy 3.1 and loaded up the ILI9341_t3 graphics test sketch and it worked instantly. I did notice my teensy was getting stupid hot after only 5-10 seconds of powering the screen through the 3.3v, which I guess makes sense from what you said.

On a side note, I did change the res in the ILI9341_t3.h from whatever it was to
#define ILI9341_TFTWIDTH 320
#define ILI9341_TFTHEIGHT 480
 
Hi,
I too have a Adafruit 480x320 HX8357D chip screen and a Teensy 3.2.
I have it running in SPI mode using the Adafruit_ILI9341 library.
I would like to see if I could get the 8bit mode running.
Any sugestions?

It works fine in SPI mode for the "graphicstest" but I can not get the "spitftbitmap" to work properly.
I got heaps of errors with Arduino ver 1.6.6 so I used ver 1.6.5 and I got it to display to screen.
But it was a repeating pattern and not the picture.

So is the spi running too fast to read the SD card?
Do I need a faster sd card? It is a fast card but not the fastest.

Could somebody help please?

Cheers
Rod
 
Last edited:
Adafruit's library doesn't even support 8 bit mode.

Maybe try UTFT?

Thanks Paul.
I think SPI is fast enough for what I want at the moment.
Unfortunately UTFT doesn't support the HX8357D chip.

Do you know of any reason why the bitmap code doesn't display right?
Could it be the speed of the SPI?

Cheers
Rodney
 
Status
Not open for further replies.
Back
Top