Menu

ATTiny212/214/412/416 Parts - added to compiler with demo programs.

Anobium
2024-07-21
2025-06-20
  • Anobium

    Anobium - 2024-07-21

    Added AVRDX tinyAVR® 1-series parts as follows:

    ATtiny212
    ATtiny214
    ATtiny412
    ATtiny414
    ATtiny416
    

    These are AVRDX parts and therefore you will require the latest GCSTUDIO build. You may need to sort the libraries but the core compiler works for these AVRDX parts.

    The XNANO board I used required the UPDI programming method. This is part of the GCSTUDIO installation ( since 2021 ) but you will to ensure you have the latest USE.INI or add an entry into your own USE.INI as follows, and, select ATMEL mEDBG using UPDI as the programmer.

    [tool = atprogram2]
    desc = ATMEL mEDBG using UPDI
    type = programmer
    useif = 
    progconfig = 
    command = %atmelATPROGRAMdir%\ATprogram.exe
    params = -t mEDBG -i UPDI -d AT%ChipModel%  chiperase program  -f "%FileName%"
    workingdir = %atmelATPROGRAMdir%\
    

    For demonstration programs see GitHub https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/TestSolutions/AVRDX_implementation/tiny416

    Enjoy these new chips.

     
  • Derek

    Derek - 2025-06-20

    Thanks Anobium. You have worked hard in supporting these microcontrollers.

    I see you programmed these AVR series 0 microcontrollers (that require UPDI programming) using the XNANO board.

    I'm asking for suggestions to locate a programmer to program both series 0 & series 1 AVR chips in boards that do not contain a USB connector? ie only a programming pin header is loaded onto the board. I see the Pickit5 is one option. Emulation is not a hard requirement.

    To remain flexible, the programmer should support the high-voltage pulse on the UPDI pin to enable programming if the pin has previously been configured as a GPIO or RESET pin.

     
  • Anobium

    Anobium - 2025-06-20

    I am not sure, I can ask Stuart Bury to look into this and then he can design and build one.

    Are we certain that none of the existing Programmers like USBTiny will not meet this specification?

     
  • Anobium

    Anobium - 2025-06-20

    My research.

    🔧 UPDI Programmers with 12V Support

    I am avoiding Microchip's programmers, so to program AVR Series 0 & 1 chips via UPDI—including recovery when the UPDI pin has been reassigned (GPIO/RESET)—these are some options:

    1. Kanda AVR UPDI Programmer

    • PC-based tool supporting UPDI, ISP, TPI, and JTAG.
    • Built-in 12V pulse generator—no need for extra circuits.
    • Suitable for recovering disabled UPDI pins.

    2. LeoNerd’s UPDI Programmer (Tindie)

    • USB programmer built on the CP2105 chip.
    • Manual switch for 12V pulse injection.
    • Dual UARTs—great if you need serial debug alongside programming.
    • Works well with ATtiny/ATmega Series 0 & 1.

    3. jtag2updi (DIY Arduino Programmer)

    • Use an Arduino Nano or Uno.
    • Does not support 12V by default, but can be modified with a MOSFET/zener setup to handle it.
    • Ideal if you are comfortable with a bit of soldering and scripting.

    ✅ Bonus: XNANO Board Reference

    Already using the XNANO board?

    It can be adapted to handle UPDI cases with a high-voltage pulse circuit (MOSFET + zener or 555-based).
    Details here → ATtiny416 Xplained Nano – Microchip


    ⚡ 12V Pulse Injector for UPDI Recovery

    Use this circuit to apply a brief 12V pulse to the UPDI pin when it has been reconfigured as GPIO or RESET. It is ideal for unlocking AVR Series 0/1 devices before programming.

    🧰 Components

    • 1 × N-channel MOSFET (e.g. 2N7000 or IRLZ44N)
    • 1 × 12V Zener diode (1W)
    • 1 × 10kΩ resistor (pull-down for gate)
    • 1 × 100nF capacitor (optional – pulse shaping)
    • 1 × Trigger (manual pushbutton or GPIO pin)
    • 1 × 12V power supply (DC-DC converter or charge pump)

    🔗 Basic Schematic

                    +12V
                      |
                   [Zener Diode]
                      |
    UPDI Line o-------+--------+--------> To Programmer
                               |
                            [Drain]
                           [MOSFET]
                            [Source]
                               |
                              GND
    
    Gate: Connected to GPIO or button, pulled low with 10 resistor
    

    📷 Diagram reference: See the schematic and discussion on the Arduino Forum – UPDI Enable Sequence by 12V Programming.


    💡 Usage Notes

    • Pulse duration: 100µs to 1ms is typically sufficient.
    • Trigger can be manual (pushbutton) or automated (GPIO).
    • After the pulse, the UPDI line returns to normal and programming can proceed.
    • Can be added inline with jtag2updi or XNANO setups.
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.