Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Drive Different LCD
PostPosted: Thu Jul 05, 2012 4:19 pm 
Offline

Joined: Tue May 22, 2012 10:19 pm
Posts: 29
Hi all.
Is it possible to drive different resolution LCD?

My EvalKit(9G5) came 800x480. If i make an adapter like this DM module with different LCD type, do i need any software based changing?

For example; I want to use 480x272 pixel TFT.


Top
 Profile  
 
 Post subject: Re: Drive Different LCD
PostPosted: Fri Jul 06, 2012 4:09 am 
Offline

Joined: Tue Jun 08, 2004 3:29 am
Posts: 56
Location: Shenzhen, China
If you want to run Android,you need to change the lcd driver to adapt to your hardware.


Top
 Profile  
 
 Post subject: Re: Drive Different LCD
PostPosted: Mon Jul 09, 2012 11:11 am 
Offline

Joined: Tue May 22, 2012 10:19 pm
Posts: 29
finally i found magic file.
"board_sam9x5ek.c"

My LCD is working now!

Thanks


Top
 Profile  
 
 Post subject: Re: Drive Different LCD
PostPosted: Fri Oct 12, 2012 9:58 am 
Offline

Joined: Fri Jun 29, 2012 5:18 pm
Posts: 9
Hello ,okdia,How about my problem? please analyse for me.Print the last info following:
JFFS2 version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 241
alg: No test for stdrng (krng)
io scheduler noop registered (default)
atmel_lcdfb atmel_lcdfb.0: 1500KiB frame buffer at 27600000 (mapped at c7600000)

my system suspends here ! LCD:AT070TN93 CPU:SAM9G35


Top
 Profile  
 
 Post subject: Re: Drive Different LCD
PostPosted: Fri Oct 12, 2012 11:19 am 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 784
woogoy wrote:
please analyse for me.


Insufficient Data

Perhaps it would be instructive if you provide details about your panel, how it differs in parameters to the default one, and how you've addressed that in the configuration.


Top
 Profile  
 
 Post subject: Re: Drive Different LCD
PostPosted: Sat Oct 13, 2012 7:34 am 
Offline

Joined: Fri Sep 14, 2012 11:14 am
Posts: 6
I just touch this.

Code:
/*
 * LCD Controller
 */
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = {
   {
      .name           = "LG",
      .refresh   = 60,
      .xres      = 480,      .yres      = 270,
      .pixclock   = KHZ2PICOS(9000),

      .left_margin   = 2,      .right_margin   = 2,
      .upper_margin   = 2,      .lower_margin   = 2,
      .hsync_len   = 41,      .vsync_len   = 10,

      .sync      = 0,
      .vmode      = FB_VMODE_NONINTERLACED,
   },
};

static struct fb_monspecs at91fb_default_monspecs = {
   .manufacturer   = "LG",
   .monitor        = "LB043WQ1",

   .modedb      = at91_tft_vga_modes,
   .modedb_len   = ARRAY_SIZE(at91_tft_vga_modes),
   .hfmin      = 15000,
   .hfmax      = 17640,
   .vfmin      = 57,
   .vfmax      = 67,
};

/* Default output mode is TFT 24 bit */
#define AT91SAM9X5_DEFAULT_LCDCFG5   (LCDC_LCDCFG5_MODE_OUTPUT_24BPP)

/* Driver datas */
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
   .lcdcon_is_backlight      = true,
   .alpha_enabled         = false,
   .default_bpp         = 16,
   /* Reserve enough memory for 32bpp */
   .smem_len         = 480 * 272 * 4,
   /* In 9x5 default_lcdcon2 is used for LCDCFG5 */
   .default_lcdcon2      = AT91SAM9X5_DEFAULT_LCDCFG5,
   .default_monspecs      = &at91fb_default_monspecs,
   .guard_time         = 9,
   .lcd_wiring_mode      = ATMEL_LCDC_WIRING_RGB,
};


Get the values from LCD datasheet.
Like;
xres, yres, pixclock, margin values, hsynch, vsynch len.
Also we have hf,vf min max values. I leave both on original values. So they all same with datasheet's one.


Top
 Profile  
 
 Post subject: Re: Drive Different LCD
PostPosted: Sun Oct 14, 2012 5:25 am 
Offline

Joined: Fri Jun 29, 2012 5:18 pm
Posts: 9
I'm confused where goes error.
My LCD configuration data:
/*
* LCD Controller
*/
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = {
{
.name = "AT070TN92",
.refresh = 60,
.xres = 800, .yres = 480,
.pixclock = KHZ2PICOS(33300),

.left_margin = 210, .right_margin = 45,
.upper_margin = 22, .lower_margin = 22,
.hsync_len = 1, .vsync_len =1,


.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
.vmode = FB_VMODE_NONINTERLACED,
},
};

static struct fb_monspecs at91fb_default_monspecs = {
.manufacturer = "INNOLUX",
.monitor = "AT070TN92",

.modedb = at91_tft_vga_modes,
.modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
.hfmin = 31534,//hfmin = DCLK_frequency Type / (left_margin + .xres + right_margin + hsync_len)=
.hfmax = 44318,//hfmax =DCLK_frequency max / (left_margin + .xres + right_margin + hsync_len) =
.vfmin = 60,//vfmin = hfmin/ (upper_margin + .yres + lower_margin + vsync_len);
.vfmax = 84,//vfmax = hfmax/ (upper_margin + .yres + lower_margin + vsync_len);

};

/* Default output mode is TFT 24 bit */
#define AT91SAM9X5_DEFAULT_LCDCFG5 (LCDC_LCDCFG5_MODE_OUTPUT_24BPP)

/* Driver datas */
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.alpha_enabled = false,
.default_bpp = 16,
/* In 9x5 default_lcdcon2 is used for LCDCFG5 */
.default_lcdcon2 = AT91SAM9X5_DEFAULT_LCDCFG5,
.default_monspecs = &at91fb_default_monspecs,
.guard_time = 9,
.lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
};
Schematics :
(1)LCD signal:Image
(2) PWM backlight control:
Image
The LCD Timing Charateristics:
(1)Timing data
Image
(2)Timing Sequence
Image


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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: