RetroBSD

2.11BSD operating system for microcontrollers
It is currently Sun Jul 05, 2020 2:38 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: ST7781 display driver
PostPosted: Sun Oct 11, 2015 8:41 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi friends,

Another LCD display driver is available, this time for a cheap 2.4" TFT Arduino shield:

Image

All the gpanel demos work the same on this display, although with reduced resolution 320x240. The performance is about 3 times slower than Picadillo-35T:
Code:
# cd /share/examples/gpanel
# make speed
cc  -o lucidasans15.o -c fonts/lucidasans15.c
cc  -o speed  speed.c lucidasans15.o -lgpanel
# ./speed
Screen size 240 x 320.
Graphics speed:
 39682 pixels/second
 509 lines/second
 52 rectangles/second
 291 circles/second
 1540 characters/second

The sources are here: https://github.com/RetroBSD/retrobsd/bl ... 2/st7781.c

I use this shield with chipKIT WF32 board. Here is an example of the kernel configuration for ST7781 driver:
Code:
# ST7781 TFT display driver
device          swtft
signal          "LCD_RST"   pin RB10
signal          "LCD_CS"    pin RB0
signal          "LCD_RD"    pin RB2
signal          "LCD_RS"    pin RB8
signal          "LCD_WR"    pin RB4
signal          "LCD_D0"    pin RA14
signal          "LCD_D1"    pin RD3
signal          "LCD_D2"    pin RE8
signal          "LCD_D3"    pin RD0
signal          "LCD_D4"    pin RF1
signal          "LCD_D5"    pin RD1
signal          "LCD_D6"    pin RD2
signal          "LCD_D7"    pin RE9

It should be possible to use it on Duinomite and Maximite as well, just modify the signal to pin mapping.

I got this board from Ebay a few months ago for $5. It took some effort for me to find out which controller this board is based upon, and it turned out to be Sitronics ST7781. It's rumored that new revisions of this board have another controller, like ILI9325. In this case it would not work with this driver.


Top
 Profile  
 
PostPosted: Sun Oct 11, 2015 8:53 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
There is ILI9340 version and another few as well (I've found spfd5408 ILI9341 ILI9320 and 7781 versions on ebay).

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sun Oct 11, 2015 11:09 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Serge and all,

Would there be any speed advantage if the bits of the 8 bit data to the LCD were on a single port?

i.e.- D0 -> port bit 0, D1 <-> port bit 1 and so forth.

I am suspecting that this would be lots faster if the bits were/could be assigned this way.

With 8 bit micros this makes a world of speed difference.

Wiz


Top
 Profile  
 
PostPosted: Mon Oct 12, 2015 5:26 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
With PMP 8bit you may go >10MBytes/sec (ie. used in my ramdisk driver).
The Serge's version there is much more flexible - you may use any pins available - and it cost time..

Also SPI TFT desplays are popular and easier to connect (7735, ILI9341, and dozen of others).
Not as fast as parallel 8/16bit ones. But good for retrobsd.. :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Wed Oct 14, 2015 2:47 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Wiz,
wiz wrote:
Would there be any speed advantage if the bits of the 8 bit data to the LCD were on a single port?
Yes, it would help a lot. But better to put the chip on a PMP bus, like Picadillo. In this case the driver can use simple and fast R/W transactions with /CS, /WR and /RD signals generated by hardware.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


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 post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission