Questions? Call us: +1 760-918-6722

Problem in interfacing with display (parrallel interface)

Hi to all,
I'm trying to use a DT028ATFT, but with no results.
I'm using the 8080-I interface, that is D0-D7, CS, WR, RD, RS/SCL and RESET pins.

Here is my pseudo code:

void WriteCommandByte(uint32_t command)
{
Db07 -> OUT;
RD -> 1;
CS -> 0;  // Activate display interface
RS/SCL -> 1; // set to command
WR -> 0;  // prepare to write
Db07 -> command; // put command out
WR -> 1;  // Write
CS -> 1;  // End
}

void MYDISPLAY::WriteDataByte(uint32_t b)
{
Db07 -> OUT;
RD -> 1;
CS -> 0;  // Activate display interface
RS/SCL -> 0; // set to data
WR -> 0;  // prepare to write
Db07 -> command; // put command out
WR -> 1;  // Write
CS -> 1;  // End
}

uint8_t MYDISPLAY::ReadDataByte()
{
int b;

Db07 -> IN;
RS/SCL -> 0; // set to data
WR -> 1;
CS -> 0;  // Activate display interface
RD -> 0;  // prepare to read
RD -> 1;  // Read
Delay(1 mSec);
b -> DB07;  // Store data
CS -> 1;  // Disable

return b;
}

 

void Init()
{
GPIOE->BRR |= 1<<DSPRST; // Hardware reset
Delay(200);
GPIOE->BSRR |= 1<<DSPRST; // Hardware reset
Delay(200);
WriteCommandByte(0x01); // Software reset
Delay(200);

WriteCommandByte(0xB0); // RGB interface signal control
WriteDataByte(0x00);

WriteCommandByte(0xF6); // Interface control
WriteDataByte(0x01);
WriteDataByte(0x00);
WriteDataByte(0x01);

WriteCommandByte(0x3A); // Pixel format set
WriteDataByte(0x66);

WriteCommandByte(0x36); // Memory access control
WriteDataByte(0x00);

WriteCommandByte(0x11); // Sleep out
Delay(200);

WriteCommandByte(0x29); // Display on

return;
}

 

void SetPixel(uint16_t x, uint16_t y, uint16_t col)
{
uint8_t i, j;

/* Just for test */
WriteCommandByte(0x2C); // Memory Write
for(i=0;i<100; i++)
{
  for(j=0; j<3; j++) WriteDataByte(i);
}
WriteCommandByte(0x00); // No operation

return;
}

 

The hope is to see some effect onto the display, but nothing happened.
Is my code right?
Are there some timing constraints?

Thank you
Freya

Replies

engineering_seacomp's picture
engineering_seacomp
November 3, 2017

Hi,

The DT028ATFT uses an ILI9341.  Detailed timing is avaialbe in http://cdn.displaytech-us.com/sites/default/files/driver-ic-data-sheet/Ilitek-ILI9341.pdf

Please send an email to sales@displaytech-us.com referencing this forum URL, and they will send you the ILI9341 drivers.

Thanks,

rrubiocastil's picture
rrubiocastil
September 12, 2019

Hello, Freya17365, did it work?