LCD OPEN-SMART 3.5 R61581

Hi everyone,

I have "OPEN-SMART 3.5 TFT LCD/W TOUCH SCREEN R61581 display", and Arduino Mega 2560 R3.

So far, i have only white screen on my display, and these are messages from serial monitor:

TFT LCD test
Using OPENSMART 3.2" TFT Arduino Shield Pinout
TFT size is 240x320
Serial took 0ms to start
ID = 0x808
Benchmark Time (microseconds)
Screen fill 5933408
Text 39888
Lines 4606848
Horiz/Vert Lines 168936
Rectangles (outline) 103632
Rectangles (filled) 4716364
Circles (filled) 1411136
Circles (outline) 1942896
Triangles (outline) 1281464
Triangles (filled) 2346556
Rounded rects (outline) 600676
Rounded rects (filled) 5346336
Done!

This is link of library: 3.5inch TFT LCD Breakout - Google Drive
Picture of my display is attached.

Please help!

From the readme.txt in your library

First you should know the breakout board is 3.3V logic level and it can not connect to 5V Arduino board directly.
You have to choice:
1: Do not plug USB cable and supply external 3.3V power for the 5V pin on the Arduino board, so that it works at 3.3V logic level.
2: Use some 3.3V MCU development board, such as OPEN-SMART UNO R3 that has a 5V/3.3V switch to select 5V or 3.3V logic level.

Your library is a hacked version of a very old MCUFRIEND_kbv
I have no connection with either Open-Smart or with Mcufriend. Neither company has ever contacted me.

If you provide the necessary 3.3V level shifters and 3.3V power I am sure that your hacked library would work.

I know that genuine MCUFRIEND_kbv should work with the correct electronics.

David.

Thank you David, for your quick response!

Few months ago I had OpenSmart 3.5 with RM68140 driver. I used same library and first option (Do not plug USB cable and supply external 3.3V power for the 5V pin on the Arduino board, so that it works at 3.3V logic level.) and everything worked fine.

But now, I tried same option and it doesnt work...

Is there anything what I need to change in MCUFRIEND_kbv.cpp or MCUFRIEND_kbv.h files?

Thank you!

Ratko

Seriously. Either buy an Arduino Shield that has level-shifters on the pcb.
Or buy a proper 3.3V Arduino like Zero, Due, ...

It is very risky to remove the display every time you want to plug the USB cable into your Mega2560.

I suppose that you could remove the USB cable completely. Use an external 3.3V power supply, external 3.3V Serial link, external programmer e.g. ATMEL-ICE.

But you will get very annoyed.

TFT shields are very cheap nowadays. Due clones are very cheap. You have lots of options.

David.

Thank you David!

Do you think, if this would be solution of my problem?

it says "The maximum voltage that the I/O pins can provide or tolerate is 3.3V."

Specifications
Microcontroller AT91SAM3X8E
Operating Voltage 3.3V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 54 (of which 12 provide PWM output)
Analog Input Pins 12
Analog Outputs Pins 2 (DAC)
Total DC Output Current on all I/O lines 130 mA
DC Current for 3.3V Pin 800 mA
DC Current for 5V Pin 800 mA
SRAM 96 KB (64 + 32 KB)
Clock Speed 84 MHz

Hello David,

I bought Arduino DUE, as your suggestion for my OPENSMART 3.5 R61518 display. But there is a problem... When I tried to compile my program for Arduino DUE, there is error during compiling:

In file included from C:\Users\RS-Servis\Documents\Arduino\libraries\OPENSMART_TFT\MCUFRIEND_kbv.cpp:40:0:

C:\Users\RS-Servis\Documents\Arduino\libraries\OPENSMART_TFT\mcufriend_shield.h:1:20: fatal error: avr/io.h: No such file or directory

#include <avr/io.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino Due (Programming Port).

Please help!
Ratko

#define USE_OPENSMART_SHIELD_PINOUT_DUE //thanks Michel53

is intended for Open-Smart Shields. I don't think that I have ever recommended that anyone should use an Open-Smart Shield on a Due. The Open-Smart Reset chip interferes with the Due reset.

You have a 3.3V display with no extra electronics.
You do not have an Open-Smart Shield. So you do not use any SPECIAL
You just use the regular Mcufriend wiring e.g. to 2-9, A0-A4

MCUFRIEND_kbv does build and run with regular Mcufriend Shields on a Due.
MCUFRIEND_kbv does build and run with USE_OPENSMART_SHIELD_PINOUT_DUE for a Open-Smart Shield.

David.

My display still not working :frowning: I even can not get his ID in serial monitor...

This is my connection:

// GND GND
// 3V3 3.3V
// CS A3
// RS A2
// WR A1
// RD A0
// RST RESET
// LED GND
// DB0 8
// DB1 9
// DB2 10
// DB3 11
// DB4 4
// DB5 13
// DB6 6
// DB7 7

When I tried to use my old OPENSMART library, I getting error: No such file or directory

#include <avr/io.h>

When I installed new MCUFRIEND library, my compiling was fine, but display does not work

Go on. Regular Mcufriend shields are:

//LCD pins  |D7 |D6 |D5 |D4  |D3  |D2 |D1 |D0 | |RD |WR |RS |CS |RST| |3.3V|GND|LED|
//Due pins  |7  |6  |5  |4   |3   |2  |9  |8  | |A0 |A1 |A2 |A3 |A4 | |3.3V|GND|3.3|

I possess a 3.3V Open-Smart similar to you. But with ILI9225
I made a Protoshield that has a 16x1 socket to receive the Open-Smart and routes to regular Arduino pins 2-9 and A0-A4

David.

Edit. Added power, LED connections.
Run LCD_ID_readreg.ino. It uses no libraries. It verifies your wiring. Copy-Paste from Serial Terminal.

Post a clear photo of your wiring. e.g. with coloured wires that are pulled straight. so we can identify each end of each wire.

with this connection, i getting same situation, but this time id=0x808

i have no idea what is wrong...

Hello again David!

Now i got this message in serial monitor with grapictest:

TFT LCD test
Using OPENSMART 3.2" TFT Arduino Shield Pinout
TFT size is 240x320
Serial took 0ms to start
ID = 0x4040
Benchmark Time (microseconds)
Screen fill 5933424
Text 41916
Lines 4951492
Horiz/Vert Lines 169964
Rectangles (outline) 104988
Rectangles (filled) 4716660
Circles (filled) 1482556
Circles (outline) 2090672
Triangles (outline) 1377512
Triangles (filled) 2380032
Rounded rects (outline) 640900
Rounded rects (filled) 5366232
Done!

There is ID=4040, it that correct information?

This is message from LCD_ID_readreg:

Read Registers on MCUFRIEND UNO shield
controllers either read as single 16-bit
e.g. the ID is at readReg(0)
or as a sequence of 8-bit values
in special locations (first is dummy)

reg(0x0000) 40 40 ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 44 44 44 40 Manufacturer ID
reg(0x0009) 49 49 49 49 49 Status Register
reg(0x000A) 48 48 Get Power Mode
reg(0x000C) 4C 4C Get Pixel Format
reg(0x0061) 61 61 RDID1 HX8347-G
reg(0x0062) 60 60 RDID2 HX8347-G
reg(0x0063) 61 61 RDID3 HX8347-G
reg(0x0064) 64 64 RDID1 HX8347-A
reg(0x0065) 65 65 RDID2 HX8347-A
reg(0x0066) 64 64 RDID3 HX8347-A
reg(0x0067) 65 65 RDID Himax HX8347-A
reg(0x0070) 60 60 Panel Himax HX8347-A
reg(0x00A1) 61 61 61 61 61 RD_DDB SSD1963
reg(0x00B0) 60 60 RGB Interface Signal Control
reg(0x00B4) 64 64 Inversion Control
reg(0x00B6) 64 64 64 64 64 Display Control
reg(0x00B7) 65 65 Entry Mode Set
reg(0x00BF) 6D 6D 6D 6C 6C 6C ILI9481, HX8357-B
reg(0x00C0) 40 40 40 40 40 40 40 40 40 Panel Control
reg(0x00C8) 48 48 48 48 40 40 40 40 40 40 40 40 40 GAMMA
reg(0x00CC) 4C 4C Panel Control
reg(0x00D0) 40 40 40 Power Control
reg(0x00D2) 40 40 40 40 40 NVM Read
reg(0x00D3) 41 41 41 40 ILI9341, ILI9488
reg(0x00D4) 44 44 44 40 Novatek ID
reg(0x00DA) 48 48 RDID1
reg(0x00DB) 49 49 RDID2
reg(0x00DC) 4C 4C RDID3
reg(0x00E0) 60 60 60 60 60 60 60 60 40 40 40 40 40 40 40 40 GAMMA-P
reg(0x00E1) 61 61 61 61 61 60 60 60 60 40 40 40 40 40 40 40 GAMMA-N
reg(0x00EF) 6D 6D 6D 6C 6C 6C ILI9327
reg(0x00F2) 60 60 60 60 60 60 60 60 60 40 40 40 Adjust Control 2
reg(0x00F6) 64 64 64 64 Interface Control