ili9481 proble

General discussion on mikroBasic PRO for PIC32.
Post Reply
Author
Message
relinquished
Posts: 222
Joined: 09 Apr 2011 11:08
Location: ITALY / NAPOLI

ili9481 proble

#1 Post by relinquished » 07 Jun 2015 23:14

hello to you in the forum, I'm trying to use a display bought on ebay, which mounts as a drive controller chip ili9481, I'm trying to use the minimum amount of code to change the display color, but instead the display shows no signs of life, ie remains white, then I want to know if the code is well written or there some mistakes in the use of library defs.

Code: Select all

' Declarations section

dim tft_DataPort as char  at LATb
    tft_RST as sbit  at LATf8_bit
    tft_BLED as sbit at LATf12_bit
    tft_RS as sbit  at LATf4_bit
    tft_CS as sbit  at LATf2_bit
    tft_RD as sbit  at LATf3_bit
    tft_WR as sbit  at LATf5_bit
    tft_DataPort_Direction as char  at TRISb
    tft_RST_Direction as sbit  at TRISf8_bit
    tft_BLED_Direction as sbit at TRISf12_bit
    tft_RS_Direction as sbit  at TRISf4_bit
    tft_CS_Direction as sbit  at TRISf2_bit
    tft_RD_Direction as sbit  at TRISf3_bit
    tft_WR_Direction as sbit  at TRISf5_bit
' End TFT module connections


  sub procedure TFTclear(dim value as word)
    dim i, j as word
    tft_CS = 0
    TFT_Set_Address_ILI9481(0,0)
    for i = 0 to  479
      for j = 0 to 319
        TFT_Write_Command_Ptr(value)
      next j
    next i
    tft_CS = 1
  end sub

main:


  TFT_Init_ILI9481_Custom(480,320)
  TFTclear(0xffff)
  while true
    TFTclear(0xf800)
    delay_ms(2000)
    TFTclear(0x07e0)
    delay_ms(2000)
    TFTclear(0x001f)
    delay_ms(2000)
  wend

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: ili9481 proble

#2 Post by filip » 08 Jun 2015 08:53

Hi,

Please, I suggest that you read the TFT's datasheet given by the manufacturer, I'm sure everything was written there.

Regards,
Filip.

relinquished
Posts: 222
Joined: 09 Apr 2011 11:08
Location: ITALY / NAPOLI

Re: ili9481 proble

#3 Post by relinquished » 08 Jun 2015 17:59

hi, I wanted to ask but a few examples for the controller ili9481 there ??
since being a controller supported by your libraries there should be a way to use this display with a 16-bit interface

Post Reply

Return to “mikroBasic PRO for PIC32 General”