View previous topic :: View next topic |
Author |
Message |
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Mon Feb 03, 2014 2:09 am Post subject: Fast library for SSD1963 LCD |
|
|
Library for SSD1963 LCD with 16-bit interface:
[/URL]
LCD is 3/5V compliant.
Library works in Submode = New, so its very easy to include in project and unused Subs are not compiled to save memory space.
Also to save space you may use reduced Fonts, like Font36x56 in example. It has only digits, placed at position 33...42. To correct this shift simply use Digit_font = 1.
Any Fons may be included via $include. Supports both types of BASCOM Fonts - "Color" and "B&W".
You can display 8-bit (BGC) and 16 bit (BIN) pictures. Also 16 bit pictures can be loaded from SPI-Flash ROM. To prepare bin-file from bmp, gif, jpg, wmf, emf, ico I wrote special program Pic2Bin.
Library is fast. I specially made it to work quickly. In this video test program working at 8MHz. However, display resolution is 800x480 and its better to use 16MHz or 32MHz (Atxmega).
Video - http://youtu.be/U9kgDOa79MY
Based on Mr.Six1 sources. |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
Posted: Wed Feb 05, 2014 5:48 am Post subject: |
|
|
Thank you MrShilov for your hard work and sharing the Bascom code for the SSD1963 color display.
I have not programmed color displays with XMega chips.
1. Do you have an idea of how difficult it would be to modify the code posted here to work on XMega?
2. Would the touch-screen routines be similar to the ones posted for the SSD1289 display?
Any help or advice you have would be greatly appreciated. Based on your (or others) feedback, I will decide to purchase additional XMega chips. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5920 Location: Holland
|
Posted: Wed Feb 05, 2014 8:06 am Post subject: |
|
|
well done ! This is a big display ! And it still works smooth. Love the YT videos
I had no idea there were so many different graphical chips. Keep up the great work. _________________ Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5920 Location: Holland
|
Posted: Wed Feb 05, 2014 8:09 am Post subject: |
|
|
this code need small adjustments for xmega.
For example :
Dim Color_h_ssd1963 As Iram Byte At 22
Dim Color_l_ssd1963 As Iram Byte At 21
These are registers R21 and R22. The xmega can not linear address these registers. But you can use bascom SETREG statement. Or use some asm with STS. _________________ Mark |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Wed Feb 05, 2014 4:15 pm Post subject: |
|
|
enniom wrote: |
1. Do you have an idea of how difficult it would be to modify the code posted here to work on XMega? |
As Mark say, "this code need small adjustments". The simplest way is to change:
Dim Color_h_ssd1963 As Iram Byte At 22
Dim Color_l_ssd1963 As Iram Byte At 21
to:
Dim Color_h_ssd1963
Dim Color_l_ssd1963
enniom wrote: | 2. Would the touch-screen routines be similar to the ones posted for the SSD1289 display? |
SSD1289 and SSD1963 displays use the same touch chips XPT2046. So routines is compatible, but need to correct X and Y coefficients due to screen size. |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
sasha_1973
Joined: 30 Jul 2013 Posts: 58
|
Posted: Fri Feb 07, 2014 2:16 am Post subject: |
|
|
Last edited by sasha_1973 on Tue Nov 04, 2014 10:10 pm; edited 3 times in total |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Fri Feb 07, 2014 12:30 pm Post subject: |
|
|
Sorry i can't read that, i'm not that good in my Russian.
It was meant as compliment, i'm glad that a lot of people using (parts) of my code and share the code that they made also with the Bascom community. _________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
sasha_1973
Joined: 30 Jul 2013 Posts: 58
|
Posted: Fri Feb 07, 2014 3:15 pm Post subject: |
|
|
Last edited by sasha_1973 on Tue Nov 04, 2014 10:09 pm; edited 1 time in total |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
sasha_1973
Joined: 30 Jul 2013 Posts: 58
|
Posted: Fri Feb 07, 2014 5:51 pm Post subject: |
|
|
Last edited by sasha_1973 on Tue Nov 04, 2014 10:08 pm; edited 2 times in total |
|
Back to top |
|
|
GrainyPCB
Joined: 30 Jan 2013 Posts: 12 Location: Cincinnati, OH
|
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
Posted: Fri Feb 21, 2014 3:15 am Post subject: |
|
|
Hello Mark, MrShilov, GrainyPCB, (and others)
Trying to make the SSD1963 (480x272) LCD work with a XMEGA192A3 using the library INC file posted by MrShilov.
After spending quite some time, I cannot see any function on the LCD.
The pin-out for the LCD and my modifications to the library to accommodate the XMEGA are attached.
Any help or suggestions would be greatly appreciated - and also what to do with pins F_CS and REST.
Ennio |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5920 Location: Holland
|
Posted: Fri Feb 21, 2014 10:22 am Post subject: |
|
|
try to use some other port than portA. i have pulled some hairs a week ago when doing an oled driver. the odd thing was that porta worked, and that i could toggle all pins, but that for some reason it did not work as normal. had no time to check on that, but using another port worked out fine.
further i can recommend to use a virtual port for these signals. config vport. for data this is not required but for control signals it is best.
if that does not work, i can have a look at the code. _________________ Mark |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
Posted: Fri Feb 21, 2014 3:11 pm Post subject: |
|
|
Hello Mark,
Somewhere between your advice NOT to use PORTA, re-reading MAK3's AN#192 for Virtual Ports and comparing my code to that of the WIKI 7 Inch SSD1963 Display, I now have the display working.
But, as pointed out by GrainyPCB, my display too shows text to be upside-down/backwards. Maybe these are Chinese right-to-left displays??? ;)
Thanks for your help and motivation.
Ennio |
|
Back to top |
|
|
|