ILI9341 fill screen problem

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
fazer67
Posts: 2
Joined: 07 May 2013 11:57

ILI9341 fill screen problem

#1 Post by fazer67 » 10 May 2013 11:33

Hello Mikroelektronika Team,

I'm using a MI0283QT-9 with a 24FJ128GB108 micro.
Trying to init and then fill the screen will cause a reset from the micro.
Same problem when i try to use "tft_rectangle" or "tft_text" instructions.
The tft init line alone works.

Here is my code.

Thanks for your help.



program debitmetre2013

' Declarations section
' TFT display connections
dim TFT_DataPort as word at LATD
dim TFT_WR as sbit at LATB5_bit
dim TFT_RD as sbit at LATB4_bit
dim TFT_CS as sbit at LATB8_bit
dim TFT_RS as sbit at LATB9_bit
dim TFT_RST as sbit at LATB11_bit

dim TFT_DataPort_Direction as word at TRISD
dim TFT_WR_Direction as sbit at TRISB5_bit
dim TFT_RD_Direction as sbit at TRISB4_bit
dim TFT_CS_Direction as sbit at TRISB8_bit
dim TFT_RS_Direction as sbit at TRISB9_bit
dim TFT_RST_Direction as sbit at TRISB11_bit
' End of TFT display connections

main:
tft_init_ili9341_16bit(320,240)
tft_fill_screen(cl_black)

end.

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: ILI9341 fill screen problem

#2 Post by marina.petrovic » 14 May 2013 12:28

Hi,

Before TFT_Init_ILI9341() function, use TFT_Set_Default_Mode() function.
This function sets TFT in default working mode.

Best regards,
Marina

fazer67
Posts: 2
Joined: 07 May 2013 11:57

Re: ILI9341 fill screen problem

#3 Post by fazer67 » 14 May 2013 14:47

Works!

THANKS

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”