Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

HELP using MEGA2560 and TFT 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
hobby

Bascom Member



Joined: 12 Apr 2004
Posts: 109
Location: Brussels

belgium.gif
PostPosted: Fri Dec 14, 2018 1:47 pm    Post subject: HELP using MEGA2560 and TFT ili9341 Reply with quote

Moderator: delete this post wrong forum, moved: https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14305

Hi All,

I try to using the MikroElektronika TFT Proto MI0283QT9A. (Rev 2.0) with MEGA2560 @ 16Mhz in SPI soft mode. But the screen stay white.
I use the example code for testing for wiki web site, just remove the code with picture example for quick compiling. (in attachement) and add the Print everry start example.

Code:
I have define in code:
Const Lcd_enable_spi = True
Const Lcd_use_soft_spi = True
Const Lcd_ctrl_port = Portk
Const Lcd_reset_pin = 0
Const Lcd_pin_dc = 1
Const Lcd_pin_cs = 2
Const Lcd_pin_sdo = 3
Const Lcd_pin_clk = 4
 


But, with scope, no clock signal on portK.4 and the runing code is slow.
I have test with define PortA, same result.
For tesing the MCU, i have create this code for testing portA:
Code:

$regfile = "m2560def.dat"
$hwstack = 64
$swstack = 64
$framesize = 64
$crystal = 16000000
$baud = 9600

Config Porta = Output

Print "Start"
Do
  Toggle Porta
  Waitms 10
Loop
 

Mesuring with scope works.
I use TBX0104 for level adaptor.

What do I do wrong?

Thanks
Olivier

(BASCOM-AVR version : 2.0.8.0 , Latest : 2.0.8.1 )

_________________
Thanks
Olivier
Back to top
View user's profile
Printpix52

Bascom Member



Joined: 18 Jun 2014
Posts: 282
Location: D.F.

mexico.gif
PostPosted: Fri Dec 14, 2018 8:11 pm    Post subject: Reply with quote

Hi,Already configure the parameters? BASCOM-AVR option (communication = 16000000)
Back to top
View user's profile
hobby

Bascom Member



Joined: 12 Apr 2004
Posts: 109
Location: Brussels

belgium.gif
PostPosted: Fri Dec 14, 2018 11:04 pm    Post subject: Reply with quote

Thanks for reply.

But the 'communication' is for serial ($BAUD) not for SPI.

After check in ili9341.inc file, i see only xmega or m328, the lib is not tested in mega2560.
I cancel to use this lib, too much uncertainty.

Thanks
Olivier
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