Board: Atlas-SoC Development Platform
State: running

2016-02-24 14-43-24.png

This demonstration uses FPGA SRAM as FRAME BUFFER and shows part (320X240) of the D5M (5mega-pixel CMOS SENSOR) image on MTL2 (800X480 Multi-Touch LCD) directly, and when touching MTL2 at any position, the small screen (320X240) will move to the finger current position.

  • Block diagram instruction: The design principle is shown as figure 4, there are three parts: D5M _SET, MTL2_TOUCH, MTL2_320X240_RGB24BIT.

(1) D5M _SET.v: this .v file is used to handle the CMOS SENSOR module (D5M) parameter settings, as well as its output image data processing.


a.I2C_CCD_Config.v : this .v file is used to write required parameters (for example, resolution, exposure, colours , etc.) into D5M corresponding register through I2C protocol. D5M is I2C slave device, slave address = 0xBA(8bit).


b. CCD_Capture.v: this .v file is used to write image data (output from CMOS SENSOR) in corresponding address.


c. RAW2RGB.v: this .v file is used to rearrange CMOS SENSOR colours, and output RGB 12:12:12 data.


(2) MTL2_TOUCH.v: this .v file is used to process MTL2 touch coordinate data.


a. TOUCH_I2C.v: this .v file is used to read MTL2 touch coordinate data (through I2C master protocol) at any time. MTL2 is I2C slave device, slave address = 0x70 (8bit).


b. TOUCH_UPDATE.v: this .v file is used to process finger coordinate data and send to RAME BUFFER write /read counter at a new reference address.


(3) MTL2_320X240_RGB24BIT.v: this .v file is used to create a 320X240X24bit RAM as FRAME BUFFER in FPGA SRAM. FRAME BUFFER write/read address is based on the coming touch coordinate data (take the data as start reference point). It can be three parts.

a. FRAME_RAM_CTRL.v: this .v file implements a 320x240 FPGA-RAM frame buffer, which is a main body that consists of three parts:
-320x240 PIXEL FRAME BUFFER: implemented directly by building a 320x240x24 =1843200 bit two-port RAM in Quartus II tool.
-WRITE COUNTER: use the new touch coordinate data as reference point and take D5M Video CLOCK 25MHZ as data output address counter.
-READ COUNTER: use the new touch coordinate data as reference point and take MTL2 Video CLOCK 33MHZ as data output address counter.


b. PLL_VGA.v: this .v file is acted as a PLL, which can turn 50 MHZ to 33MHZ, and provide the 33MHZ to MTL2 pixel clock.


c. VGA_Controller .v: this .v file is acted as a LCD TIMING generator, it can provide 33MHZ for 800x480 PIXEL clock.

DEMO setup. The steps are as follows:

(1)Hardware setup:

a. connect USB BLASTER cable to DE0_NANO_SOC J13.
b. connect MTL2 to DE0_Nano_SOC GPIO-0 (Pay attention to the location of the PIN1).
c. connect D5M to DE0_Nano_SOC GPIO-1 (Pay attention to the location of the PIN1), camera is outwards, as following photo:

2.jpg

d. connect DC 5V adapter to DE0_NANO_SOC J14 .


(2)DEMO download:
a.Power on DE0_Nano_SOC.
b. Execute the demo batch file test.bat from the directory \demo_batch.
c. view MTL2, which will appear a 320X240 image on the screen, when using finger to touch screen at any position, the 320X240 image will follow your finger position immediately.
d: LED Status:
- LED[0] :MTL2 touch INT, when using finger to touch MTL2, it will blink. - LED[1] :MTL2 pixel clock /33000000 , it will blink at 1HZ frequency
- LED[2] :D5M dot clock /25000000 , it will blink at 1HZ frequency.

Give us your feedback

© 1999-2018 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.