Simulating TFT LCD (ILI9341) With Proteus V8.3

avrmicrochipproteustft

I am using Mikrobasic for AVR, and Proteus V8.3 ,So i have wired my circuits as you see in this picture:
enter image description here

I modified it in Proteus with one IC Atmega128 as you see in this picture:

enter image description here

and i used this code in Mikrobasic for AVR :

    program MyProject
 '*******************************************************************************
'----- Color LCD CONFIG --------------------------------------------------------
'*******************************************************************************
 ' TFT display connections
dim TFT_16bit_DataPort_Lo as byte at PORTD
dim TFT_16bit_DataPort_Hi as byte at PORTE
dim TFT_16bit_WR as sbit at PORTA1_bit
dim TFT_16bit_RD as sbit at PORTA2_bit
dim TFT_16bit_CS as sbit at PORTA3_bit
dim TFT_16bit_RS as sbit at PORTA0_bit
dim TFT_16bit_RST as sbit at PORTA4_bit

dim TFT_16bit_DataPort_Lo_Direction as byte at DDRD
dim TFT_16bit_DataPort_Hi_Direction as byte at DDRE
dim TFT_16bit_WR_Direction as sbit at DDA1_bit
dim TFT_16bit_RD_Direction as sbit at DDA2_bit
dim TFT_16bit_CS_Direction as sbit at DDA3_bit
dim TFT_16bit_RS_Direction as sbit at DDA0_bit
dim TFT_16bit_RST_Direction as sbit at DDA4_bit
' End of TFT display connections
 ' TFT display connections
 dim
  TFT_16bit_Disp_Rotation as byte
' End of TFT display connections


' Declarations section 

main:
     TFT_Init_ILI9341_16bit(  240, 320)
      TFT_16bit_Dot(50, 50, CL_WHITE_16bit)
      TFT_16bit_Fill_Screen(CL_AQUA_16bit)
end.

So if the connections is correct it must show an blue page in Proteus simulator,but it don't work.!!!

so you could find the Hex file and Proteus file here:

http://www.mikroe.com/forum/download/file.php?mode=view&id=12099&sid=ed3ccf136cea56f86f33688e91ce2a88

So i think that i have wrong in Proteus connections for TFT LCD ILI9341.!!!
But what is the correct connections?!!!

Thanks a lot.

Best Answer

In proteus 8.3 the ILI9341 tft works only in SPI mode.

It is in official 8.3 update info... check it out.

Steps to make proteus LCD shield simulation working in proteus 8.3 with Arduino UNO and Adafruit ILI3941:

  • Proteus :: File / Import Project clip Arduino 328
  • Proteus :: File / Import Project Clip Arduino ILI 9341 TFT LCD Shiled
  • Download Adafruit 9341 Library https://github.com/adafruit/Adafruit_ILI9341
  • Extract downloaded folder into arduino/libraries
  • Arduino :: Open / Restart Arduino and open Adafruit GraphicTest example
  • Arduino :: Change the following code, we will map in code arduino pins with what LCD shield needs, note that TFT_RST, can be any pin that is not conflicting, as in proteus LCD shield reset is not mapped

    // Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
    //Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
    // If using the breakout, change pins as desired
    //Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
    Adafruit_ILI9341 tft = Adafruit_ILI9341(5, 6, 11, 13, 19, 12);
    
  • Arduino :: Sketch / Export Compiled Library

  • Proteus :: right click on your Arduino 328 / Edit Properties, in Program Files, browse and select your Compiled TestGrapich library [it will be in sketch folder]
  • Run simulation and wait a bit, white screen should appear, than all the rest enter image description here