Using a DMA capable SPI as an LCD controller

What if you have a graphic display without an embedded controller, and you want to drive it with an ARM microcontroller? Turns out that if a DMA is available, the task is not so impossible as it first seems.

If you’re interested, read the article on my website here.

Advertisements

Tags: , , , ,

5 Responses to “Using a DMA capable SPI as an LCD controller”

  1. giuliof Says:

    Hello
    I have one of that display, and i’m trying to make it work.
    Did you power it with 5V? Can I see the circuit you used for the power supply and contrast adjustment?
    Thank you

    • fedetft Says:

      Hi, the display controller was powered at 5V, you can see the 820 ohm resistors for the wires that come from the stm32, that is powered at 3.3v (pins were configured as open drain, and are 5V tolerant). The display itself does require a higher voltage to operate. In the pictures of the article I was just testing code, so I used a variable voltage power supply to drive the display and set contrast. For the final unit, I don’t have the schematic at hand right now, but I used a one transistor plus transformer oscillator/step up converter. The schematic is similar to this one (http://www.webalice.it/fede.tft/torcia/torcia.html), only instead of the LEDs there’s a zener diode to cap the voltage, and a potentiometer to give a variable voltage between 0 and the zener voltage. The display draws very little current, so it’s good enough.

      Also, if you’re interested in the source code, it did eventually get integrated in mxgui, but for a bigger board (the stm32f4discovery). The code is here https://gitorious.org/miosix-kernel/mxgui/source/1cf069444f9867d77c3d77fbdfe6bfa7b6f9fa0e:drivers/display_bitsboard.cpp and gives access to the text and font drawing primitives of mxgui.

      • giuliof Says:

        Hello
        I tried following the constrast circuit on the datasheet (http://box.glgprograms.it/Users/dmf.jpg) applying up to 13v between Vdd and Vee and turning the trimmer, but it does not work, displaying random lines.
        Did you followed the same instructions?
        Thanks

      • fedetft Says:

        From what I remember, the circuit was the same, it’s also in the display datasheet.

        If you get random lines, it is more likely that the driving waveforms (LP and FLM are not correct). Have you tried to turn the trimmer to adjust HSYNC timings? Are you using all 74HC series components? In my experience, for example, it did not work using CD4094, only with 74HC4094 because it’s faster.
        If timings are right, then when turning the contrast trimmer you can range from having the display totally clear, with nothing on screen, to totally black, but if timings are wrong, the contrast trimmer doesn’t really work.

  2. giuliof Says:

    No, I don’t use your SPI method, I’m driving it in simple parallel mode.
    Probably the software I’ve written has some lacks in temporization. I’ll check it in weekend.
    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: