TFT-LCD Display + Camera

Slides:



Advertisements
Similar presentations
Bus Specification Embedded Systems Design and Implementation Witawas Srisa-an.
Advertisements

IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
NS Training Hardware.
INPUT-OUTPUT ORGANIZATION
Autonomous Tracking Unit John Berglund Randy Cuaycong Wesley Day Andrew Fikes Kamran Shah Professor: Dr. Rabi Mahapatra CPSC Spring 1999 Autonomous.
1 COMP541 Video Monitors Montek Singh Oct 1, 2014.
Sumitha Ajith Saicharan Bandarupalli Mahesh Borgaonkar.
EXTERNAL COMMUNICATIONS DESIGNING AN EXTERNAL 3 BYTE INTERFACE Mark Neil - Microprocessor Course 1 External Memory & I/O.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
LCD products Basics Greg guan AMP Display. HOW to make it work? SUPPOSE: CUSTOMER HAS MOTHER BOARD DETERMINE WHAT INTERFACES ARE AVAILABLE TO USE WITH.
Microprocessor and Microcontroller
Digital Camera Design. Agenda Digital video formats Image sensor technology Sensor interface with CoolRunner-II LCD CoolRunner-II system design.
Display Technology  Images stolen from various locations on the web...
OUTLINE WHAT ? HOW ? WHY ? BLUEPOST Poster and Message Content Specified by the User Displaying the Poster Content on a Monitor Sending Messages to.
VGA Port Discussion D9.1. Raster Scan Displays Electron beam CRT.
9/20/6Lecture 3 - Instruction Set - Al Hardware interface (part 2)
©2008. Renesas Technology America., All rights reserved. Renesas Direct Drive for Connecting to TFT-LCD Panels David Hedley – Staff Applications Engineer.
INPUT-OUTPUT ORGANIZATION
Video Monitor Uses raster scanning to display images
Critical Design Review 27 February 2007 Black Box Car System (BBCS) ctrl + z: Benjamin Baker, Lisa Furnish, Chris Klepac, Benjamin Mauser, Zachary Miers.
NTSC to VGA Converter Marco Moreno Adrian De La Rosa
Digital Camera Chad Hantak COMP December 12, 2003.
Lecture 111 Lecture 11: Lab 3 Overview, the ADV7183B Video Decoder and the I 2 C Bus ECE 412: Microcomputer Laboratory.
Lab 2: Capturing and Displaying Digital Image
Mathieu Goffe EUDET JRA1 meeting, DESY Wednesday 30 January 2008 IPHC, 23 rue du Loess BP 28, 67037, Strasbourg Cedex 02, France.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
SAP1 (Simple-As-Possible) Computer
Digilent System Board Capabilities Serial Port (RS-232) Parallel Port 1 Pushbutton Hint: Good for a reset button Connected to a clock input. See Digilent.
COE4OI5 Engineering Design Chapter 2: UP2/UP3 board.
Project Goals 1.Get to know Quartus SoPC builder environment 2.Stream 2.Stream Video 3.Build 3.Build foundation for part B - Tracking system.
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
Video Monitor Uses raster scanning to display images –Beam of electrons illuminates phosphorus dots on the screen called pixels. Starting at the top of.
1 SERIAL PORT INTERFACE FOR MICROCONTROLLER EMBEDDED INTO INTEGRATED POWER METER Mr. Borisav Jovanović, Prof.dr Predrag Petković, Prof.dr. Milunka Damnjanović,
Survey of Existing Memory Devices Renee Gayle M. Chua.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Introduction to Experiment 5 VGA Signal Generator ECE 448 Spring 2009.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL VGA Display Part 1 VGA Synchronization ECE 448 Lecture 9.
Introduction to VGA 數位電路實驗 TA: 吳柏辰 Author: Trumen.
COMP541 Video Monitors Montek Singh Oct 2, 2015.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
PROJECT - ZYNQ Yakir Peretz Idan Homri Semester - winter 2014 Duration - one semester.
Alexei SemenovGeneric Digitizer Generic Digitizer 10MHZ 16 bit 6U VME Board.
ECE 448: Lab 4 VGA Display. Bouncing Ball.. Organization and Grading.
Project Final Semester A Presentation Implementing a compressor in software and decompression in hardware Presents by - Schreiber Beeri Yavich Alon Guided.
7 - 1 Texas Instruments Incorporated Module 7 : Serial Peripheral Interface C28x 32-Bit-Digital Signal Controller TMS320F2812.
ECE VHDL Microprocessor Design Final Student Project August 14 th, 2012 Emily Kan Erik Lee Edward Jones.
A 3-D Rendering System Final Project Ben Hebert & Mayur Desai Spring 2005.
Part A Final Dor Obstbaum Kami Elbaz Advisor: Moshe Porian August 2012 FPGA S ETTING U SING F LASH.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Contemporary DRAM memories and optimization of their usage Nebojša Milenković and Vladimir Stanković, Faculty of Electronic Engineering, Niš.
Software for tests: AMB and LAMB configuration - Available tools FTK Workshop – Pisa 13/03/2013 Daniel Magalotti University of Modena and Reggio Emilia.
RAM RAM - random access memory RAM (pronounced ramm) random access memory, a type of computer memory that can be accessed randomly;
PCI 9052 소개 권 동혁. Contents 1.Introduction 2.Major features 3.PCI 9052RDK-LITE.
WINLAB Open Cognitive Radio Platform Architecture v1.0 WINLAB – Rutgers University Date : July 27th 2009 Authors : Prasanthi Maddala,
1 COMP541 Video Monitors Montek Singh Mar 11, 2016.
8251 USART.
Implementation of Pong over VGA on the Nexys 4 FPGA
COMP541 Video Monitors Montek Singh Oct 7, 2016.
Lab 4 HW/SW Compression and Decompression of Captured Image
COMP541 Video Monitors Montek Singh Sep 15, 2017.
COMP541 Video Monitors Montek Singh Feb 20, 2015.
Board Bringup: LCD and Display Interfaces
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Real-time Image Processing System
VGA INTERFACE Ly Le Department of Electrical Engineering
Graphics Hardware: Specialty Memories, Simple Framebuffers
Introduction to VGA Digital Circuit Lab TA: Po-Chen Wu.
COMP541 Video Monitors Montek Singh Feb 6, 2019.
VGA Port CSE 678.
Presentation transcript:

TFT-LCD Display + Camera Design of a TFT Controller & Camera Controller For FPGA Avalon Master/Slave device rene.beuchat@epfl.ch rene.beuchat@hesge.ch

2 masters units have to be designed: Goals The goal is to understand how to design a master unit for a System on FPGA 2 masters units have to be designed: a LCD controller a camera controller A system with a NIOSII on FPGA has to be build A software to control the display and the camera acquisition RB 2006/A2014

Camera & LCD With DE1-SOC With DE0-nano RB 2006/A2014

Video Controllers in FPGA, General architecture Display LCD Camera Ctrl NIOSII SRAM LCD Ctrl Camera Module Avalon Bus Memory SDRAM SDRAM Ctrl … JTAG Slave Master M/S FPGA RB 2006/A2014

LCD specifications In this example, the LT24 module from terasic is used (www.terasic.com), characteristics: 240 (H) x 320 (V) RGB 5-6-5 bits/color Touch Panel, resistive technology Small LCD extension on 40 pins connector Simple access to the module as a programmable interface Main controller ILI9341 (Ilitek) RB 2006/A2014

Interface signals: LT24 for DE0-nano & DE1-SOC LCD_ON Reset_n CS_n RS (reg. Sel. C/nD) Wr_n Rd_n D[15..0] RB 2006/A2014

2x20 pins connection DE0-nano LT24 RB 2006/A2014

DE0-nano / Camera Module pinning i2c i2c RB 2006/A2014

Camera basic Timing (TRDB-D5M) RB 2006/A2014

The interface used is the old fashion 8080-system 16 bits wide. LT24 Timing Access The interface used is the old fashion 8080-system 16 bits wide. The transfers are asynchronous (no clock related) between the FPGA and the module The data are sent line by line by burst of 240 pixels continuously RB 2006/A2014

LCD data transfers format, 16 bits data mode For each line of LCD: 5 bits Blue, 6 bits Green, 5 bits Red, IM[3:0]: “0001” Register 3Ah: “xxxxx101”, MDT[1..0]: “00” RB 2006/A2014

D/Cx: D/Cn Data / Command_n WRx: WR_n Write Access LT24: Bus interface CSx : CS_n Chip Select D/Cx: D/Cn Data / Command_n WRx: WR_n Write Access RDx: RD_n Read Access RB 2006/A2014

RB 2006/A2014

Interface with TFT-LCD This kind of LCD is controlled by a parallel data flow: RGB digital intensity It's synchronized at Frame level with Vertical Synchronization : VSync It's synchronized at Line level with Horizontal Synchronization : HSync It's synchronized by a Clock at pixel level: DotClk RB 2006/A2014

TX07 TFT_LCD RB 2006/A2014

Interface with TFT-LCD Some Voltage need to be generated for the LCD: VGH/VGL @+/- 15V for internals +13V/-5V Vcc @ 3V VDH @ 5V VCOM @ ~2.2V A DotClk @ 5 ~12 MHz RB 2006/A2014

TX07 Synchronization RB 2006/A2014

TX07 Synchronization RB 2006/A2014

And a VGA interface with a DAC Extension for FPGA4U An extension board for FPGA4U allows connection of 2 different LCD from Hitachi: TX06 http://www.hitachi-displays-eu.com/doc/TX06D57VM0AAA.pdf TX07 http://www.hitachi-displays-eu.com/doc/TX07D09VM1CAB.pdf And a VGA interface with a DAC http://focus.ti.com/lit/ds/symlink/ths8133b.pdf RB 2006/A2014

ExtLCD for FPGA4U RB 2006/A2014

To control the LCD, a Controller is necessary LCD Controller in FPGA To control the LCD, a Controller is necessary For FPGA4U and in a system based on a NIOSII processor on Avalon Bus a specific interface is to be designed. It needs to be an: Avalon slave to program it Avalon Master to take display information in memory RB 2006/A2014

LCD Controller in FPGA, General architecture Display LCD Memory SDRAM LCD Ctrl NIOSII SDRAM Ctrl Avalon Bus Addresses Control Data Slave … JTAG Epcs ctrl Master Memory EP16 M/S FPGA RB 2006/A2014

Avalon Slave, registers To configure the LCD controller, a number of registers needs to be defined and implemented. They need to be programmed by the processor at startup. They have default values. A command register start the controller and control the power converter and LCD enable. RB 2006/A2014

Avalon Slave, registers FBufAdd, Address of the frame buffer to display FBLgt, Length of the frame buffer (in pixels number, 240 x 320 by default) DisplayCom, Command (Enable display, IRQ at end of Frame, Power Control) DisplayStat, Status (Run, EOF (End Of frame)) HBP (Horizontal Back Porch) (default: 12) HFP (Horizontal Front Porch): (default: 18) VBP (Vertical Back Porch): (default: 8) VFP (Vertical Front Porch) : (default: 20) HData (Horizontal Data) : (default: 240) VData (Vertical Data) : (default: 320) … RB 2006/A2014

Avalon Slave, registers mapping Add. (Offset) Name Reset Val. Function Size 0x0 FBAdd Address of the frame buffer to display 32 0x1 FBLgt 240 x 320 Length of the frame buffer in pixels 0x2 DisplayCom Command (Start, Stop, IRQ, Power ) 8 0x3 DisplayStat Status (Run, EOF (End Of frame)) 0x4 HBP 12 Horizontal Back Porch (Nb DotClk) 16 0x5 HFP 18 Horizontal Front Porch (Nb DotClk) 0x6 VBP Vertical Back Porch (Nb Lines) 0x7 VFP 20 Vertical Front Porch (Nb Lines) 0x8 HData 240 Horizontal Data (Nb DotClk) 0x9 VData 320 Vertical Data (Nb Lines) 0xA HSync 2 Horizontal Sync Length (Nb DotClk) 0xB VSync 7 Vertical Sync Length (Nb Lines) 0xC RB 2006/A2014

The DisplayCom register controls them StepUp_ON : Power control 3 signals allows control of Power on the LCD module. They have to be controlled by the module as 3 Ports bits. The DisplayCom register controls them StepUp_ON : Allows internal +5V generation, necessary for VGA and LCD on 45 pins connector LED_ON  : Allows LED back light ON LCD_ON  : Needed for LCD TX07 to work RB 2006/A2014

LCD Controller architecture FIFO LCD Master Controller Power Ctrl Registers Avalon Bus AS_WData AM_WaitRq AS_RData AM_RData AS_Add AS_IRQ AM_Add AS_CS AS_Wr AS_Rd AM_BE AM_Rd Reset Clk RB 2006/A2014

LCD Control architecture The LCD Controller can be separate in 4 main blocks: Avalon Slave to access registers Avalon Master to read memory A FIFO to receive data from Avalon Master and provide them to LCD control part The FIFO guaranties a continuous flow from memory the LCD, as memory is shared by multiples masters A LCD Control to sequence the LCD signals and send RGB data RB 2006/A2014

LCD Controller : Avalon Slave - Registers The Avalon slave interface is used to: receive and send registers contents from/to a Master Processor (ie: the NIOSII) Send an IRQ at end of frame if enabled, this allows the processor to provide a new buffer address at start of display frame Dispatch the registers content to the modules: Buffer information to master interface Display parameters to LCD Control RB 2006/A2014

LCD Controller : Avalon Master The Avalon Master interface is used to: Receive the Buffer information from Avalon slave part as : Start address of the buffer Length of buffer to read Synchronize the start of reading with LCD VSync from LCD Ctrl Read display data from memory through Avalon read accesses Send the Read data to a synchronization FIFO RB 2006/A2014

LCD Controller : LCD Control The LCD Control part send the synchronization signals to the LCD: VSync HSync DotClk RGB (3x6 bits/pixel) Read the pixels data from FIFO Receive information from Avalon slave part through registers interface It contains counters for signals and timing generation It's based on a state machine to control them RB 2006/A2014

LCD Controller : FIFO Writing of data from the Master interface and reading from LCD control have to be perfectly synchronized Read access from SDRAM memory can not be guaranties at pixel level timing We have to guaranty that the global data flow is possible and with which delay! A FIFO is an excellent way to allow synchronization between 2 asynchronous units RB 2006/A2014

LCD Controller : FIFO Rules: The Avalon master try to fulfill the FIFO when it can The LCD control unit read it when it needs. To be efficient, the Avalon master try to make consecutive reads, thus the SDRAM controller can do burst transfers. The FIFO needs to provide an information to the Avalon master module when it has a minimum of empty positions as a multiple of the burst transfers (4, 8, 16, .. ). The FIFO send information to the LCD Control module when it has at least 1 available pixel data. RB 2006/A2014

Avalon burst Read As a Master Unit M Av M Av M Av M Av M Av M Av Address and BurstCount available for the first cycle only Read signal only for the first cycle The number of burstcount ReadDataValid needs to be generated The master could start a new transfer in 2 RB 2006/A2014

Available and configurable with QuartusII MegaWizard Interface Camera, FIFO A FIFO (First In First Out) Memory allows the synchronization between a data producer and a data reader with asynchronous transfers rate. Available and configurable with QuartusII MegaWizard FIFO Clk WrFIFO FIFO_Full FIFO_Empty RdFIFO WrData RdData FIFO_Almost_Full FIFO_Almost_Empty RB 2006/A2014

FIFO The Output FIFO_Almost_Empty allows to know if they are still xx free positions in the FIFO and FIFO_Almost_Full allows to know if they are already xx filled positions in the FIFO xx programmable when FIFO is generated with MegaWizard Thus it is possible to know that at least Burst Mode Size data are available for read access master transfers to write in FIFO The size off the FIFO and …_Almost_... are defined at generation time of the FIFO through MegaWizard RB 2006/A2014

Memory  Display relation 31 239 FBAdd Line 0 240 columns 239 Line 1 240 columns FBLgt 239 Line 319 240 columns 319 239 RB 2006/A2014

Pixel organization, some choices 18 bits/pixel at LCD Ex. 32 bits /pixel at memory RGB or BGR ? 6 bits / Byte: right or left alignment ? RB 2006/A2014

Pixel organization, some choices 18 bits/pixel at LCD Ex. 16 bits /pixel at memory, 2 pixels / 32 bits RGB or BGR ? 5-6-5 bits / doublet: RGB, 2 bits lost 5-5-5 bits / doublet: RGB, 3 bits lost RB 2006/A2014

More bits/pixel 18 on 32 bits Pixel organization Many choices Need to be done ! More bits/pixel 18 on 32 bits more memory for a frame more bandwidth necessary more colors available 218 : 262144 Memory space free for other function Less bits/pixel (16) Lost in color resolution 15 bits 32’768 16 bits 65’536, more on Green generally RB 2006/A2014