HVTPI Primer And Toolkit Equips You For BOM Substitutions

A HVTPI adapter plugged into a USBASP, with a an IDC10 cable plugged into it in turn

Novel programming interfaces for MCUs might catch us by surprise, but then we inevitably get up to speed with the changes required. Today’s bastion is HVTPI – a “12V reset” addition to the TPI we’ve just started getting used to, and [Sam Ettinger] has shared a simple circuit to teach us all about it, along with PCB files and detailed explanations of how it all works.

HVTPI is an add-on on top of TPI, for which, as Sam explains, you need to hold RST at 12V when TPI would have it be low logic level, and leave it at Vtarget otherwise. For that, he has designed a variety of interposer boards of various complexity and requirements; explaining the choices behind each one and clearing up any misunderstandings that might occur on your way. All of the board files (and the TPI write-up copy) are caringly shared with us in a git repository, too! As a result, if you have an USB-ASP or an Arduino available, now you also have everything to do HVTPI, thanks to Sam’s work and explanations.

We’ve been covering Sam’s exploits before, and can’t help but be grateful for the stop-and-explain detour along the way. HVTPI being used on very small ATTiny parts, we wonder if something new in the vein of his recent FPC board able to fit and function entirely within a Type-C cable end!

With chip shortages, investigating programming interfaces for small and obscure yet in-stock microcontrollers has been, quite literally, paying off, and if you got some projects that need a MCU but won’t consume a whole lot of resources, it could be time to give an ATTiny10 a go. What’s the worst that can happen – you make the smallest chiptunes ever?

13 thoughts on “HVTPI Primer And Toolkit Equips You For BOM Substitutions

  1. If memory serves I think these (below) HV programming interfaces are real for Atmel (now Microchip) AVR processors. (Correct me if you see something wrong here.) The HV (12V High Voltage) extensions program non-volitile “Fuse” bits.[1][2] At [3] is an online fuse bit calculator. I think the Tiny Programming Interface (TPI) is only for newer-smaller Atmel ATtiny processors (e.g. ATtiny40 and below).

    TPI uses three target processor signal pins, e.g. MOSI, SCLK, & RESET. With TPI MOSI & MISO are multiplexed, so they are tied together on the programmer device. Using less pins to program is desirable on tiny pin-scarce processors. With SP/ISP MOSI& MISO are not multiplexed, so four signal pins are used between the programmer and the target processor, one more than with TPI.

    See [5] & [6] for how to use TPI to program smaller-newer ATtiny processors with an Arduino sketch and a JAVA front end GUI. But remember, to program fuses you still need to apply HV (12V), which brings us right back here to the topic of today’s post.

    HVPP = High Voltage Parallel Programming.

    HVSP = High Voltage Serial Programming (a.k.a. In System Programming or ISP).

    HVTPI = High Voltage Tiny Programming Interface.

    There are non-HV versions of all of the above if you don’t need to mess with fuses.

    * References:

    1. AVR Fuse Bits Explained

    https://hackaday.com/2012/08/30/avr-fuse-bits-explained/

    2. Fuse bits aren’t that scary

    https://embedderslife.wordpress.com/2012/08/20/fuse-bits-arent-that-scary/

    3. confFUSE™ for Microchip AVR® MCUs (a.k.a. confFUSE Engbedded Online AVR Fuse Calculator)

    https://www.engbedded.com/conffuse/

    4. Atmel AVR918: Using the Atmel Tiny Programming Interface (TPI) [PDF]

    https://ww1.microchip.com/downloads/en/Appnotes/doc8373.pdf

    5. Programming The ATtiny10 With An Arduino

    https://hackaday.com/2012/08/23/programming-the-attiny10-with-an-arduino/

    6. TPI Programmer Using an Arduino Sketch and a JAVA GUI Front-End

    https://junkplusarduino.blogspot.com/p/attiny10-resources.html

    1. Don’t see them as any more evil than the rest of the vendors. The AVR parts doesn’t have good value i.e. capabilities / prices vs other microcontrollers. e.g. Arm, STM8. My other beef is their undocumented hardware debuggers.

      The fact is that they have so many different programming interfaces tells me that the Atmel side don’t care much about forward compatibility. Contrast that to Microchip’s own PIC series.

  2. Hm. Been in electronics, from vacuum tubes to FPGAs, amplidynes to MEMS, wavegudes to triax to single-mode fiber, Sigma 7 and DECsystem-20 to Cortex-A and RISC-V, 2-phase AC servomotors to brushless-DC and ultrasonic, keeping current throughout for 50 years, but I had no idea what this article was about. You might want to think about introducing the subject somewhere in first few paragraphs. It’s kind of basic tech writing.

    1. OP seems wrongly to assume that everybody already know which microcontrollers series uses these interface and perhaps what’s currently available to program them. Bare in mind that HaD has a large range of readers with different interests and backgrounds.

      It is one thing to waste paragraphs of pointless and factually wrong fillers like some of the HaD articles, but dropping right down to business might not be the right approach.

  3. Paldies, Arsenijs! I appreciate the kind words about my recent output. Some of the other comments include useful introductions/explanations of the terminology and its applications; I think the blog post would benefit from adding a bit more info at the start. After all, we are discussing a rather niche AVR function, haha!

    “HVTPI being used on very small ATTiny parts, we wonder if something new in the vein of his recent FPC board able to fit and function entirely within a Type-C cable end!” — I think about 4 hours after this hit the blog, I put up the first details of the project in question! I genuinely did not see this blog post until *after* I added the project. It’s still quite rough around the edges and could use some feedback: https://hackaday.io/project/184222-as-yet-unnamed-led-microcontroller-and-programmer

  4. Why would you even create this 12 V reset interface, what is the point? Just program microcontrollers like everyone else does without creating your own unique interfaces. Don’t overcomplicate something that doesn’t need overcomplicated.

    1. “Just program microcontrollers like everyone else does without creating your own unique interfaces.” Haha, what? Are you upset that Atmel/Microchip have a programming protocol feature that you didn’t know about, and that occasionally people find it useful?

      “what is the point?” The point is to free up the pin that normally functions as RESET, so it can be used as a GPIO instead. It’s really handy.

      “Don’t overcomplicate something that doesn’t need overcomplicated [sic].” I agree! Enabling 12V reset often means I can use an ATtiny4/5/9/10 instead of a tiny13 or 85. That’s my interpretation of reducing complexity, sorry it doesn’t jive with yours apparently.

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.