Displays on Atmel LCDC

From InCircuit
Revision as of 15:40, 14 March 2017 by CGruenig (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Atmel LCDC is the internal control reponsible for driving an externally connected LCD or TFT Display. Using suitable external logic, even VGA, DVI or HDMI output can be supported. The controller aims to support a great scope of displays.

Configuration Paramters

The control of a display isn't controlled only by it's resolution. The frequencies for the pixelclock and the synchronization signals should much, too. Additionally there is a border around each picture, represented by multiple margins, that the Display isn't showing but must be there to display the picture correctly. These margins also are referenced as vertical and horizontal front and back porch in some datasheets. The following picture might help to understand these margins.

Display margins.jpg

The size of each margin is usually defined in the display's datasheet.

Setting the parameters on a ICnova SAM9G45 OEM

Within the kernel's source directory, eg. within Buildroot directories, there is a directory arch/arm/mach-at91. In this directory a board description file for each supported ICnova ADB can be found. These are called eg. board-icnova-adb1000.c. In this file a structure of the type fb_videomode is initialized. Modifying the parameters found here, will change the configuration of the Controller, the next time the kernel is compiled. This struct can look like this:

 static struct fb_videomode at91_tft_vga_modes[] = {
   {
     .name         = "QVGA",
     .refresh	    = 50,
     .xres         = 320,      .yres         = 240,
     .pixclock     = KHZ2PICOS(6500),
 
     .left_margin  = 34,       .right_margin = 20,
     .upper_margin = 9,        .lower_margin = 4,
     .hsync_len    = 34,       .vsync_len    = 9,
 
     .sync         = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
     .vmode        = FB_VMODE_NONINTERLACED,
   },
 };

Please see Build a kernel on information how to rebuilt the kernel.

Personal tools