In most applications, a video frame stored only in processor memory is of limited utility. It must be somehow sent out for display. Analog displays first require, of course, a video encoder, as illustrated in Figure 11. The I²C interface is configured to send the data via the Blackfin processor's PPI data bus. While these particular encoders support BT.656, some encoders will require explicit frame sync signals to be sent via the PPI frame syncs.
(Click to enlarge)
11. Processor connection to video encoder for analog display
Digital displays like TFT-LCD panels need some of the same signaling and synchronization layer signals, including horizontal and vertical syncs and the data sampling clock. The whole 16-bit PPI data bus is used for displaying video, since most TFT panels provide at least 18 bits of resolution. A PWM timer block is optionally employed, since many TFT-LCDs do not integrate a timing controller. A representative connection is shown in Figure 12.
(Click to enlarge)
12. Example processor connection to TFT LCD panel
Video tips and tricks
BT.656 should be used whenever possible because it eliminates a lot of timing incongruities and inconsistencies that can occur in video interfaces. Also, it is important to pay close attention to the default converter settings for the A/D or D/A: Sometimes these converters can be used directly without programming through an I²C or SPI interface. Further, it is important to make sure the pixel clock source is as clean as possible, since these clock rates can run to tens of MHz, depending on the application. A clean clock can make a huge difference in the stability of a system.
When the processor is connected to a typical RGB666 LCD panel that has 6 bits of R, G and B for a total of 18 bits, the processor's 16 bits actually connect as a RGB565 device. In this configuration, the red and blue channels receive only 5 bits each. Do not ground the least-significant bit of the red and blue channels, since this will compromise the dynamic range being represented. Instead, at the panel tie the least-significant bit of red to the most-significant bit of red, and do the same for blue. This ensures a full dynamic range from the very lowest to very highest value on each of those channels. With green, all 6 bits are connected and represented, because green is the most visually important channel of the three.
Considering the complexity of video development, it's important to take advantage of all the support a vendor provides. Taking Blackfin's offerings as an example: VisualDSP++ provides the peripheral drivers for the PPI as well as for the TWI, the timers, and all the different modules involved with connecting a video system to a Blackfin processor. This includes many complete video device drivers for encoders, decoders, CMOS sensors and LCD displays. Furthermore, EZ-KITs and the EZ-Extender cards are available with CMOS sensor and LCD interfaces, reference schematics, and a bill of materials. Also, the EZ-KIT and EZ-Extender code examples are invaluable, especially for systems where data movement and memory accesses are crucial to guaranteeing correct system operation.
This article has given an overview of audio and video connections to DSPs and convergent processors. With a basic knowledge of the "lingo," an understanding of the interfaces involved, and a proper choice of processor architecture (including strong consideration of vendor support), it is possible to piece together multimedia systems in a straightforward manner.
About the author
David Katz is a Senior DSP Applications Engineer at Analog Devices, Inc., where he is involved in specifying and supporting Blackfin media processors. He has published dozens of embedded processor articles both domestically and internationally. Previously, he worked at Motorola, Inc., as a senior design engineer in cable modem and automation groups. David holds both a B.S. and M. Eng. in Electrical Engineering from Cornell University. He can be reached at firstname.lastname@example.org.