Posts with «graphics» label

HDMI From Your Arduino

Creating a video signal from a computer, a job that once required significant extra hardware, is now a done deal with a typical modern microcontroller. We’ve shown you more NTSC, PAL, and VGA projects than you can shake a stick at over the years. Creating an HDMI video signal however is not so straightforward. It’s not a loosely defined analogue standard but a tightly controlled digital one upon which the clever hacks that eke full colour composite video from a single digital I/O pin will have little effect. Surely creating them from a simple microcontroller will be impossible! Not according to [techtoys], who has created an Arduino shield that creates an HDMI output from an SPI control input.

At its heart are two interesting integrated circuits that give us a little bit of insight into creating graphics at this level. First up is an RA8876 MIPI TFT controller which is a full graphics engine that produces a digital RGB output, followed by a CH7035B HDMI encoder that produces an HDMI output from the RGB. This combination of chips is particularly interesting one, because the RA8876 supports a variety of different interfaces that between them should be able to talk to most microcontrollers. In the Arduino world the only other HDMI options come via the use of an FPGA.

This is a project that seems to have been around for a couple of years, but which is still an active one. The classic Arduino shield form factor may now seem a little past its zenith, but as this board shows it’s still capable of being used for interesting new applications.

Thanks [th_in_gs] for the tip.

Hack a Day 26 Jul 09:00

Better 3D Graphics On The Arduino

There are cheap LCDs available from China, and when plugged into an Arduino, these displays serve as useful interfaces or even shinier baubles for your latest project. [Michael] picked up a few of these displays in the hope of putting a few animated .GIFs on them. This is an impossible task with an ATMega microcontroller – the Arduino does not have the RAM or the processing power to play full-screen animations. It is possible to display 3D vector graphics, with an updated graphics library [Michael] wrote.

The display in question uses the ILI9341 LCD driver, found in the Adafruit library, and an optimized 3D graphics driver. Both of these drivers have noticeable flicker when the animation updates, caused by the delay between erasing a previous frame and when a new frame is drawn.

With 16-bit color and a resolution of 320×240 pixels, there simply isn’t enough memory or the processing power on an ATMega microcontroller to render anything in the time it takes to display a single frame. There isn’t enough memory to render off-screen, either. To solve this problem, [Michael] built his render library to only render pixels that are different from the previous frame.

Rendering in 3D presents its own problems, with convex surfaces that can overlap themselves. To fix this, [Michael]’s library renders objects from front to back – if the pixel doesn’t change, it doesn’t need to be rendered. This automatically handles occlusions.

In a demo application, [Michael]’s LCD and Arduino can display the Stanford bunny, a low-poly 3D face, and geometric object. It’s not a video game yet, but [Michael] thinks he can port the classic game Spectre to this platform and have it run at a decent frame rate.

Video of the demo below.


Filed under: Arduino Hacks