It is currently 13 Nov 2018 18:58

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: problem using ssd1963
PostPosted: 13 Oct 2018 08:47 
Offline

Joined: 13 Oct 2018 08:35
Posts: 1
Hi
I'm trying to start a 7 inch Lcd usind stm32f103 and ssd1963. the problem is lcd shows sth like picture I've attached, I don't know what's the problem, Is there anyone who can help?
and here is my code


void SSD1963_Init (void)
{
SSD1963_DATAPORTX->BRR= 0xFF; // reset extra bits

SSD1963_CTRLPORT->BRR = SSD1963_PIN_RST;
HAL_Delay(100);
SSD1963_CTRLPORT->BSRR = SSD1963_PIN_RST;
HAL_Delay(100);

SSD1963_CTRLPORT->BRR = SSD1963_PIN_RST;
HAL_Delay(100);
SSD1963_CTRLPORT->BSRR = SSD1963_PIN_RST;
HAL_Delay(100);
SSD1963_WriteCommand(SSD1963_SOFT_RESET);
HAL_Delay(10);

SSD1963_WriteCommand(SSD1963_SOFT_RESET);
HAL_Delay(10);

SSD1963_WriteCommand(SSD1963_SOFT_RESET);
HAL_Delay(10);

SSD1963_WriteCommand(SSD1963_SOFT_RESET);
HAL_Delay(10);

SSD1963_WriteCommand(SSD1963_SET_PLL_MN);
SSD1963_WriteData(39); // PLLclk = REFclk * 40 (400MHz)
SSD1963_WriteData(1); // SYSclk = PLLclk / 2 (200MHz)
SSD1963_WriteData(0x54); // effectuate values

SSD1963_WriteCommand(SSD1963_SET_PLL);
SSD1963_WriteData(0x01);
HAL_Delay(10);

SSD1963_WriteCommand(SSD1963_SET_PLL);
SSD1963_WriteData(0x03);

SSD1963_WriteCommand(SSD1963_SOFT_RESET);
HAL_Delay(10);

SSD1963_WriteCommand(SSD1963_SET_LCD_MODE); // B0
SSD1963_WriteData(0x20); // 0x20 for 24bit
SSD1963_WriteData(0x00);
SSD1963_WriteData(mHIGH((TFT_WIDTH-1)));
SSD1963_WriteData(mLOW((TFT_WIDTH-1)));
SSD1963_WriteData(mHIGH((TFT_HEIGHT-1)));
SSD1963_WriteData(mLOW((TFT_HEIGHT-1)));
SSD1963_WriteData(0x00);

SSD1963_WriteCommand(SSD1963_SET_PIXEL_DATA_INTERFACE);
SSD1963_WriteData(SSD1963_PDI_16BIT565);

SSD1963_WriteCommand(SSD1963_SET_LSHIFT_FREQ);
SSD1963_WriteData((LCD_FPR >> 16) & 0xFF);
SSD1963_WriteData((LCD_FPR >> 8) & 0xFF);
SSD1963_WriteData(LCD_FPR & 0xFF);

SSD1963_WriteCommand(SSD1963_SET_HORI_PERIOD); // B4
SSD1963_WriteData(mHIGH(TFT_HSYNC_PERIOD -1));
SSD1963_WriteData(mLOW(TFT_HSYNC_PERIOD -1));
SSD1963_WriteData(mHIGH((TFT_HSYNC_PULSE + TFT_HSYNC_BACK_PORCH)));
SSD1963_WriteData(mLOW((TFT_HSYNC_PULSE + TFT_HSYNC_BACK_PORCH)));
SSD1963_WriteData(TFT_HSYNC_PULSE -1);
SSD1963_WriteData(mHIGH(TFT_LPS));
SSD1963_WriteData(mLOW(TFT_LPS));
SSD1963_WriteData(0x00);

SSD1963_WriteCommand(SSD1963_SET_VERT_PERIOD); // B6
SSD1963_WriteData(mHIGH(TFT_VSYNC_PERIOD -1));
SSD1963_WriteData(mLOW(TFT_VSYNC_PERIOD -1));
SSD1963_WriteData(mHIGH((TFT_VSYNC_PULSE + TFT_VSYNC_BACK_PORCH)));
SSD1963_WriteData(mLOW((TFT_VSYNC_PULSE + TFT_VSYNC_BACK_PORCH)));
SSD1963_WriteData(TFT_VSYNC_PULSE -1);
SSD1963_WriteData(mHIGH(TFT_FRPS));
SSD1963_WriteData(mLOW(TFT_FRPS));


SSD1963_WriteCommand(SSD1963_ENTER_NORMAL_MODE);

SSD1963_WriteCommand(SSD1963_SET_DISPLAY_ON); //SET display on
HAL_Delay(100);
}
void SSD_Init() {
GPIOC->ODR |= 1<<5; // 8080 Mode

SSD1963_Init();
SSD1963_WriteCommand(SSD1963_SET_GPIO_CONF);
SSD1963_WriteData(0x0f); // control by host, output
SSD1963_WriteData(0x01); // control by host, output

SSD1963_WriteCommand(SSD1963_SET_GPIO_VALUE);
SSD1963_WriteData(0x0e);

SSD1963_WriteCommand(SSD1963_SET_ADDRESS_MODE);
SSD1963_WriteData(0x80); // horizontal

SSD1963_WriteCommand(SSD1963_SET_GAMMA_CURVE);
SSD1963_WriteData(0x08);

LCD_Backlight(255); // we don't need high backlight, don't want to unstabilize power
}


Attachments:
photo_2018-10-13_11-13-10.jpg
photo_2018-10-13_11-13-10.jpg [ 136.3 KiB | Viewed 59 times ]
Top
 Profile  
 
PostPosted: 16 Oct 2018 08:20 
Offline
mikroElektronika team
User avatar

Joined: 25 Jan 2008 09:56
Posts: 10067
Hi,

Have you tried the SSD1963 init routine from the compiler ?
We supplied the source as code well.

Regards,
Filip.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: