NHD-1.8-128160EF-SSXN-F
Has anyone interfaced an Arduino or Teensy with the NHD-1.8-128160EF-SSXN-F? I made my own breakout board for the connector so that could introduce problems although I have verified the pins).
I can only get a white screen displayed.
//////////////// // /CS signal tied to ground
#define RST 8 // /RST signal
#define SI 11 // SI signal
#define SCL 13 // SCL signal
//////////////// // D/C Signal connected to GND (3-wire)
#define SPI4W 14 // Output LOW in setup()
unsigned char mode = 3; // 0 = 3-Wire Serial // 1 = 4-Wire Serial
// Remember to change 'SPI4W' bit as needed
0
-
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);
delay(150);
digitalWrite(RST, HIGH);
delay(150);
command(0x11); //exit SLEEP mode
delay(100);
command(0x28); //display off
command(0x26); //select gamma curve
data(0x04);
command(0xB1); //frame rate control
data(0x0A);
data(0x14);
command(0xC0); //power control 1
data(0x0A);
data(0x00);
command(0xC1); //power control 2
data(0x02);
command(0xC5); //VCOM control 1
data(0x2F);
data(0x3E);
command(0xC7); //VCOM control 2
data(0x40);
command(0x2A); //column address set
data(0x00);
data(0x00); //start 0x0000
data(0x00);
data(0x7F); //end 0x007F
command(0x2B); //page address set
data(0x00);
data(0x00); //start 0x0000
data(0x00);
data(0x9F); //end 0x009F
command(0x36); //memory access control
data(0xC0); //C0 = RGB; C8 = BGR
command(0x3A); //pixel format = 18 bit per pixel
data(0x06);
command(0x29); //display ON
delay(10);
}Best regards,
0
Please sign in to leave a comment.
Comments
1 comment