MSP430 HDMI CEC UART CONVERTER

Jul 15, 2014 Blog

Introduction

Control your TV, DVD, AV Receiver and even your computer/laptop with just one remote control! Isn’t it cool to control your computer with your TV’s or AV receiver’s remote control?

MSP430-HDMI-CEC-UART

HDMI (High-Definition Multimedia Interface) is an audio/video interface for transferring uncompressed digital audio/video data between two or more HDMI-compliant devices (like audio devices such as AV receivers or mini Hi-Fi systems, or video devices such as TV’s monitors, projectors, desktop computers or notebooks). Most new TV’s graphics cards and notebooks come with an HDMI jack. There’s no need for signal conversion since HDMI is electrically compatible with the CEA-861 signals used by DVI (Digital Visual Interface). You can also use a DVI to HDMI adapter without loss of video quality. There are three physically separate communication channels in HDMI; DDC, TMDS and the optional CEC, and ARC and HEC in HDMI 1.4.

What is HDMI CEC?

CEC stands for Consumer Electronics Control which allows HDMI devices to control each other. Furthermore, it allows the user to operate multiple devices with just one remote control. It is possible to command and control up-to ten CEC-enabled devices that are connected through HDMI.

MSP430-HDMI-CEC-UART-CONVERTER

For example, you can use your TV’s remote control to control TV, computer (HTPC for example), DVD, AV Receiver and other. CEC-enabled devices can also command and control each other without user intervention, for example, when you power off your TV, it can power off other components, or if you power off your computer/netbook, it can power off your TV if it’s connected through HDMI.

How does it work?

HDMI-CEC uses a one-wire bidirectional serial bus that uses the AV link protocol to perform remote control functions. Implementation of CEC in a product is optional but CEC wiring is mandatory. CEC stands for Consumer Electronics Control.

It’s a one-wire bus (pin 13) that “snakes” through an HDMI system – allowing products to pass messages to one another.

CEC runs at approx. 400Hz, so including flow control bits and idle timing requirements on the line, it can send approximately 30 bytes each second.

Commands need to be very efficient.

MSP430-HDMI-CEC-UART-CONVERTER

Today’s HDMI systems are comprised of separate components (digital set-top boxes, audio receivers/amps, a DVD player, etc.), which are not always easy to configure & operate.

The general public has difficulty with the how/when/why to set up these devices in order to use them. The more devices, the more complex is the setup. CEC is a solution to this problem!

CEC uses signal routing to allow devices to be configured across a system – rather than just point-to-point. Examples are one-touch play and one touch record which greatly simplify the user experience.

CEC Messaging:

CEC messages generally consist of two functional categories:

Request –

Asking another device(s) to take action or to give information (e.g. asking a device to play, go into standby, switch sources, or request a device’s physical address).

Informative –

Status messages and messages describing where a device is in a network (e.g. report physical address, report vendor ID).

MSP430-HDMI-CEC-UART-CONVERTER

CEC messages can also be grouped in terms of the intended target device:

  • Directed -Message sent to a single CEC device.
  • Broadcast- Sent to all devices in the CEC network.

CEC messages can be up to 16 blocks total (including the header and opcode blocks). If they were longer, they would impede access to the CEC bus due to the speed of the bus (Sending 16 blocks successfully takes about 0.4s).

The shortest message that can be sent is the polling message, which is simply a start bit followed by a header block.

Devices must respond to a message in 1 second or less, but the desired response time is 200 msec.

Approach:

The main objective of the project is to make a communication with HDMI devices through UART. The UART signal is connected to MSP430 (ez430 f2013). And the codes are written in C Language in IAR IDE.

MSP430 HDMI CEC UART CONVERTER

‘C’ is the place where the Microcontroller i.e. the MSP430 (ex430 f2013) is connected. A is the product and A & B are connected through HDMI Cable. The CEC of the HDMI is connected to the microcontroller. The input from the microcontroller via UART (for example keyboard) is given and the content are displayed on the TV. As HDMI is uncompressed, whatever the signals which we send are received through the HDMI CEC wire. This technique can similarly be deployed in the one remote project just by connecting ‘n’ of HDMI CEC devices. Supposing say one wants to connect DVR, TV, Laptop, and Speaker all these can be accessed by one remote or keyboard.

Coding:

/******************************************************************************

* Project Name: HDMI_CEC UART CONVERTER

******************************************************************************/

#include “msp430f2013.h”

#include “stdbool.h”

#include “uciRS232.h”

#include “delay.h”

#include “cecCommunication.h”

#include “hdmiPortdetect.h”

unsigned char count = 0;

unsigned char ii = 0;

unsigned int *ptr;

void main(void){

WDTCTL = WDTPW + WDTHOLD; // Stop WDT

BCSCTL1 = 0x86; // Set range

BCSCTL2 = 0x40; // Set range

DCOCTL = 0x60; // SMCLK = DCO = 1MHz

TACTL = 0X0210; //Set timer_A control reg

CCTL0 = 0X0000; // CCR0 interrupt disabled

CCR0 = 60000;

P1DIR |= 0X5D; //[P1.0,P1.4,P1.6 –>OUT PUT],[P1.7,P1.5 –>IN PUT]

SD16AE = 0X00;

P1SEL = 0X00;

P1REN |= 0X40;

P1OUT = 0X50;

P1IE = 0x00;

P1IES = 0XA0; // interrupt transaction edgge select

P1IFG = 0x00;

P1IE = 0xA0;// pin interrupt enabled

hdminSource();//HDMI HOT PLUG DETECTION IF U WANT TO USE U CAN USE OTHERWISE COMMENT THIS.

while(1){

_BIS_SR(0X0008);//GIE = 1

}

}

#pragma vector=PORT1_VECTOR

__interrupt void Port_1(void){

_BIS_SR(0X0000);//GIE = 0

if((P1IFG & 0x20) == 0x20){

cectx (rxData ());

}

else if((P1IFG & 0x80) == 0x80){

txData (cecrx ());

}

P1IFG = 0x00; // IFG cleared

}

July 15, 2014

PHP Application Development


Comments 0
July 15, 2014

Enterprise Mobility Solutions


Comments 0