ATtiny85 Does Over The Air NTSC

[CNLohr] has made a habit of using ATtiny microcontrollers for everything, and one of his most popular projects is using an ATTiny85 to generate NTSC video. With a $2 microcontroller and eight pins, [CNLohr] can put text and simple graphics on any TV. He’s back at it again, only this time the microcontroller isn’t plugged into the TV.

The ATtiny in this project is overclocked to 30MHz or so using the on-chip PLL. That, plus a few wires of sufficient length means this chip can generate and broadcast NTSC video.

[CNLohr] mentions that it should be possible to use this board to transmit closed captioning directly to a TV. If you’re looking for the simplest way to display text on a monitor with an AVR, there ‘ya go: a microcontroller and two wires. He’s unable to actually test this, as he lost the remote for his tiny TV from the turn of the millennium. Because there’s no way for [CNLohr] to enable closed captioning on his TV, he can’t build the obvious application for this circuit – a closed caption Twitter bot. That doesn’t mean you can’t.

Video below.

37 thoughts on “ATtiny85 Does Over The Air NTSC

    1. ” has made a habit of using ATtiny microcontrollers for everything”

      So you mean :”why doesn’t he connect an IR LED to an attiny”

      Well, the answer is in the link ” It would be several hours for me to try to get my AVR with IR LED to do all the menus and everything to get closed captioning on :(”

      He was just too eager to publish already.

          1. [Charles Lohr], here’s a RC64 universal remote. Programming codes for Symphonic TVCR9F1 are 10171, 10180. $19.95, free shipping, 30-day no questions guarantee with no restocking fee here:


            Buy, rip IR signals, publish to online code database(s), return. If you consider that unethical or risky, check thrift stores; being a common DirectTV remote, I’ve seen these in bins of assorted electronic bits for $2-3. Or grab one on Ebay for $5 shipped.

  1. Not to be the Debbie Downer in the comments section, but this is far from new.

    The Parallax Propeller was doing this as one of its examples right after it was introduced in 2006. I had it set up to transmit to the TV across my office, and it was color as well.

    Now if the gist is that it was done with a relatively underpowered microcontroller I could see where this would be considered news worthy.

          1. Actually, I see you can get them for $7 elsewhere.
            Anyways, it’s a small arduino.

            “The Pro Micro is a great little Arduino-Compatible board. The small form factor makes it perfect for use in projects where space is a concern.

            The Pro Micro is similar to the Pro Mini, but uses the ATmega32U4, which allows USB connectivity to be added on-board. The Pro Micro is considered to be the replacement for the Pro Mini, but costs slightly more.”

        1. Well there’s a Cypress board with Arm cortex M0 for $4 on Mouser: CY8CKIT-049-42XX
          3298 can ship immediately.
          My mind was blown when I saw this… trying not to buy it “just because”.

          1. Also there are plenty of STM32F103C8T6 (Cortex M3/64kB/20kB) on eBay for about $4 SHIPPED and they’re compatible with open-source tools (openocd/gcc/gdb). We be livin’ in the future.

          2. I don’t know how you would modulate NTSC on one of them without an external clock reference. Do you know if it has the capability of producing the clocking and output necessary via pwm?

      1. Not sure where you got the idea that the Propeller was designed for broadcast TV, it is just a general purpose microcontroller with 8 cores. The example came about through the experimentation with the advanced timers in each core. Chip Gracey, the designer of the chip, wanted to see how far they could be pushed. He was first able to synthesis the TV signals, including color chroma to output on a standard RCA video plug, then he used another to broadcast the signal.

        Also the performance comparison is misleading, the ATTiny85 is a single cycle instruction chip that he overclocked to 30MHz = 30 MIPS. The Propeller is a 4 cycles/instruction chip that is clocked at 80MHz = 20MIPS.
        So you could say that the Propeller is the under-powered one. Granted there are 8 cores on the Propeller which is why it is 4x the price of the ATTiny85, but if memory serves correctly only 1 core was used to generate the signalling.

        1. I got the idea from the datasheet, where it says: Each cog has a video generator module that facilitates transmitting video image data at a constant rate. There are two registers and one instruction which provide control and access to the video generator. Counter A of the cog must be running in a PLL mode and is used to generate the timing signal for the Video Generator. The Video Scale Register specifies the number of Counter A PLL (PLLA) clock cycles for each pixel and number of clock cycles before fetching another frame of data provided by the WAITVID instruction which is executed within the cog. The Video Configuration Register establishes the mode the Video Generator should operate, and can generate VGA or composite video (NTSC or PAL)

          1. Fair enough, its been a quite a while since I read the datasheet. But having seen the actual internals of the counters, there is nothing special there. It is essentially a DMA system coupled with a mux to drive the GPIO. But sometimes even simple structures in silicon can vastly improve the software efficiency so you have a valid point.

    1. Not to be the asshole in the comments section, but it seems in your rush to be negative, you’ve overlooked the fact that this is broadcast NTSC, not composite NTSC.

      There are myriad projects for AVRs, Arduinos, Propellers, and nearly any other reasonably competent microcontroller out there that can output composite NTSC. By contrast, the signal transport for this is over-the-air, not via a direct connection by wire.

      While the actual signal spec is largely the same between composite NTSC and broadcast NTSC, there are a few important differences. For example, given enough CPU time to sling around, it should be possible to modulate audio onto the signal and have it come through the TV’s speaker. With composite NTSC, you would need a separate RCA connector and a DAC in order to have any sort of audio.

  2. Would it be possible to use a better mcu to inject video into the signal stream? Im thinking like a scraper that can display data overtop on the video. Imagine a dumb TV turning into a smart TV. You could overlay internet based info like a twitter feed. I dont see why it would need to use the closed captioning system but I believe thats what he would be required to do since the attiny85 has limited memory.

    1. To overlay one composite video signal on another, they both have to by synchronised. You can’t have one signal sending the “start horizontal line” pulse, then the other sending it again a moment later. Same with the vertical sync signal, you’d have the TV trying to start a new picture in the middle of the first one. You’d either get rolling and flickering, or more likely just no picture.

      Synching two video sources together is called genlocking. A genlocker is traditionally an expensive piece of hardware, but if you’re making both, or at least one, of the signals from scratch, it’s not as hard.

      So the mcu would have to sync to the incoming video signal’s timing pulses. Not impossible. But generating graphics in software on an mcu is limited anyway, as well as hard work and a bit unreliable by nature. So there’s probably a better way. Just buying the smart TV, is one. Or using a computer, maybe a Pi, that can generate video, HDMI is better than composite, the resolution is much higher for just one thing. Then to get the TV signal in, maybe a USB TV dongle.

      As a little hack with a tiny mcu, though, probably not. Maybe if you were a real video timing / assembly whizz. Like CNLohr is.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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