Comparing PSoCs and MCUs in digital TV design -

Comparing PSoCs and MCUs in digital TV design


In this Product How-To article, Ronak Desai of Cypress describes the design challenges in digital TV applications and compares the use of microcontrollers and the company’s Programmable SoC architecture in dealing with roadblocks to efficient implementation.

Microcontrollers are used widely in current digital TV designs to provide mechanisms to direct the tuner to access specific frequencies, receive IR inputs from remote controls, vary the speaker sound output, controls the front panel mechanical switches and LCD/LED displays.

In this article, the use of programmable SOCs devices will be described as an alternative in the design of a single board solution for tuning analog and digital tuner frequency using I2C interface and receive IR inputs from the remote control using PSoC Creator’s IR receiver component to vary speaker sound output via a direct drive LCD/ LED display for front panel. It will also show how the designer can use a PSoC’s capacitive sensing technology to replace mechanical buttons on the keypad.

Using an MCU to build a digital TV tune r
As shown in Figure 1, below , typically, an 8- or 16-bit microcontroller is used for this type of application. It uses external EEPROM on the board to store information like the last channel viewed and favorite channels. It receives user inputs from the remote control through an IR receiver operating at 38 KHz frequency.

Click on image to enlarge.
Figure 1 Microcontroller in Digital TV application.

The microcontroller also displays channel and volume information on an LCD module or front panel display, as well as controls the aspect ratio of the TV screen (4:3 or 16:9), adjusts the audio (Volume control, Equalizer control) and video (Brightness, Contrast) parameters of the TV.

A smartcard interface in the TV is used to decode the user subscription. The smartcard communicates to the microcontroller through an I2C Interface. The Mechanical Buttons are used for the front panel key pad to show case functions like CHA+, CHA-, VOL+, VOL- etc.

Digital Tuner Block: As shown in Figure 2 below , the microcontroller communicates with the TV tuner through an I2C (SCL, SDA) interface and tunes the Analog and Digital Tuner at IF (Intermediate frequency) frequency, which is 38.9MHz for the PAL (Phase alternate Line) region. The digital tuner has an internal digital demodulator, which provides direct CVBS (Composite video broadcast signal) and Audio left and right output.

Click on image to enlarge.
Figure 2 Digital Tuner Block

The user selects television channels either using the remote control or using a front panel keypad. If the user selects Channel #1, for example, it is 48.25MHz, and the microcontroller tunes the local oscillator at 87.15MHz (48.25MHz + 38.9MHz = 87.15MHz) using the I2C interface. Thus, the output of the mixer will be 38.9MHz (Local Oscillator Frequency: 87.15MHz – Input Frequency: 48.25MHz = Intermediate frequency: 38.9MHz), which is the IF frequency. The tuner will provide the IF with the video and audio information of Channel#1. When the user selects the channel search function, the microcontroller tunes the local oscillator for respective frequencies. The user can fine-tune any channel using the remote control by adjusting the local oscillator frequency. The TV tuner has a step size of 31.25KHz, 62.5KHz, 125KHz, etc. The microcontroller can increase or decrease the frequency of the local oscillator by adjusting the tuner step size based on the fine tuning selection by the user.

Audio Output Block: The microcontroller controls the volume of the speaker through an external 8-bit/12-bit DAC (Digital to Analog converter). It will increase, decrease or mute the volume of the speaker through an external DAC and audio amplifier.

Power Supply Block: The digital television uses an SMPS (Switch mode power supply) to convert the input AC voltage to a DC output. It also uses an on-board LDO (Low dropout regulators) to step down DC voltages.

Using an MCU to controller the tuner’s PLL
Every tuner has an internal PLL (phase locked loop) block (Figure 3 below ). The function of this PLL is to provide the tuning voltage (Vtune), which is a fixed DC voltage. The tuning voltage will vary from channel to channel. The PLL block receives the local oscillator frequency at the input, which will be amplified by an internal pre-amplifier. A pre-scaler will downconvert the input frequency to ÷ 64, ÷ 128, ÷ 512, ÷ 1024, etc.

Clickon image to enlarge.
Figure 3 Tuner and PLL Block

Microcontroller data through the I2C goes to the programmable divider, which also receives the input from the reference oscillator (for example, a 4 MHz crystal oscillator inside the tuner block).

The phase comparator (i.e., phase detector) receives an input from the local oscillator frequency (for example 87.15MHz) through the pre-scaler and another input from the microcontroller (for example, 87.15MHz) through the reference divider and reference oscillator. If both inputs match, the phase comparator will provide the tuning voltage which is Vtune. Any mismatch between the local oscillator frequency and frequency data from the microcontroller will cause no tuning voltage (Vtune) at the tuner output and also no IF output.

The PLL creates a closed loop by tuning the local oscillator frequency with the help of te microcontroller data and generates the tuning voltage at the output. The tuning voltage will increase from lower frequency channels to higher frequency channels.

The microcontroller adjusts the step size of the tuner for fine tuning by varying the pre-scaler and programmable divider values. Step Size = (Local Oscillator Frequency/ Pre-scaler) X (Programmable divider/ Reference oscillator). Some possible configurations are shown below:

Configuration #1:
Local Oscillator Frequency: 87.15MHz
Pre-scaler: ÷ 64
Programmable divider: 256
Reference oscillator: 4MHz
(87.15MHz / 64) X (256/ 4MHz) = 87.15MHz (No Step size)

Configuration #2:
Local Oscillator Frequency: 87.15MHz
Pre-scaler: ÷ 1024
Programmable divider: 256
Reference oscillator: 4MHz
(87.15MHz/1024) X (256/4MHz) = 87.15MHz X 0.0625 (62.5KHz Step size)

Configuration #3:
Local Oscillator Frequency: 87.15MHz
Pre-scaler: ÷ 512
Programmable divider: 256
Reference oscillator: 4MHz
(87.15MHz/512) X (256/ 4MHz) = 87.15MHz X 0.125 (125KHz Step size)

Designing a Digital TV with PSoCs
In rethinking the design of a digital TV, the embedded developer can take advantage of the fact that a PSoC is a combination of a microcontroller with programmable logic and high performance analog to digital conversions and commonly used fixed-function peripherals. Available as an 8-, 16-, and 32-bit MCU, it has Flash memory up to 64KB, SRAM up to 8KB, and internal EEPROM up to 2KB.

Particularly useful in digital TV designs, a PSoC has internal configurable delta-sigma ADC with 8- to 20-bit resolution, 8-bit DAC, four 16-bit configurable timers, four 16- bit PWMs, Clock, Multiplexer, Comparators and I2C. Also useful is the fact that a PSoC operates in an ultra low power mode consuming <1 µA current, which can be used to allow a user to operate the digital television in standby mode.

PSoC has an internal PGA, comparators, and configurable delta-sigma ADC with 8- to 20-bit resolution and sample rates up to 192ksps. It is used to measure different analog inputs (for example, a light sensor, temperature sensor, humidity sensor, etc.) For example, a light sensor interface in a TV application is useful for auto adjusting the TV monitor’s brightness and contrast based on the ambient room light.

PSoCs can directly drive LED and LCD displays (Segment LCD, Graphic LCD and Character LCD displays) for displaying channel and volume information on the front panel. PSoC has an operating range of 1.71V to 5.5V so it can be easily interface with external peripherals for other applications. PSoC can also directly drive on-board relays, which is helpful for the power supply in standby operation.

PSoCs have an internal RTC component for real time measurement, as well as an internal system clock that does not requires external clock/oscillator circuitry. PSoCs also supports the USB 2.0 interface, enabling users to interface external memory (Hard disk) containing audio and video files to the TV. Additionally, PSoC supports the Secure Digital (SD) card interface for audio and video storage as well.

Using the PSoC Creator IDE tool, all the interface and logic can be designed. PSoC Creator has readily-available component blocks for designing interfaces and logic like SARADC and PGA for analog sensors and other signal inputs, as well as other components like I2C, SPI, IR Receiver, PWM, CLK, MUX, TIMERS, USB and CMP for Digital TV application.

PSoC Creator also enables user to tap into an entire tools ecosystem with integrated compiler tool chains, RTOS solutions, and production programmers. With PSoC Creator, developers can create and share user-defined, custom peripherals using a hierarchical schematic design. They can also automatically place and route select components and integrate simple glue logic, normally located in discrete multiplexers.

PSoC supports capacitive sensing technology that replaces mechanical buttons on the keypad. PSoC supports sliders for volume up/down functionality. PSoC also supports proximity sening for the front keypad, enabling the front keypad to be activated once the user places a hand near the keypad (i.e., the TV will react to the hand movements, so that user can change the channels).

PSoC has internal 8-bit DAC, which will be used for controlling volume of the speaker and also performs the mute function for the audio speaker. An internal DAC on the PSoC will also used for controlling brightness and color quality of video output by varying the gain of the video amplifier.

RF and microcontroller-based mixed-signal board design is needed to meet audio and video performance requirements. PSoC is a combination of a microcontroller with programmable logic and high performance ADC capabilities. As shown in Figure 4, below , using a PSoC in a design will improve board performance by using internal programmable analog and digital peripherals. Filter implementations using PSoC will also improve the signal quality and help cancel system noise.

Clickon image to enlarge.
Figure 4 PSoC in Digital TV application.

Digital televisions need a low-cost front panel design with different features like buttons, LEDs and smartcard interfaces. PSoC supports capacitive sensing technology to enable sliders and proximity sensing to be implemented in the front panel design. Meeting signal to noise (SNR) performance with nearby LEDs (PWM-based) on a front panel is a design challenge for system designers.

Current digital TV designs: what could be improved
PSoCs support capacitive sensing technology to replace mechanical buttons with capacitive-based keypads. It also reduces failure due to mechanical buttons and provide better product reliability. PSoC Creator supports CapSense SmartSense components which autotunes the sensitivity of CapSense buttons. Implementation of touch screen based design on the front panel instead of LCD display and keypad will provide better user interface and flexibility.

PSoCs support SPDIF (Sony/Philips Digital Interface) and MIDI (Musical Instrument Digital Interface) components in PSoC Creator, It will help user to interface with other external audio devices and instruments.

Currently the TV application is based on a single-tuner. With a double-tuner based design (Cable and satellite Tuners), users can view two pictures in Picture-in-picture (PIP) mode. With an interface for external devices like iPod / iPhone, the system can communicate to the media devices across the UART or USB ports. User can interface iPod / iPhone devices for different audio and video applications.

Ronak Desai is a Staff Engineer at Cypress Semiconductor with nine years of industry experience. He hass a BE in Electronics and Communication from Mumbai University, India. He is part of the Development Kits Group and is based out of Bangalore, India. You can reach Ronak at .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.