View previous topic :: View next topic |
Author |
Message |
sstewart
Joined: 16 Aug 2004 Posts: 57
|
Posted: Fri Apr 11, 2014 8:54 pm Post subject: Fast library for ILI9325 LCD |
|
|
I've attached a more complete 56 pixel font, going from 0 to capital Z. You have to set " Digit_font = 0 " or it displays a character 15 places back.
In the original Font36x56 it seems to use the Digit_font variable to enable a smaller font table for 0 to 9 by setting 0 in the ! location ( ascii 33 ), 1 in the " location ( ascii 34 ), etc... |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Fri May 16, 2014 6:30 pm Post subject: |
|
|
Hi mister,
I would like to use your program with an Arduino mega 2560 and
http://www.gotronic.fr/art-shield-ecran-tft-tactile-itead-20390.htm
my questions,
it is compatible with your program ? I understand, perhaps, I have to change the pin configuration.
must I use the 8bit or the 16bits version ?
many thanks to you answers
Jean-Pierre |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Fri Feb 20, 2015 10:14 am Post subject: |
|
|
Library updated.
Touch example is specially based on Arduino 2560. Sorry for the delay. You may use both 8 or 16 bit versions on it - depend on display model. |
|
Back to top |
|
|
boeseturbo
Joined: 23 Jul 2007 Posts: 46
|
|
Back to top |
|
|
Arek2014
Joined: 30 Dec 2014 Posts: 22 Location: Kielce
|
Posted: Wed Nov 18, 2015 11:31 pm Post subject: |
|
|
Hi.
i have lcd with 16bit interface.
http://allegro.pl/tft-lcd-2-8-ili9325-ekran-dotykowy-i-o-3-3v-5v-i5386083275.html
problem
Lcd_clear Black it not work properly, lcd put black color for while and set white !!!
Lcd_clear works with other colors !!!
when i use:
Lcd_clear Black
Lcd_set_pixel 10 , 10 , White
then lcd will go black with one pixel white
or
Lcd_clear Black
Lcd_text "Pixels" , 90 , 10 , White , Blue ' it works
Lcd_clear Black
Lcd_text "Pixels" , 90 , 10 , White , Black 'black will not do !!
BTW: i must had change this in library for my lcd.
Res_disp = 0 : Waitms 5 : Res_disp = 1 : Waitms 5 'Hardware Reset
when was: Res_disp = 0 : Waitms 5 : Res_disp = 1 'Hardware Reset
don't work
btw nokia n73 have better black color, better contrast - but soldering connector is horror
ili9325 on pcb is super
Pozdrawiam Arek |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Thu Nov 19, 2015 1:30 am Post subject: |
|
|
If you using long wires or display has slow controller the speed may be too fast. Try to slower it:
Code: | Macro Send_data
Rs_disp = 1 : Nop : Nop : Wr_disp = 0 : Nop : Nop : Wr_disp = 1
End Macro
Macro Send_com
Rs_disp = 0 : Nop : Nop: Wr_disp = 0 : Nop : Nop : Wr_disp = 1
End Macro
Macro Send
Nop : Nop : Wr_disp = 0 : Nop : Nop : Wr_disp = 1
End Macro |
|
|
Back to top |
|
|
Arek2014
Joined: 30 Dec 2014 Posts: 22 Location: Kielce
|
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Fri Nov 20, 2015 6:36 am Post subject: |
|
|
Arek2014 wrote: | Lcd_clear Black
Lcd_text "Pixels" , 90 , 10 , White , Black 'black will not do !! |
Can you photo this error? |
|
Back to top |
|
|
Arek2014
Joined: 30 Dec 2014 Posts: 22 Location: Kielce
|
Posted: Fri Nov 20, 2015 6:47 pm Post subject: |
|
|
my board lcd is v1.2 2.8 TFT240x320
problem is with black color and others colors near &H0000, i think, some test...
https://youtu.be/KnptuE9TsOw
code for this video is:
Macro Send_data
Rs_disp = 1 : Nop : Nop : Wr_disp = 0 : Nop : Nop : Wr_disp = 1
End Macro
Macro Send_com
Rs_disp = 0 :WAITuS 10 : Wr_disp = 0 :waitus 10 : Wr_disp = 1
End Macro
Macro Send
waitus 10 : Wr_disp = 0 : waitus 10 : Wr_disp = 1
End Macro
Lcd_clear White
Restore Color8x8 '****** Color Font Text
Lcd_text_color "Color Font text 'Color8x8'" , 55 , 65 , Black , White
Restore Color16x16
Lcd_text_color "Font 'Color16x16' " , 25 , 100 , Darkgreen , White
Wait 2
Lcd_clear White
Restore Font12x16
Lcd_text "Clear Screen" , 11 , 80 , Black , White '****** Clear Screen
Lcd_text " B&W" , 11 , 120 , Black , White
Wait 2
Lcd_clear Black
Lcd_text " " , 90 , 10 , blue , red
Wait 1
Lcd_clear White
Wait 1
Lcd_clear Black
Wait 1
Lcd_clear White
Restore Font12x16
Lcd_text "Clear Screen" , 11 , 80 , Brown , white
Lcd_text "with color" , 35 , 120 , Blue , white
Wait 2
Lcd_clear Red : Waitms 500
Lcd_clear Green : Waitms 500
Lcd_clear Blue : Waitms 500 |
|
Back to top |
|
|
Arek2014
Joined: 30 Dec 2014 Posts: 22 Location: Kielce
|
Posted: Sun Nov 22, 2015 3:21 pm Post subject: |
|
|
i try run touchpad XPT2046, no succes....
when tap finger lcd feel it, but x,y are 0,0 |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sun Nov 22, 2015 4:08 pm Post subject: |
|
|
I test your source. All works fine. Check hardware. Especially this:
Code: | Dout_touch Alias Portd.3 : Config Dout_touch = Output 'XPT2046 Din Pin
Din_touch Alias Pind.4 : Config Din_touch = Input 'XPT2046 Dout Pin |
Dout_touch must be connected to Din LCD pin.
Din_touch must be connected to Dout LCD pin. |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Sun Nov 22, 2015 4:10 pm Post subject: Touch on ili9325 |
|
|
Have used the ILI9325 display in several projects, one of them is the Word Clock. It is published in this forum. Perhaps you can have a look at the touchscreen part of that program to get your touchscreen running.
Interrupt driven.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
Arek2014
Joined: 30 Dec 2014 Posts: 22 Location: Kielce
|
Posted: Sun Nov 22, 2015 10:14 pm Post subject: |
|
|
problem solved: pin dout was connected to lcd dout , same with din to lcd din
my mistake...
BTW: in future with library great will be circuit amtega vs lcd connections...
touchpad works fine with setup:
Const Portrait = 0 '0=Landscape, 1=Portrait
Const Rotate180 = 1 '0=Normal, 1=Rotate 180°
$nocompile
'===============================================================================
Sub Read_touch()
Touchx = 0 : Touchy = 0 : Clk_touch = 0 : Cs_touch = 0
Shiftout Dout_touch , Clk_touch , X_dout , 1 , 8 , 1 'X request
Waitms 3
Shiftin Din_touch , Clk_touch , Touchy , 1 , 12 , 1 'X answer
Shiftout Dout_touch , Clk_touch , Y_dout , 1 , 8 , 1 'Y Request
Waitms 3
Shiftin Din_touch , Clk_touch , Touchx , 1 , 12 , 1 'Y answer
Cs_touch = 1
If Touchy > 3500 Then Touchy = Touchy - 3500 Else Touchy = 0
Touchy = Touchy / 110
If Touchy > 239 Then Touchy = 239
If Touchx > 3500 Then Touchx = Touchx - 3500 Else Touchx = 0
Touchx = Touchx / 83
If Touchx > 319 Then Touchx = 319
Touchx = 319 - touchx
Touch_flag = 0
End Sub
LCD still don't do lcd_clear black - i don't know what to do... |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
|
Back to top |
|
|
sstewart
Joined: 16 Aug 2004 Posts: 57
|
Posted: Mon Apr 04, 2016 5:15 pm Post subject: |
|
|
When using 56 pixel height fonts, Blocksize and Colums need to be changed from bytes to words. Also added an extra 5ms wait after Res_disp pin high
Local Row As Byte , Block As Byte , Byteseach As Byte , Blocksize As Word
Local Colums As Word , Columcount As Byte , Rowcount As Byte , Stringsize As Byte
Res_disp = 0 : Waitms 5 : Res_disp = 1 : Waitms 5 'Hardware Reset |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|