Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

graphic lcd with ili9341

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions
View previous topic :: View next topic  
Author Message
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Sat Jun 09, 2018 8:25 pm    Post subject: graphic lcd with ili9341 Reply with quote

Hello

recently i have bought LCD TFT 2.8 with interface GPIO 8 bit, resolution:320x240, sc card, driver ILI9341 V0.7
https://www.google.pl/search?q=ILI9341+V0.7+arduino&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjgzMXUpcfbAhXHtRQKHQieDS4Q_AUICygC&biw=1316&bih=743#imgrc=LkngZVt5BMqQnM:. It is connected directly to the arduino UNO

and because I have almost not experience with lcd my question would be:
- is there something for such display (ili9341 8-bit) in Bascom?
- which or how use ili9341 8-bit, maybe someone could share an example or give some link?

Thanks

Martin

(BASCOM-AVR version : 2.0.7.6 , Latest : 2.0.8.1 )
Back to top
View user's profile
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Sun Jun 10, 2018 11:11 am    Post subject: Reply with quote

Ok, found it.
Back to top
View user's profile
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Sun Jun 10, 2018 12:25 pm    Post subject: Reply with quote

I get driver from this thread:
https://www.mcselec.com/index.php//index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14087&highlight=ili9341
and now I try to adapt it to the Arduino UNO. So I have few questions:

1.

in ili9341_declarations8.inc there is:

Quote:

Config Portd = Output
Data_disp_low Alias Portd \'DB0 --> DB7


but this lcd shield use also portb (0,1) and portd (2,3,4,5,6,7) so my declaration is:

config PORTD.2 =output
config PORTD.3 =output
config PORTD.4 =output
config PORTD.5 =output
config PORTD.6 =output
config PORTD.7 =output
config PORTB.0 =output \' not portd
config PORTB.1 =output \' not portd

and question is how to declare Data_disp_low alias (portd and portb) ?

2. i got during compilation such error:

Quote:
Error : 242 Line : 728 Source variable does not match the target variable [ 0|RGB8TO16(PIXEL)] , in File : TFTDriver\\ILI9341_functions8.inc
but checked this line and it sems Ok, so why this error?

Thanks

Martin
Back to top
View user's profile
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Sun Jun 10, 2018 7:21 pm    Post subject: Reply with quote

In "ILI9341_declaration8.inc" config pins as follow:
Code:
' Data ports
Data0 Alias Portd.2 : Config Data0 = Output                
Data1 Alias Portd.3 : Config Data1 = Output                
Data2 Alias Portd.4 : Config Data2 = Output                
Data3 Alias Portd.5 : Config Data3 = Output                
Data4 Alias Portd.6 : Config Data4 = Output                
Data5 Alias Portd.7 : Config Data5 = Output                
Data6 Alias Portb.0 : Config Data6 = Output              
Data7 Alias Portb.1 : Config Data7 = Output


In "ILI9341_functions8.inc" make subroutine:
Code:
'-------------------------------------------------------------------------------
' ILI9341_set_port       Set 8 Bit Data Port
'-------------------------------------------------------------------------------
Sub ILI9341_set_port(byval Data8 As Byte)
   Data0 = Data8.0
   Data1 = Data8.1
   Data2 = Data8.2
   Data3 = Data8.3
   Data4 = Data8.4
   Data5 = Data8.5
   Data6 = Data8.6
   Data7 = Data8.7
End Sub


And replace each string
Code:
Data_disp_low = XX

with
Code:
ILI9341_set_port XX


For details see example of using Arduino Uno with HX8352B display in attachment.
Back to top
View user's profile
krolikbest

Bascom Member



Joined: 02 Jan 2017
Posts: 112

poland.gif
PostPosted: Sun Jun 10, 2018 8:31 pm    Post subject: Reply with quote

Thank you, exactly it goes about it!
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Unsupported versions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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