Adventures in Consumer Electronics Control (CEC)

[Valkyrie-MT] was frustrated by the inability to control TrueHD audio volume from his computer. That’s because digital audio passes through the cable to the receiver where the volume adjustments are done. This meant that his RF computer remote was no good because the receiver uses an IR remote. He set out to find a way to get around this and ended up working with the Consumer Electronics Control (CEC) protocol.

The CEC protocol is a 1-wire serial bus built into the HDMI standard. The solution he settled up required one solder connection on the motherboard as well as the internal USB translator module seen above. That translator box, called the RainShadow, is a PIC 18F87J50 controlled board that translates incoming commands from the USB connection and sends them out as CEC hex codes. A bit of code writing and [Valkyrie-MT] is in business. You can see in the video after the break that it’s not just controlling audio, he can now control the entire entertainment center including turning on the TV and setting it to the appropriate input.

Comments

  1. f8l_0e says:

    Damn, this post makes me wish HAD included a rep system. Kudos.

  2. ino says:

    that’s a nice hack

  3. octel says:

    it’s weird how all these useful protocols and functions get implemented then promptly forgotten.

    why spend time developing it if it’s not going to be used?

  4. CodeAsm says:

    Wow, I liek this hack. I definitely bookmark this one. I have some hdmi devices not doing what I want them to do, maybe this come in handy.

  5. blue carbuncle says:

    Nicely done! +5 for use of obscure protocol :) Keep up the good work!

  6. mjrippe says:

    Another cool post! I must say HAD has been finding some consistently good hacks lately. Keep up the good work!

  7. DanS says:

    Does anyone have a good source for cec hex codes? I built something like this last year to control a one-off video display for a client. I had to sniff codes off a bluray player. It took forever doing trial and error.

  8. Nate says:

    dam that is nice control, makes me jealous

  9. Spork says:

    If you look at the link above, RainShadow has been nice enough to include a PDF with their hex codes and explanations of each.
    (http://rainshadowtech.com/downloads/HDMICECtoUSBandRS232v7.pdf)

  10. Rogan says:

    Looks like the hack was not actually [Valkyrie-MT]‘s. See http://thegreenbutton.com/forums/p/64265/461638.aspx#461638.

    The guy behind the RainShadow appears to be [stephanick].

  11. Rogan says:

    Ah, apologies to [Valkyrie-MT]. Looks like it was a combined hack.

  12. Valkyrie-MT says:

    Apologies accepted Rogan. Yes it was a combined effort. The Rainshadow HDMI-USB Bridge is a solid device. It does all the hard work here reading the CEC bus. I just wrote the software to work with the Media Center Remote Control and “hacked it” by installing it in the computer. But you don’t have to put it inside the computer like I did. It works perfectly fine by plugging it in to any available HDMI port like in an AV receiver or TV. It works because the CEC pin in HDMI is a bus, which means that they are all connected, so you should be able to plug in the bridge almost anywhere.

    At this point, it’s been in use on my primary TV/Media Center for months and it works great. My wife doesn’t even know she is using it. Everything just works together “magically”. There are a ton of other features that can be implemented in the software, but I just have not gotten around to it…

    Thanks to everyone for all the positive feedback.

    -Valkyrie-MT

  13. Miloss says:

    The price for the converter is.. just too high to buy..

    HDMI 1.3a specs are available after filling a questionare.. let’s see whether an 1$ Atmel 89C2051 can do that.

  14. Steve jobs says:

    my lg lcd tv can do that built in , the only requirement is , hdmi

  15. Virginia Towles says:

    AV Recievers that use UHF are ideal for homes that are very closed space. –

    <a href="Our own internet page

    http://www.caramoantravel.com/caramoan-accommodation/

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

Follow

Get every new post delivered to your Inbox.

Join 93,963 other followers