LCD controller using FPGA

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Having got my hands dirty with the AVR32 and the LCD controller. Now, I am thinking of trying my hand with a FPGA based LCD controller.

The motivation being very high resolution. The resolutions I am looking for are in the range of 1280x1024 or 1600x1200 etc with at least 16 BPP.

Now, here's what I want to do:

1. Drive a high resolution LCD/TFT with the above mentioned resolutions.
2. Interface a SDRAM for the display frame buffer.
3. Have a nice interface with the host MCU. The host MCU will control the frame buffer. It will mainly control the graphics that will be displayed on the screen.

As being a totally new to the FPGA platform, I cannot say much on how to proceed and which device to use. I was thinking of the Altera Cyclone III or something like that.

Anyway, looking at the requirements above, I think this is a pretty big task and even bigger for a beginner.

So, can anyone comment on the project and the requirements? Whether this is feasible? What tools to use, which programming language? Or if there is a better way to achieve the goal (maybe without FPGA) ?

BTW, I will be using the host MCU as one of the AVR32 devices ;).

Thanks,
-Deven

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd suggest you get your feet wet with something a little simpler, then work up to your final goal. There's quite a few fpga development boards available, so you'd want one with some sdram on it. As for tools & language, you'll most likely end up using Quartus for Altera products and VHDL. Having a good grounding in the basics of sequential digital logic will help otherwise you'll learn the hard way how not to do things.

You could always use PCI/X and a PC video card to do all the hard work - your fpga would then just have to be a gateway between the AVR32 and PCI/X. Actually, I think there are chips that just do that - let Google be your friend.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PCI (or AGB) video card would be easier than PCI Express.

The problem is that the video card contains x86 binary code needed for initialization (video bios), so there is no point using a video card unless you wish to emulate the x86 cpu running the video bios or know how to operate the video card directly ( x server drivers may help here).

I have quite little knowlede what kind of interface the TFT displays have (LVDS or parallel video?) but it should be doable. Big job, but doable. Don't know anything about DRAM interface there, but at least you can build a test pattern generator quite easily which outputs video test screen. Then the problem is to get that converted to some electrical interface the TFT has.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I once did a TFT video controller (Sharp 640x480x18 parallel LVTTL) on a Cyclone I together with a NIOS2 softcore processor on a Cyclone I devkit NIOS edition.

The Avalon bus makes it very easy to share RAM between the controller and the processor... it takes care of bus arbitration :)

The basic LCD controller was not really difficult, basically read the datasheet of the display and follow the timing diagrams.

But the high res requirement makes it a bit more of a challenge because more data has to be shifted per second; the faster the logic must be, the more difficult fitting the design in the FPGA becomes.

Make sure you have a very very, very fast computer... compiling an FPGA project is not like a compiling a couple of C files for an AVR ;)

Even a relatively simple design can easily take half an hour; and if the fitter has problems meeting timing requirements it can take hours.

Probably a controller is available on opencores.org

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the replies!

I think the video card solution will be hard, with the availability of cards and the newer versions coming up. I would not be making the project in huge quantities, so that's one problem.

@ jayjay1974:

It gives me confidence reading your post. Thanks!
I will google a few terms that you mention in your post, like Avalon bus, etc.
I like the idea of the shared RAM. It will save lot of space on the board. Is it possible with the SDRAM?

Can you comment on, why the FPGA required would be larger for faster designs? I am new to FPGA, sorry if this answer to the Q is is obvious.

BTW, is it possible to generate the VGA analog signals using the FPGA? Or I need to attach a DAC to the generated LCD signals?

I am doing some search/research, I will get back with more.

Thanks,
-Deven

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's the beauty of the Avalon bus, you can hookup any type of RAM with the appropriate controller, arbitration will still work. You can also set priority and burst length (very important for SDRAM).

But the Avalon bus is part of the NIOS II/SOPC builder, though don't have to use a NIOSII in your system to be able to use it. It's a commercial product unfortunately. I did my project at my former employer and they had a full NIOS license.

I think you won't need this Avalon bus if you want to hook up your LCD controller to an AVR32. What interface between the two do you have in mind? I don't know enough of the AVR32, maybe you can make a memory controller so that both the AVR32 and the LCD controller can use one SDRAM.

I must warn you that there is quite a steep learning curve with all this. You need to work with Quartus, maybe SOPC builder, learn VHDL and understand FPGAs. Quartus is a very big and complex tool, but luckily you won't need most of it.

I would suggest to get a cheap devkit, and try to make a blinking LED in VHDL first.

It's not possible to generate analogue outputs on a FPGA, you'll need a DAC. High speed LVDS is also possible. I guess you want to be able to use a normal TFT monitor and not just a panel?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

FPGA plus simple resistor or few are used for analog VGA output. Most often there are only three bits, one bit per color, simply on/off for RGB lines (8 colors)

You can however make a VGA output yourself by hooking for example 4 pins together via 4 different resistors, and you have 4 bits per component (4096 colors).

Propably easiest to hook up something other than 1-bit VGA would be to make LVDS/TMDS output and use DVI/HDMI. There seems to be at least some DVI add-on boards for FPGA devkits, but there may be some devkits with DVI onboard. I am not sure if the DVI add-on is just a connector adapter or does it take 24-bit video and it has the DVI link encoder chip (like ones from Silicon Image).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

why not using altium designer it has an tft lcd controller core maybe you can use it!

I love Digital
and you who involved in it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just a quick update. I am still searching and doing some reading.

I will get back soon.

-Deven

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

drt80 wrote:

As being a totally new to the FPGA platform, I cannot say much on how to proceed and which device to use. I was thinking of the Altera Cyclone III or something like that.

Anyway, looking at the requirements above, I think this is a pretty big task and even bigger for a beginner.


I would recommend something drastically simpler.