nishal
Advanced Member level 4
- Joined
- May 4, 2007
- Messages
- 108
- Helped
- 10
- Reputation
- 20
- Reaction score
- 5
- Trophy points
- 1,298
- Activity points
- 1,936
nishal said:Hi all,
I am using PIC32 to control TFT lcd (800x480) via Epson display driver S1D13742. Everything works well except all the displayed images are mirrored.
Please point out a solution.
Thanks in advance
- Nishal
nishal said:Hi Dora,
Thanks for the reply. I couldn't find a register setting in the datasheet. Could you just explain if it is written with other term?
Nishal
Hi,
I wrote code and the box displays on the top right corner (swivelview = 0 rotation). As U said i need to alter all the lcd updation functions.
I have contacted LCD manufacturer (Ampire) as a last attempt.
Anyway, thanks dora
Nishal
HI Nisharl,,,
I've a doubt to clarify with you. I'm working with Ampire 10.4" 640X480 TFT driving using Solomon SSD1963. Its working fine but some time it flickers continously and image was jumping rarely. I checked with the hardware as current aspect and also the software, Since the flicker was unoredictable i stunned to proceed.
As you also used AMPIRE panel i need some suggestion from you.
Thanks.
Hi SSureshtronics,
It is hard to figure out without seeing the schematic / code.
As a debug procedure, try the following.
1. Write a separate code to display check patterns on the display. Try to include only display related functions and delete all other functions
2. check to see whether any loose connections with the flex cable/connector. Perform continuity check on both ends of display connector pin by pin
3. Check whether any component is heating up during the flicker
4. Check to see the outputs of regulator IC is constant at the time of flicker.
Hope this helps
-Nishal
Thanks for reply Nishal...
As you said I check with only displaying the screen and my controller will do no more after filling the screen, I hope you know that SSD1963 will refresh continously from the inbuilt buffer to the screen. I tried by halting my controller after the screen displayed. even there is a flicker. I hope u will get some more from this point. When i powered my module it displays perfectly and no flicker at all exactly after a two minutes it get flicker even my MCU was in halt. I doubted with the capacitors on the power section and the current sourcing of my 3.3 and 1.2 volt regulators, But they are healthy enough to supply required current. Even i recycle the power immidiately right after the flicker occur the secong time also flickering. If i left for few minutes without powering then i apllied power means it works well for same two minutes and then flicker starts. My regulators are cool only, but i observed little warm over the SSD1963, so i tried with the heat sink also but no effect. I have two panels in both panels same result only, So i couldn't doubt the panel. I hope your discussion...
Here I've attached my schem.
And my SSD1963 initilisation code was
//#include <C8051F120.H>
#include <intrins.h>
#include "SSD1963\SSD1963.h"
#include "GRAPHICS\Graphics.h"
//__________________________________________________________________________________//
/// Pin allocation details
// P1^0 - P1^7 => D0 - D7 PORT 1 used as a data lines.
//
// Register select(RS) => P2^7 low for commands, high for data.
//
// Write(WR#) => P2^6 low during write process
//
// Read(RD#) => P2^5 low during read process
//
// Chip select(CS#) => P2^4 low to select the chip
//
// Reset(RST) => P2^3 hardware Reset signal, low to reset.
//__________________________________________________________________________________//
data COLORS GLOBAL_COLOR,BG_COLOR;
data POSITION CURRENT,BUTTON_XY;
bit scroll=0;
idata unsigned int scroll_point=10;
// Function to write the commands to the LCD
void COMMAND_WRITE(unsigned char comm)
{
// CONFIG_AS_OUT
SFRPAGE = 0x0f;
ENABLE_COMMAND // SELECT COMMAND REGISTER, MAKE LOW
NS_Delay(1);
DPORT = comm; // MOVE DATA
SELECT_LCD // SELECT THE CHIP, MAKE LOW
NS_Delay(1);
ENABLE_WRITE // ENABLE WRITE, MAKE LOW
NS_Delay(1);
DESELECT_LCD // DESELECT CHIP, MAKE HIGH
NS_Delay(1);
// DISABLE_WRITE // DISABLE WRITE, MAKE HIGH
// NS_Delay(1);
ENABLE_DATA; // SELECT DATA REGISTER, MAKE COM_DATA pin as HIGH
NS_Delay(1);
// CONFIG_AS_IN
}
// FUNCTION TO WRITE THE DATA TO THE LCD
void DATA_WRITE(unsigned char DAT)
{
// CONFIG_AS_OUT
SFRPAGE = 0x0f;
ENABLE_DATA // SELECT DATA REGISTER, MAKE COM_DATA pin as LOW
DPORT = DAT; // MOVE DATA
SELECT_LCD // SELECT THE CHIP, MAKE LOW
NOP
// ENABLE_WRITE // ENABLE WRITE, MAKE LOW
DESELECT_LCD // DESELECT CHIP, MAKE HIGH
// DISABLE_WRITE // DISABLE WRITE, MAKE HIGH
// ENABLE_DATA // SELECT DATA REGISTER, MAKE COM_DATA pin as HIGH
// CONFIG_AS_IN
}
void COMMAND_PARAMETER(unsigned char cmd, unsigned char pamtr)
{
COMMAND_WRITE(cmd);
DATA_WRITE(pamtr);
}
// Function to display color data from RGB format
void DISP_DATA(unsigned long int color_data)
{
COLORS R_G_B;
R_G_B.COLOR = color_data;
DATA_WRITE(R_G_B.RGB.RED); // send RED data
DATA_WRITE(R_G_B.RGB.GREEN); // send GREEN data
DATA_WRITE(R_G_B.RGB.BLUE); // send BLUE data
}
// Function to display the given color to full screen are particular area
void FILL_SCREEN()
{
unsigned int data x;
unsigned int data y;
// COLORS R_G_B;
SET_WINDOW(0,639,0,479);
COMMAND_WRITE(write_memory_start);
// R_G_B.COLOR = color;
for(x=0;x<480;x++)
{
for(y=0;y<640;y++)
{
// DISP_DATA(color);
DATA_WRITE(BG_COLOR.RGB.RED); // send RED data
DATA_WRITE(BG_COLOR.RGB.GREEN); // send GREEN data
DATA_WRITE(BG_COLOR.RGB.BLUE); // send BLUE data
}
}
}
// Function to initialise the LCD controller
void INIT_LCD()
{
SFRPAGE = 0x0f;
RESET = 0;
MS_Delay(5); //Hardware reset
RESET = 1;
MS_Delay(5);
// COMMAND_WRITE(soft_reset); // Software reset
COMMAND_WRITE(soft_reset); // Software reset
MS_Delay(2);
// COMMAND_PARAMETER(set_pll,0x01); // Enable PLL REF, CLOCK = 10 MHz
COMMAND_WRITE(set_pll_mn);
DATA_WRITE(0x2d); // set PLL as 100 MHz (M=30, N=3)
DATA_WRITE(0x03);
DATA_WRITE(0x04);
COMMAND_PARAMETER(set_pll,0x01); // Enable PLL REF, CLOCK = 10 MHz
MS_Delay(10);
COMMAND_PARAMETER(set_pll,0x03); // Set PLL as clock source
// DATA_WRITE(0x03);
MS_Delay(10);
COMMAND_WRITE(soft_reset); // Software reset
MS_Delay(2);
COMMAND_WRITE(set_lshift_freq); // Select left shift frequency
// DATA_WRITE(0x04); // Select pixel clock frequency as 26 MHz.
// DATA_WRITE(0x28);
// DATA_WRITE(0xf6);
// DATA_WRITE(0x03); // Select pixel clock frequency as 24 MHz.
// DATA_WRITE(0xD0);
// DATA_WRITE(0x8d);
DATA_WRITE(0x03); // Select pixel clock frequency as 24 MHz.
DATA_WRITE(0xc5);
DATA_WRITE(0xff);
MS_Delay(2);
COMMAND_WRITE(set_lcd_mode); // Select LCD mode, TFT or TTL
DATA_WRITE(0x00); // Select TFT 18-bit mode
DATA_WRITE(0x00); // Select HSYNC+VSYNC+DEN, TFT mode
DATA_WRITE(0x02); // Horizontal panel size highrer byte
DATA_WRITE(0x7F); // Horizontal panel size lower byte (640-1)
DATA_WRITE(0x01); // Vertical panel size higher byte
DATA_WRITE(0xDF); // Vertical panel size lower byte (480-1)
DATA_WRITE(0x00); // Select even and odd line RGB sequence (RGB)
COMMAND_PARAMETER(set_pixel_data_interface,0x00); // Select pixel data interface as 8-bit
COMMAND_PARAMETER(set_pixel_format,0x60); // Select pixel data format as 18 bpp
//As per the AMPIRE panel
COMMAND_WRITE(set_vert_period); // Select total horizontal period
DATA_WRITE(0x02);
DATA_WRITE(0x0C); // Set total V period as 525
DATA_WRITE(0x00);
DATA_WRITE(0x2C);
DATA_WRITE(0x01); // Set VSYNC Porch as 35
DATA_WRITE(0x00);
DATA_WRITE(0x00);
COMMAND_WRITE(set_hori_period); // Select total vertical period
DATA_WRITE(0x03); // vertical total period high byte -1
DATA_WRITE(0x1f); // vertical total period low byte // Select total H period as 800
DATA_WRITE(0x00); // High byte of non-display period
DATA_WRITE(0x9f); // Low byte of non-display period -1 // Select HSYNC Porch as 160
DATA_WRITE(0x5f); // VSYNC pulse width -1
DATA_WRITE(0x00); // High byte vsync pulse start
DATA_WRITE(0x00); // Low byte vsync pulse start
DATA_WRITE(0x00);
COMMAND_WRITE(set_column_address); // Select the coloumn address
DATA_WRITE(0x00);
DATA_WRITE(0x00);
DATA_WRITE(0x02);
DATA_WRITE(0x7F); // Set coloumn address as 0 to 640-1
COMMAND_WRITE(set_page_address); // Select the page address
DATA_WRITE(0x00);
DATA_WRITE(0x00);
DATA_WRITE(0x01);
DATA_WRITE(0xdf); // Set end page address as 0 to 480-1
FILL_SCREEN();
/* COMMAND_WRITE(set_post_proc); // 0xBC
DATA_WRITE(0x35); // Contrast
DATA_WRITE(0x75); // Brightness
DATA_WRITE(0x40); // Saturation
DATA_WRITE(0x01);
// SET_GAMMA(1)*/
COMMAND_WRITE(set_display_on); // Set display ON
}
// Function to set the display window
void SET_WINDOW(unsigned int start_x, unsigned int end_x, unsigned int start_y, unsigned int end_y)
{
COMMAND_WRITE(set_column_address); // Select the coloumn address
DATA_WRITE((start_x) >> 8);
DATA_WRITE(start_x);
DATA_WRITE((end_x) >> 8);
DATA_WRITE(end_x); // Set coloumn address as 0 to 640-1
COMMAND_WRITE(set_page_address); // Select the page address
DATA_WRITE((start_y) >> 8);
DATA_WRITE(start_y);
DATA_WRITE((end_y) >> 8);
DATA_WRITE(end_y); // Set end page address as 0 to 480-1
}
Hi Ernesto,
Please see your email.
-Nishal
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?