Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

TFT LCD Projects/Ideas/Applications Open Discussion.

Status
Not open for further replies.
BTW: have you got the LED back lite working,? I cannot
Mine has an external LED connection... I have a 100 ohm to 5v..
upload_2017-11-21_14-32-10.png
 
Just ported to a pic18f26k80... I was in the midst of converting the C++ from Arduino to C for XC..

WhenI was on the Amazon page , right in the corner of my eye, I saw this:-
**broken link removed**
On opening said RAR I found C drivers for LCD driver, Touch driver and SD driver... For several platforms..

Lots of Chinese remarks, but I spent very little time making it run with the pc!!! These guys have written all manner of items in a graphical library..
 
I think they all have external LED connections?, I usually use a 39 ohm resistor (for either 5V or 3.3V), I don't think you really need one though as they have resistors on board - but I'm much happier fitting one.
hi.
Non of the three 9225 TFT's, all with a pin marked LED, will not give a back lite output.
Tried 100R pull up, pull down even a direct connection, no effect.

E

Ian,
Downloaded from your link, looks interesting

UPDATE:
Traced the copper track for the LED pin, it ends in an open track SMD resistor pad.
 
Last edited:
hi,
Ian Rogers , Nigel Goodwin
Ref my TFT back light problem.
This image is a shot of the back of my 9225 TFT.
Note the PCB track from the LED pin, next to to unused SMD pad is a badly hand soldered 4R7 resistor.
I would appreciate if you could compare the back of your TFT PCB's for any obvious differences.
E
 

Attachments

  • 9225pcb1.gif
    9225pcb1.gif
    900.8 KB · Views: 247
OK, I've checked all my MANY different TFT's :D

Some you can't see a resistor feeding the LED, or even the track - but there could be a resistor on the other side of the board of course.

Of those with visible resistors, they are 2.2, 3.9 and 4.7 ohms on the different boards.

My 9225 boards Eric are different to yours, I can't see an LED resistor on them, and there's a voltage regulator above the level shifting chip, where yours has the two resistors (or at least space for two).

The one labelled R6 in Ian's picture is 3.9 ohms on my (identical) boards.
 
I'm going to direct this question to you Nigel Goodwin !! As you have played with the ili9341.

There is a DE pin... Apparently used in RGB mode... Have you tried this in 4 pin serial mode? In RGB mode you can keep this low whilst loading data, then make it high to enable the display ram -> screen.. I was hoping to make screen updates look seamless.... Other than that I will try and jack a 16MHz xtal up to 64Mhz and see if the SPI can handle the speed..

The Arduino seems to be a tad faster at the mo.. The pic is clocked at 32Mhz ( SPI of 8Mhz) and the Arduino is clocked at 16Mhz ( SPI also at 8MHz ).... The Arduino seems to have the edge...

Controlling the screen refresh will help a lot!!
 
hi,
Nigel Goodwin Ian Rogers
Completed the TFT 9225 programs using Oshonsoft Basic, if anyone is interested I will tidy up and post.

Using the smallest Font for the display have written a routine that 'magnifies' the small font table by 2,3 or 4 times, the displayed character results are acceptable.

E
9225image1.jpg


EDIT:
Modified the '3' , '6' and '7' font symbols, more rounded.
 

Attachments

  • FontSub1.txt
    1.4 KB · Views: 234
Last edited:
hi,
Using a 18F4520 and a 20MHz crystal with the internal 4fosc * PLL, the 9225 is now running at a 20MHz clock rate.
The TFT updates are very fast, the only down side at the moment is getting the UART baud rate set correctly using Oshonsoft Basic.
To check that it is not a one off, I will try the project using a number of 18F4520's at this setting.
Also modified some of the translated Arduino code, which IMO was very inefficient.

E
 
I'm working on a video buffer... Simple scaling... 4bit RGB with intensity.. Just like the old EGA monitors..

Using a 16 word lookup I can split the byte into two and look up one of 16 colours then send... This way you could have two lookups and swap between them ... Simple animation trick... 2k will give a 64 x 64 sprite...
 
Here is a 7 Inch touch screen display from 4D Systems that I am using on a precision X,Y,Z cutting machine. The Display communicates with a PIC18F4550 micro controller on board the main machine with a simple 6 BYTE protocol ..... BYTE1 and BYTE2 are SYNC bytes .... BYTE3 is an Address .... BYTE4 is the data (to write to the address) .... BYTE5 is a Simple CRC, and BYTE6 is a random Seed.

CRC = BYTE1 ^ BYTE2 ^ BYTE3 ^ BYTE4 ^ BYTE5 ^ BYTE6
CRC = (CRC<<1) && $FF ; <-- This line optional but adds some robustness to the CRC
20171204_152358.jpg
20171204_152522.jpg
 
hi,
Ref the UART problems with Oshonsoft.
18F4520 , 20MHz xtal, PLL *4, so Fosc =80Mhz.
Oshonsoft is unable to set the SPBRG values close enough to get correct UART timing, tried using ASM but still unable to set Baud rate to 9600.

So in the Basic program I Defined the Clock as 60MHz and also in the Oshonsoft clock options box to 60MHz.

The UART now works fine at 9600 Baud, the SPI is still showing a 20MHz clock rate.!

Go figure, observations welcome.;)
E
 
hi,
Using my mobile phone camera I am unable to get a satisfactory video of the 18F4520 with TFT 9225 running a Oshonsoft Basic program.
Getting interference patterns on the video display, due the TFT and camera pixels.
Will try to find a an alternative camera,

For any Oshonsoft users, the Demo program attached, when using a18F4520 with a 20MHz Xtal and the 4*PLL enabled, the TFT runs at a fast rate.
The font table is called as an Include file in the Basic program, so load it into the same folder as the *.bas.

Eric.

The program has these Objects as Procedures, commented at the end of the Code.
'all variables are global dims
'the program uses hardware SPI functions.
call clear(color As Word)' full screen clr
all WORD's
call hori_line(x1 start, x1 end, @y0, color)
call vert_line(@x0, y0 start, y1 end, color)
call diag_line(x0 , y0 ,x1 y1, color)
call rectangle(x0 , y0 ,x1 y1, color)
call fill_rect(x0 , y0, x1, y1, color)
call draw_circle(x0 , y0 ,x1 y1, color)
call fill_circle(x0 , y0, x1, y1, color)
call msg2lcd(x0 As Word, y0 As Word, msg1 As String, color As Word, bg As Word) ' with Font size option.
call msg2bfr(x0 As Word, y0 As Word, msg1 As String)
call bfr2lcd(x1 As Word, y1 As Word, color As Word, bg As Word)

'the lcd addressing has been normalised so that Xorg, Yorg is at
'the bottom left corner of the lcd, in Landscape mode, x0,y0
'pin connects On right side.
'the long edge is the x axis [0 to 219] and the narrow is the y axis [0 to 175]

'for writing text, lower left pixel is the lower left of the character, the following
'character bits are written upwards.

'for drawing objects, the bottom left corner is x0,y0 is the object start and
'x1,y1 is the objects finish coords.
 

Attachments

  • TFT9225Demo2.bas
    22.5 KB · Views: 186
  • font9225a.bas
    4.4 KB · Views: 194
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top