View previous topic :: View next topic |
Author |
Message |
krolikbest
Joined: 02 Jan 2017 Posts: 112
|
|
Back to top |
|
|
krolikbest
Joined: 02 Jan 2017 Posts: 112
|
Posted: Sun Jun 10, 2018 11:11 am Post subject: |
|
|
Ok, found it. |
|
Back to top |
|
|
krolikbest
Joined: 02 Jan 2017 Posts: 112
|
Posted: Sun Jun 10, 2018 12:25 pm Post subject: |
|
|
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 |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sun Jun 10, 2018 7:21 pm Post subject: |
|
|
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
with
Code: | ILI9341_set_port XX |
For details see example of using Arduino Uno with HX8352B display in attachment. |
|
Back to top |
|
|
krolikbest
Joined: 02 Jan 2017 Posts: 112
|
Posted: Sun Jun 10, 2018 8:31 pm Post subject: |
|
|
Thank you, exactly it goes about it! |
|
Back to top |
|
|
|