1 comment

  • Ted M.
    NHD Staff

    Hi rstory,

    For 3-wire SPI mode, check that the display pins 8 and 11 are both tied low.

    Also, please review the display initialization code below and confirm these commands are executed in order to make the display active and ready to accept writing data to display.

    void setup()
     DDRB = 0xFF; //Enable All outputs on PortB
     PORTB = 0x00;
     DDRD = 0xFF; //Enable All outputs on PortD
     PORTD = 0x00;
     DDRD |= (1<<DDD6); //SDIO = 1
     DDRD |= (1<<DDD7); //SCL = 1
     digitalWrite(RST, LOW);
     digitalWrite(RST, HIGH);
     command(0x11); //exit SLEEP mode
     command(0x28); //display off
     command(0x26); //select gamma curve
     command(0xB1); //frame rate control
     command(0xC0); //power control 1
     command(0xC1); //power control 2
     command(0xC5); //VCOM control 1
     command(0xC7); //VCOM control 2
     command(0x2A); //column address set

     data(0x00); //start 0x0000
     data(0x7F); //end 0x007F
     command(0x2B); //page address set
     data(0x00); //start 0x0000
     data(0x9F); //end 0x009F
     command(0x36); //memory access control
     data(0xC0); //C0 = RGB; C8 = BGR
     command(0x3A); //pixel format = 18 bit per pixel
     command(0x29); //display ON

    Best regards,


Please sign in to leave a comment.