# $Id$ -*- text -*-
#
# AVRDUDE Configuration File
#

avrdude_conf_version = "7.3";

# This file contains AVRDUDE's default configuration data describing
# programming hardware pinouts and part definitions. Normally, it
# requires AVRDUDE be of the same or higher version than above string.
# AVRDUDE's -C command line option specifies the location of the
# configuration file. The -c option names the programmer configuration
# which must match one of the entry's id parameter. The -p option
# identifies which part AVRDUDE is going to be programming and must
# match one of the parts' id parameters.
#
# DO NOT MODIFY THIS FILE.  Modifications will be overwritten the next
# time a "make install" is run.  For user-specific additions, use the
# "-C +filename" command line option.
#
# Possible entry formats are:
#
#   programmer
#       parent <id>                               # optional parent
#       id       = <id1> [, <id2> ... ] ;         # <idN> are quoted strings
#       desc     = <description> ;                # quoted string
#       type     = <type>;                        # programmer type, quoted string
#                                                 # list known types with -c ?type
#       prog_modes = PM_<i/f> {| PM_<i/f>}        # interfaces, eg, PM_SPM|PM_PDI (1)
#       is_serialadapter = <yes|no>               # programmer is also a serialadapter
#       extra_features = HAS_<fea> {| HAS_<fea>}  # extra features, eg, HAS_SUFFER (2)
#       connection_type = parallel | serial | usb | spi
#       baudrate = <num> ;                        # baudrate for avr910-programmer
#       vcc      = <pin1> [, <pin2> ... ] ;       # pin number(s) (3)
#       buff     = <pin1> [, <pin2> ... ] ;       # pin number(s)
#       reset    = <pin> ;                        # pin number
#       sck      = <pin> ;                        # pin number
#       sdo      = <pin> ;                        # pin number
#       sdi      = <pin> ;                        # pin number
#       tck      = <pin> ;                        # pin number
#       tdi      = <pin> ;                        # pin number
#       tdo      = <pin> ;                        # pin number
#       tms      = <pin> ;                        # pin number
#       errled   = <pin> ;                        # pin number
#       rdyled   = <pin> ;                        # pin number
#       pgmled   = <pin> ;                        # pin number
#       vfyled   = <pin> ;                        # pin number
#       usbvid   = <hexnum> ;                     # USB vendor ID
#       usbpid   = <hexnum> [, <hexnum> ...] ;    # USB product ID (4)
#       usbdev   = <interface> ;                  # USB interface or other device info
#       usbvendor = <vendorname> ;                # USB Vendor Name
#       usbproduct = <productname> ;              # USB Product Name
#       usbsn    = <serialno> ;                   # USB Serial Number
#       hvupdi_support = <num> [, <num>, ... ] ;  # UPDI HV Variants Support
#   ;
#
#   # Notes
#   #
#   # (1) The following program modes are known:
#   #  - PM_SPM: Bootloaders, self-programming with SPM opcodes or NVM Controllers
#   #  - PM_TPI: Tiny Programming Interface (t4, t5, t9, t10, t20, t40, t102, t104)
#   #  - PM_ISP: SPI programming for In-System Programming (almost all classic parts)
#   #  - PM_PDI: Program and Debug Interface (xmega parts)
#   #  - PM_UPDI: Unified Program and Debug Interface
#   #  - PM_HVSP: High Voltage Serial Programming (some classic parts)
#   #  - PM_HVPP: High Voltage Parallel Programming (most non-HVSP classic parts)
#   #  - PM_debugWIRE: Simpler alternative to JTAG (a subset of HVPP/HVSP parts)
#   #  - PM_JTAG: Joint Test Action Group standard (some classic parts)
#   #  - PM_JTAGmkI: Subset of PM_JTAG, older parts, Atmel ICE mkI
#   #  - PM_XMEGAJTAG: JTAG, some XMEGA parts
#   #  - PM_AVR32JTAG: JTAG for 32-bit AVRs
#   #  - PM_aWire: AVR32 parts
#   #
#   # (2) The following extra programmer features are known:
#   #  - HAS_SUFFER: Only present on Xplained Mini/Nano programmers.
#   #    The Super User Fantastic Feature Enable Register allows the user to modify
#   #    the behavior of the mEDBG programmer/debugger chip. See the Xplained Mini/Nano
#   #    documentation for more information
#   #  - HAS_VTARG_SWITCH: Programer has a programmable target power switch
#   #  - HAS_VTARG_READ: Programmer can read the target voltage
#   #  - HAS_VTARG_ADJ: Programmer has an adjustable target power source that can
#   #    be controlled with Avrdude
#   #  - HAS_FOSC_ADJ: Programmer has a programable frequency generator that
#   #    can clock an AVR directly through its XTAL1 pin
#   #  - HAS_VAREF_ADJ: Programmer has an adjustable analog reference voltage that
#   #    can be controlled with Avrdude
#   #
#   # (3) To invert the polarity of a pin use a tilde: ~<num>
#   #     To invert the polarity of all pins in a list use ~(<num1> [, <num2> ... ])
#   #
#   # (4) Not all programmer types can process a list of PIDs
#
#   serialadapter                                 # same as programmer albeit only for usb parameters
#       parent <id>                               # optional serialadapter or programmer parent
#       id       = <id1> [, <id2> ... ] ;         # <idN> are quoted strings
#       desc     = <description> ;                # quoted string
#       baudrate = <num> ;                        # optional default baudrate, eg, in .avrduderc
#       usbvid   = <hexnum> ;                     # USB vendor ID
#       usbpid   = <hexnum> [, <hexnum> ...] ;    # list of USB product IDs
#       usbsn    = <serialno> ;                   # USB Serial Number in per-user .avrduderc
#   ;
#
#   part
#       desc             = <description> ;        # quoted string, the long part name, eg, "ATmega328p"
#       id               = <id> ;                 # quoted string, normally an abbreviated part name
#       variants         = <str1> [, <str2> ...]; # quoted strings, each starts with "<alt-name>: ..."
#       family_id        = <id> ;                 # quoted string, eg, "megaAVR" or "tinyAVR"
#       prog_modes       = PM_<i/f> {| PM_<i/f>}  # interfaces, eg, PM_SPM|PM_ISP|PM_HVPP|PM_debugWIRE
#       mcuid            = <num>;                 # unique id in 0..2039 for 8-bit AVRs
#       n_interrupts     = <num>;                 # number of interrupts, used for vector bootloaders
#       n_page_erase     = <num>;                 # if set, number of pages erased during SPM erase
#       n_boot_sections  = <num>;                 # Number of boot sections
#       boot_section_size = <num>;                # Size of (smallest) boot section, if any
#       hvupdi_variant   = <num> ;                # numeric -1 (n/a) or 0..2
#       devicecode       = <num> ;                # deprecated, use stk500_devcode
#       stk500_devcode   = <num> ;                # numeric
#       avr910_devcode   = <num> ;                # numeric
#       has_jtag         = <yes/no> ;             # part has JTAG i/f (deprecated, use prog_modes)
#       has_debugwire    = <yes/no> ;             # part has debugWire i/f (deprecated, use prog_modes)
#       has_pdi          = <yes/no> ;             # part has PDI i/f (deprecated, use prog_modes)
#       has_updi         = <yes/no> ;             # part has UPDI i/f (deprecated, use prog_modes)
#       has_tpi          = <yes/no> ;             # part has TPI i/f (deprecated, use prog_modes)
#       is_avr32         = <yes/no> ;             # AVR32 part (deprecated, use prog_modes)
#       is_at90s1200     = <yes/no> ;             # AT90S1200 part
#       signature        = <num> <num> <num> ;    # signature bytes
#       usbpid           = <num> ;                # DFU USB PID
#       chip_erase_delay = <num> ;                # microseconds
#       reset            = dedicated | io ;
#       retry_pulse      = reset | sck ;
#       # STK500 parameters (parallel programming IO lines)
#       pagel            = <num> ;                # page load pin name in hex, eg, 0xD7
#       bs2              = <num> ;                # byte select 2 pin name in hex, eg, 0xA0
#       serial           = <yes/no> ;             # can use serial downloading
#       parallel         = <yes/no/pseudo> ;      # can use parallel programming
#       # STK500v2 parameters, to be taken from Atmel's ATDF files
#       timeout          = <num> ;
#       stabdelay        = <num> ;
#       cmdexedelay      = <num> ;
#       synchloops       = <num> ;
#       bytedelay        = <num> ;
#       pollvalue        = <num> ;
#       pollindex        = <num> ;
#       predelay         = <num> ;
#       postdelay        = <num> ;
#       pollmethod       = <num> ;
#       hvspcmdexedelay  = <num> ;
#       # STK500v2 HV programming parameters, from ATDFs
#       pp_controlstack  = <num>, <num>, ... ;    # PP only
#       hvsp_controlstack = <num>, <num>, ... ;   # HVSP only
#       flash_instr      = <num>, <num>, <num> ;
#       eeprom_instr     = <num>, <num>, ... ;
#       hventerstabdelay = <num> ;
#       progmodedelay    = <num> ;                # PP only
#       latchcycles      = <num> ;
#       togglevtg        = <num> ;
#       poweroffdelay    = <num> ;
#       resetdelayms     = <num> ;
#       resetdelayus     = <num> ;
#       hvleavestabdelay = <num> ;
#       resetdelay       = <num> ;
#       synchcycles      = <num> ;                # HVSP only
#       chiperasepulsewidth = <num> ;             # PP only
#       chiperasepolltimeout = <num> ;
#       chiperasetime    = <num> ;                # HVSP only
#       programfusepulsewidth = <num> ;           # PP only
#       programfusepolltimeout = <num> ;
#       programlockpulsewidth = <num> ;           # PP only
#       programlockpolltimeout = <num> ;
#       # debugWIRE and/or JTAG ICE mkII parameters, also from ATDF files
#       allowfullpagebitstream = <yes/no> ;
#       enablepageprogramming = <yes/no> ;
#       idr              = <num> ;                # IO addr of IDR (OCD) reg
#       rampz            = <num> ;                # IO addr of RAMPZ reg
#       spmcr            = <num> ;                # mem addr of SPMC[S]R reg
#       eecr             = <num> ;                # mem addr of EECR reg
#       eind             = <num> ;                # mem addr of EIND reg
#       mcu_base         = <num> ;                # MCU control block in ATxmega devices
#       nvm_base         = <num> ;                # NVM controller in ATxmega devices
#       ocd_base         = <num> ;                # OCD module in AVR8X/UPDI devices
#       syscfg_base      = <num> ;                # Chip revision ID in AVR8X/UPDI devices
#       ocdrev           = <num> ;                # JTAGICE3 parameter from ATDF files
#       pgm_enable       = <instruction format> ;
#       chip_erase       = <instruction format> ;
#       # parameters for bootloaders
#       autobaud_sync    = <num> ;                # autobaud detection byte, default 0x30
#       factory_fcpu     = <num> ;                # F_CPU in Hz on reset and factory-set fuses
#
#       memory <memstr>
#           paged           = <yes/no> ;          # yes/no (flash of classic parts only)
#           offset          = <num> ;             # memory offset
#           size            = <num> ;             # bytes
#           page_size       = <num> ;             # bytes
#           num_pages       = <num> ;             # numeric
#           initval         = <num> ;             # factory setting of fuses and lockbits
#           bitmask         = <num> ;             # bits used (only in fuses and lockbits)
#           n_word_writes   = <num> ;             # TPI only: if set, number of words to write
#           min_write_delay = <num> ;             # micro-seconds
#           max_write_delay = <num> ;             # micro-seconds
#           readback        = <num> <num> ;       # pair of byte values
#           readback_p1     = <num> ;             # byte value (first component)
#           readback_p2     = <num> ;             # byte value (second component)
#           pwroff_after_write = <yes/no> ;       # yes/no
#           mode            = <num> ;             # STK500 v2 file parameter from ATDF files
#           delay           = <num> ;             #   "
#           blocksize       = <num> ;             #   "
#           readsize        = <num> ;             #   "
#           read            = <instruction format> ;
#           write           = <instruction format> ;
#           read_lo         = <instruction format> ;
#           read_hi         = <instruction format> ;
#           write_lo        = <instruction format> ;
#           write_hi        = <instruction format> ;
#           loadpage_lo     = <instruction format> ;
#           loadpage_hi     = <instruction format> ;
#           writepage       = <instruction format> ;
#       ;
#   ;
#
# If any of the above parameters are not specified, the default value
# of 0 is used for numerics (except for mcuid, hvupdi_variant, ocdrev,
# initval and bitmask, all of which default to -1, and for autobaud_sync
# which defaults to 0x30), or the empty string "" for string values. If
# a required parameter is left empty, AVRDUDE will complain. Almost all
# occurrences of numbers (with the exception of pin numbers and where
# they are separated by space, eg, in signature and readback) can also
# be given as simple expressions involving arithemtic and bitwise
# operators.
#
# Parts can also inherit parameters from previously defined parts
# using the following syntax. In this case specified integer and
# string values override parameter values from the parent part. New
# memory definitions are added to the definitions inherited from the
# parent. If, however, a new memory definition refers to an existing
# one of the same name for that part then, from v7.1, the existing
# memory definition is extended, and components overwritten with new
# values. Assigning NULL removes an inherited SPI instruction format,
# memory definition, control stack, eeprom or flash instruction, eg,
# as in memory "efuse" = NULL;
#
#   part parent <id>                              # quoted string
#       id               = <id> ;                 # quoted string
#       <any set of other parameters from the list above>
#     ;
#
# NOTES:
#   * 'devicecode' is the device code used by the STK500 (see codes
#       listed below)
#   * Not all memories will implement all instructions
#   * AVR Fuse bits and Lock bits are implemented as a type of memory
#   * Example memories are:
#       "flash", "eeprom", "fuse", "lfuse" (low fuse), "hfuse" (high
#       fuse), "signature", "calibration", "lock"
#   * The memory specified on the avrdude command line must match
#     one of the memories defined for the specified chip
#   * The pwroff_after_write flag causes avrdude to attempt to
#     power the device off and back on after an unsuccessful write to
#     the affected memory area if VCC programmer pins are defined. If
#     VCC pins are not defined for the programmer, a message
#     indicating that the device needs a power-cycle is printed out.
#     This flag was added to work around a problem with the
#     at90s4433/2333's; see the at90s4433 errata at:
#
#     https://www.microchip.com/content/dam/mchp/documents/OTH/ProductDocuments/DataSheets/doc1042.pdf
#
# INSTRUCTION FORMATS
#
#    Instruction formats are specified as a comma separated list of
#    string values containing information (bit specifiers) about each
#    of the 32 bits of the instruction.  Bit specifiers may be one of
#    the following formats:
#
#       '1'  = the bit is always set on input as well as output
#
#       '0'  = the bit is always clear on input as well as output
#
#       'x'  = the bit is ignored on input and output and set as 0
#
#       'a'  = the bit is an address bit; from v 7.1 the bit-number
#              is set to match the right bit position for the
#              instruction to "just work"
#
#       'aN' = the bit is the Nth address bit, bit-number = N, i.e., a12
#              is address bit 12 on input, a0 is address bit 0.
#
#       'i'  = the bit is an input data bit (can optionally be followed
#              by a memory bit position between 0 and 7 if that differs
#              from the bit-position in the SPI write command byte)
#
#       'o'  = the bit is an output data bit (can optionally be followed
#              by a memory bit position between 0 and 7)
#
#    Each instruction must be composed of 32 bit specifiers. The
#    instruction specification closely follows the instruction data
#    provided in Atmel's data sheets for their parts. Note that flash
#    addresses always refer to *word* addresses whilst all other
#    memory types specify *byte* addresses.
#
#    Example for signature read on the ATmega328P:
#      read = "0 0 1 1 0 0 0 0",  "0 0 0 x x x x x",
#             "x x x x x x a1 a0",  "o o o o o o o o";
#
#   As the address bit numbers in the SPI opcodes are highly
#   systematic, they don't really need to be specified. A compact
#   version of the format specification neither uses bit-numbers for
#   address lines nor spaces. If such a string is longer than 7
#   characters, then the characters 0, 1, x, a, i and o will be
#   recognised as the corresponding bit, whilst any of the characters
#   ., -, _ or / can act as arbitrary visual separators, which are
#   ignored. Examples:
#
#     loadpage_lo = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
#
#     loadpage_lo = "0100.0000", "000x.xxxx", "xxaa.aaaa", "iiii.iiii";
#
#
# The following are STK500 part device codes to use for the
# "devicecode" field of the part.  These came from Atmel's software
# section avr061.zip which accompanies the application note
# AVR061 available from:
#
#      https://ww1.microchip.com/downloads/en/Appnotes/doc2525.pdf
#

#define ATTINY10    0x10  /* the _old_ one that never existed! */
#define ATTINY11    0x11
#define ATTINY12    0x12
#define ATTINY15    0x13
#define ATTINY13    0x14

#define ATTINY22    0x20
#define ATTINY26    0x21
#define ATTINY28    0x22
#define ATTINY2313  0x23

#define AT90S1200   0x33

#define AT90S2313   0x40
#define AT90S2323   0x41
#define AT90S2333   0x42
#define AT90S2343   0x43

#define AT90S4414   0x50
#define AT90S4433   0x51
#define AT90S4434   0x52
#define ATMEGA48    0x59

#define AT90S8515   0x60
#define AT90S8535   0x61
#define AT90C8534   0x62
#define ATMEGA8515  0x63
#define ATMEGA8535  0x64

#define ATMEGA8     0x70
#define ATMEGA88    0x73
#define ATMEGA168   0x86

#define ATMEGA161   0x80
#define ATMEGA163   0x81
#define ATMEGA16    0x82
#define ATMEGA162   0x83
#define ATMEGA169   0x84

#define ATMEGA323   0x90
#define ATMEGA32    0x91

#define ATMEGA64    0xA0

#define ATMEGA103   0xB1
#define ATMEGA128   0xB2
#define AT90CAN128  0xB3
#define AT90CAN64   0xB3
#define AT90CAN32   0xB3

#define AT86RF401   0xD0

#define AT89START   0xE0
#define AT89S51     0xE0
#define AT89S52     0xE1

# The following table lists the devices in the original AVR910
# appnote:
# |Device |Signature | Code |
# +-------+----------+------+
# |tiny12 | 1E 90 05 | 0x55 |
# |tiny15 | 1E 90 06 | 0x56 |
# |       |          |      |
# | S1200 | 1E 90 01 | 0x13 |
# |       |          |      |
# | S2313 | 1E 91 01 | 0x20 |
# | S2323 | 1E 91 02 | 0x48 |
# | S2333 | 1E 91 05 | 0x34 |
# | S2343 | 1E 91 03 | 0x4C |
# |       |          |      |
# | S4414 | 1E 92 01 | 0x28 |
# | S4433 | 1E 92 03 | 0x30 |
# | S4434 | 1E 92 02 | 0x6C |
# |       |          |      |
# | S8515 | 1E 93 01 | 0x38 |
# | S8535 | 1E 93 03 | 0x68 |
# |       |          |      |
# |mega32 | 1E 95 01 | 0x72 |
# |mega83 | 1E 93 05 | 0x65 |
# |mega103| 1E 97 01 | 0x41 |
# |mega161| 1E 94 01 | 0x60 |
# |mega163| 1E 94 02 | 0x64 |

# Appnote AVR109 also has a table of AVR910 device codes, which
# lists:
# dev         avr910   signature
# ATmega8     0x77     0x1E 0x93 0x07
# ATmega8515  0x3B     0x1E 0x93 0x06
# ATmega8535  0x6A     0x1E 0x93 0x08
# ATmega16    0x75     0x1E 0x94 0x03
# ATmega162   0x63     0x1E 0x94 0x04
# ATmega163   0x66     0x1E 0x94 0x02
# ATmega169   0x79     0x1E 0x94 0x05
# ATmega32    0x7F     0x1E 0x95 0x02
# ATmega323   0x73     0x1E 0x95 0x01
# ATmega64    0x46     0x1E 0x96 0x02
# ATmega128   0x44     0x1E 0x97 0x02
#
# These codes refer to "BOOT" device codes which are apparently
# different than standard device codes, for whatever reasons
# (often one above the standard code).

# There are several extended versions of AVR910 implementations around
# in the Internet.  These add the following codes (only devices that
# actually exist are listed):

# ATmega8515    0x3A
# ATmega128     0x43
# ATmega64      0x45
# ATtiny26      0x5E
# ATmega8535    0x69
# ATmega32      0x72
# ATmega16      0x74
# ATmega8       0x76
# ATmega169     0x78

#
# Overall avrdude defaults; suitable for ~/.config/avrdude/avrdude.rc
#
default_parallel   = "lpt1";
default_serial     = "com1";
default_spi        = "";
# default_baudrate = 115200;
# default_bitclock = 2.5;
default_linuxgpio  = "unknown";
allow_subshells    = no;







#
# PROGRAMMER DEFINITIONS
#

#------------------------------------------------------------
# dryrun
#------------------------------------------------------------

# Using -c dryrun is a good way to get acquainted with AVRDUDE and its
# command line -U memory operations, -T terminal commands or the
# interactive terminal -t. No hardware needs to be connected, as the
# dryrun programmer emulates what can be expected to happen with a real
# -c programmer and a corresponding connected physical programmer or a
# directly connected board when it has a bootloader.
#
# Examples:
# avrdude -c dryrun -p ATmega328P -t # Interactive terminal: enter help
# avrdude -c dryrun -p ATmega2560 -U flash:w:myapplication.hex:i
# avrdude -c dryrun -p AVR64DB48 -Tconfig

programmer # dryrun
    id                     = "dryrun";
    desc                   = "Emulates programming without a programmer";
    type                   = "dryrun";
    prog_modes             = PM_TPI | PM_ISP | PM_PDI | PM_UPDI | PM_HVSP | PM_HVPP | PM_aWire;
;

#------------------------------------------------------------
# dryboot
#------------------------------------------------------------

# Like -c dryrun the -c dryboot programmer only emulates programming,
# albeit for communicating to bootloaders, ie, without a physical
# programmer between the host and the target AVR part. AVRDUDE behaves
# slightly different when talking to a bootloader: Whilst for most classic
# parts the flash memory looks like NOR-memory, ie, cleared bits cannot be
# set and therefore programming requires a chip erase first, bootloaders
# do have the power of erasing a flash page (setting it to all 0xff)
# before writing a page. This requires AVRDUDE to behave differently when
# talking to a bootloader, which it recognises by the prog_modes = PM_SPM
# setting below. -c dryboot allows exploring these differences at an
# emulation level.

programmer # dryboot
    id                     = "dryboot";
    desc                   = "Emulates bootloader programming without a programmer";
    type                   = "dryrun";
    prog_modes             = PM_SPM;
;

#------------------------------------------------------------
# wiring
#------------------------------------------------------------

# http://wiring.org.co/
# Basically STK500v2 protocol, with some glue to trigger the bootloader

programmer # wiring
    id                     = "wiring";
    desc                   = "Wiring for bootloader using STK500 v2 protocol";
    type                   = "wiring";
    prog_modes             = PM_SPM;
    connection_type        = serial;
;

#------------------------------------------------------------
# arduino
#------------------------------------------------------------

# Serves optiboot bootloaders and others using the STK500v1 protocol;
# it is superseded by the more modern -c urclock programmer, see below.
# The programmer is named after the popular embedded programming
# environment Arduino that has for a long time used optiboot
# bootloaders. Same as the stk500v1 except that it resets the attached
# board and treats EEPROM as the optiboot bootloaders expect.

programmer # arduino
    id                     = "arduino";
    desc                   = "Arduino for bootloader using STK500 v1 protocol";
    type                   = "arduino";
    prog_modes             = PM_SPM;
    connection_type        = serial;
;

#------------------------------------------------------------
# urclock
#------------------------------------------------------------

# Serves urboot and optiboot bootloaders
#  - Reads/writes flash/EEPROM via the MCU bootloader and a serial connection
#  - Automatically resets an attached board via RTS/DTR into bootloader mode
#  - Implements urprotocol, a skeleton version of STK500v1
#  - Supports vector bootloaders by patching interrupt vectors during upload:
#     + Vector bootloaders run on all parts, no need for a HW boot section
#     + Can be much smaller than the smallest HW boot section of a part, eg,
#       256 bytes for ATmega2560 (smallest HW boot section is 1024 bytes)
#  - Checks sizes of applications so they don't overwrite the bootloader
#  - Keeps the bootloader alive during interactive terminal sessions
#  - Provides a 4-byte metadata interface in top flash for
#     + Allowing applications to utilise unused flash similar to EEPROM
#     + Storing in top flash the file name and its last-modified date
#     + Displaying file name and date of the last uploaded application
#
# See https://github.com/stefanrueger/urboot

programmer # urclock
    id                     = "urclock";
    desc                   = "Urclock programmer for urboot bootloaders using urprotocol";
    type                   = "urclock";
    prog_modes             = PM_SPM;
    connection_type        = serial;
;

#------------------------------------------------------------
# xbee
#------------------------------------------------------------

# The XBeeBoot bootloader provides XBee Series 2 Over-The-Air
# firmware update capability as well as supporting direct
# firmware update via the stk500v1 protocol. See
# https://github.com/davidsainty/xbeeboot
# for details.

programmer # xbee
    id                     = "xbee";
    desc                   = "XBee for Series 2 Over-The-Air (XBeeBoot) bootloader using STK500 v1 protocol";
    type                   = "xbee";
    prog_modes             = PM_SPM;
    connection_type        = serial;
;

#------------------------------------------------------------
# ft2232h
#------------------------------------------------------------

# FTDI USB to serial converters can be used for ISP programming of
# classic AVRs, and quite a few programmers are based on this. The
# ft2232h programmer, named after the FTDI converter chip,
# interfaces with the chips on these programmers (and more):
#  - http://real.kiev.ua/old/avreal/en/adapters
#  - http://www.amontec.com/jtagkey.shtml and .../jtagkey-tiny.shtml
#  - http://www.olimex.com/dev/arm-usb-ocd.html, arm-usb-tiny.html
#  - http://www.ethernut.de/en/hardware/turtelizer/index.html
#  - https://web.archive.org/web/20161221220118/http://elk.informatik.fh-augsburg.de/hhweb/doc/openocd/usbjtag/usbjtag.html
#  - http://dangerousprototypes.com/docs/FT2232_breakout_board
#  - http://flashrom.org/FT2232SPI_Programmer
#
# The programmer will look for a specific device and use the first
# one found. If you have multiple devices, and they give out serial
# numbers, a different entry for each of them can be created in a
# per-user ~/.avrduderc or avrdude.rc entry and the usbsn = "...";
# field added to distinguish between them.
#
# Avrftdi-type programmers utilise the Multi-Protocol Synchronous Serial
# Engine (MPSSE) of the FTDI ICs, which determines the pin numbers for the
# main ISP signals (sck, sdo, sdi). The reset pin can differ, though.
#
# Data sheet of the FT2232H chip:
#   https://ftdichip.com/wp-content/uploads/2020/08/DS_FT2232H.pdf

programmer # avrftdi
    id                     = "avrftdi", "2232h";
    desc                   = "FT2232H/D based generic programmer";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0x6010;
    usbdev                 = "A";
# ISP-signals - lower ADBUS-Nibble (default)
    reset                  = 3; # AD3 (TMS)
    sck                    = 0; # AD0 (TCK)
    sdo                    = 1; # AD1 (TDI)
    sdi                    = 2; # AD2 (TDO)
;

#------------------------------------------------------------
# ft2232h
#------------------------------------------------------------

# The ft2232h programmer is the same as above 2232h but it can be
# used to address the port of a particular board via -P ft2232h

programmer parent "2232h" # ft2232h
    id                     = "ft2232h";
    is_serialadapter       = yes;
;

#------------------------------------------------------------
# 2232HIO
#------------------------------------------------------------

# This is an implementation of the above 2232h with a buffer IC
# (74AC244) and 4 LEDs directly attached, all active low.

programmer parent "2232h" # 2232hio
    id                     = "2232hio";
    desc                   = "2232hio based on FT2232H with buffer and LEDs";
    buff                   = ~4;
# LED SIGNALs
    errled                 = ~11;
    rdyled                 = ~14;
    pgmled                 = ~13;
    vfyled                 = ~12;
;

#------------------------------------------------------------
# tigard
#------------------------------------------------------------

# Tigard - FT2232H based multi-protocol tool for hardware hacking
# https://github.com/tigard-tools/tigard

programmer parent "2232h" # tigard
    id                     = "tigard";
    desc                   = "Tigard interface board";
    usbdev                 = "B";
# Reset is different to the FT2232H; sck, sdo, sdi remain at 0, 1, 2
    reset                  = 5; # BD5 (GPIOL1)
;

#------------------------------------------------------------
# avrisp-u
#------------------------------------------------------------

# Kanda's low cost FT2232H based programmer. Uses a different reset pin.
# Adds a buffer and a LED indicating that the programming is in progress.
# https://www.kanda.com/products/Kanda/AVRISP-U.html

programmer parent "2232h" # avrisp-u
    id                     = "avrisp-u";
    desc                   = "Kanda AVRISP-U";
    usbsn                  = "AVR";
    buff                   = ~5;
    reset                  = 4;
    pgmled                 = ~10;
;

#------------------------------------------------------------
# ft2232h_jtag
#------------------------------------------------------------

# Here a FTDI ft2232h chip is used for JTAG programming.

programmer # ft2232h_jtag
    id                     = "ft2232h_jtag";
    desc                   = "FT2232H based generic JTAG programmer";
    type                   = "avrftdi_jtag";
    prog_modes             = PM_JTAG;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0x6010;
    usbdev                 = "A";
# JTAG-signals - lower ADBUS-Nibble (default)
    tck                    = 0; # AD0 (TCK)
    tdi                    = 1; # AD1 (TDI)
    tdo                    = 2; # AD2 (TDO)
    tms                    = 3; # AD3 (TMS)
;

#------------------------------------------------------------
# ft4232h
#------------------------------------------------------------

# The FT4232H can be treated as FT2232H but with a different USB
# device ID of 0x6011

programmer parent "ft2232h" # ft4232h
    id                     = "ft4232h";
    desc                   = "FT4232H based generic programmer";
    usbpid                 = 0x6011;
;

#------------------------------------------------------------
# 4232h
#------------------------------------------------------------

programmer parent "2232h" # 4232h
    id                     = "4232h";
    desc                   = "FT4232H based generic programmer";
    usbpid                 = 0x6011;
;

#------------------------------------------------------------
# jtagkey
#------------------------------------------------------------

programmer # jtagkey
    id                     = "jtagkey";
    desc                   = "Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x0403;
#   Note: This PID is used in all JTAGKey variants
    usbpid                 = 0xcff8;
    usbdev                 = "A";
    buff                   = ~4;
#   ISP-signals => 20 - Pin connector on JTAGKey
#   The colours are on the 20 pin breakout cable from Amontec
    reset                  = 3; # TMS 7 violet
    sck                    = 0; # TCK 9 white
    sdo                    = 1; # TDI 5 green
    sdi                    = 2; # TDO 13 orange
#   VTG           VREF 1 brown with red tip
#   GND           GND 20 black
;

#------------------------------------------------------------
# ft232h
#------------------------------------------------------------

programmer # ft232h
    id                     = "ft232h";
    desc                   = "FT232H based generic programmer";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    is_serialadapter       = yes;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0x6014;
    usbdev                 = "A";
# ISP-signals
    reset                  = 3; # AD3 (TMS)
    sck                    = 0; # AD0 (TCK)
    sdo                    = 1; # AD1 (TDI)
    sdi                    = 2; # AD2 (TDO)
;

#------------------------------------------------------------
# ft232h_jtag
#------------------------------------------------------------

programmer # ft232h_jtag
    id                     = "ft232h_jtag";
    desc                   = "FT232H based generic JTAG programmer";
    type                   = "avrftdi_jtag";
    prog_modes             = PM_JTAG;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0x6014;
    usbdev                 = "A";
# JTAG-signals
    tck                    = 0; # AD0 (TCK)
    tdi                    = 1; # AD1 (TDI)
    tdo                    = 2; # AD2 (TDO)
    tms                    = 3; # AD3 (TMS)
;

#------------------------------------------------------------
# um232h
#------------------------------------------------------------

# Pin J2-7 (AD0) is SCK
# Pin J2-8 (AD1) is SDO
# Pin J2-9 (AD2) is SDI
# Pin J2-10 (AD3) is RESET
# Pin J2-6 is GND
# Use the -b flag to set the SPI clock rate eg -b 3750000 is the fastest I could get
# a 16MHz Atmega1280 to program reliably.  The 232H is conveniently 5V tolerant.

programmer parent "ft232h" # um232h
    id                     = "um232h";
    desc                   = "UM232H module from FTDI";
    is_serialadapter       = no;
;

#------------------------------------------------------------
# c232hm
#------------------------------------------------------------

# Orange (Pin 2) is SCK
# Yellow (Pin 3) is SDO
# Green (Pin 4) is SDI
# Brown (Pin 5) is RESET
# Black (Pin 10) is GND
# Use the -b flag to set the SPI clock rate eg -b 3750000 is the fastest I could get
# a 16MHz Atmega1280 to program reliably.  The 232H is conveniently 5V tolerant.

programmer parent "um232h" # c232hm
    id                     = "c232hm";
    desc                   = "C232HM cable from FTDI";
;

#------------------------------------------------------------
# o-link
#------------------------------------------------------------

# On the adapter you can read "O-Link". On the PCB is printed "OpenJTAG v3.1".
# You can find it as "OpenJTAG ARM JTAG USB" in the internet. Note there are also
# several projects called Open JTAG, which are completely different. Some other
# sources call it O-Link or just have a look at ebay ... It is basically the same
# entry as jtagkey with different usb ids. See www.100ask.net

programmer parent "jtagkey" # o-link
    id                     = "o-link";
    desc                   = "O-Link, OpenJTAG ARM JTAG USB";
    usbvid                 = 0x1457;
    usbpid                 = 0x5118;
    usbvendor              = "www.100ask.net";
    usbproduct             = "USB<=>JTAG&RS232";
;

#------------------------------------------------------------
# openmoko
#------------------------------------------------------------

# http://wiki.openmoko.org/wiki/Debug_Board_v3

programmer # openmoko
    id                     = "openmoko";
    desc                   = "Openmoko debug board (v3)";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    usbvid                 = 0x1457;
    usbpid                 = 0x5118;
    usbdev                 = "A";
    reset                  = 3; # TMS 7
    sck                    = 0; # TCK 9
    sdo                    = 1; # TDI 5
    sdi                    = 2; # TDO 13
;

#------------------------------------------------------------
# lm3s811
#------------------------------------------------------------

# Only Rev. A boards.
# Schematic and user manual: http://www.cs.put.poznan.pl/wswitala/download/pdf/811EVBK.pdf

programmer # lm3s811
    id                     = "lm3s811";
    desc                   = "Luminary Micro LM3S811 Eval Board (Rev. A)";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0xbcd9;
    usbdev                 = "A";
    usbvendor              = "LMI";
    usbproduct             = "LM3S811 Evaluation Board";
# Enable correct buffers
    buff                   = 7;
# ISP-signals - lower ACBUS-Nibble (default)
    reset                  = 3;
    sck                    = 0;
    sdo                    = 1;
    sdi                    = 2;
;

#------------------------------------------------------------
# tumpa
#------------------------------------------------------------

# First SPI connector
# User manual: https://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User%27s_Manual

programmer parent "2232h" # tumpa
    id                     = "tumpa";
    desc                   = "TIAO USB Multi-Protocol Adapter";
    usbpid                 = 0x8a98;
    usbvendor              = "TIAO";
;

#------------------------------------------------------------
# tumpa-b
#------------------------------------------------------------

# Second SPI connector

programmer parent "tumpa" # tumpa-b
    id                     = "tumpa-b";
    usbdev                 = "B";
;

#------------------------------------------------------------
# tumpa_jtag
#------------------------------------------------------------

programmer parent "ft2232h_jtag" # tumpa_jtag
    id                     = "tumpa_jtag";
    desc                   = "TIAO USB Multi-Protocol Adapter (JTAG)";
    usbpid                 = 0x8a98;
    usbvendor              = "TIAO";
    buff                   = ~11;
    reset                  = 4; # RST AD4 (Pin 15)
;

#------------------------------------------------------------
# ktlink
#------------------------------------------------------------

# Kristech KT-LINK FT2232H interface with IO switching and voltage buffers.
# Created on 20220410 by CeDeROM Tomasz CEDRO (www.cederom.io).
# Interface DataSheet: https://kristech.pl/files/KT-LINK-UM-ENG.pdf
#
# AVRDUDE FT2232H PIN NUMBER DECODE:
#  | 0      | 1      | .. | 7      | 8      | 9      | .. | 15     |
#  | ADBUS0 | ADBUS1 | .. | ADBUS7 | ACBUS0 | ACBUS1 | .. | ACBUS7 |
#
# KT-LINK JTAG CONN:
#  1=Vsense(->EXT13), 19=5V(EXT1->EXT3), 20=GND, 3=TPIRST, 9=TPICLK, 7=TPIDATA.
#
# INTERNALS CONFIGURATION ("~" MEANS ACTIVE LOW):
#  ~TRST_EN=10(ACBUS2), ~CLK_EN=14(ACBUS6), ~SDO_EN=13(ACBUS5),
#  TMS_SEL=5(ADBUS5), ~TMS_EN=12(ACBUS4), LED=~15(ACBUS7).
#
# CONNECTION NOTES:
#  * Connect EXT connector pin 1 with 3 to get 5V on JTAG connector pin 19.
#  * Connect JTAG connector pin 1 to 5V (i.e. EXT pin 13 or JTAG pin 19).
#  * For TPI connection use resistors: TDO --[470R]-- TPIDATA --[470R]-- TDI.
#  * Powering target from JTAG pin 19 allows KT-LINK current measurement.

programmer # ktlink
    id                     = "ktlink";
    desc                   = "KT-LINK FT2232H interface with IO switching and voltage buffers";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0xbbe2;
    usbdev                 = "A";
    buff                   = 5, ~10, ~13, ~14;
    reset                  = 8;
    sck                    = 0;
    sdo                    = 1;
    sdi                    = 2;
    rdyled                 = ~15;
;

#------------------------------------------------------------
# digilent-hs2
#------------------------------------------------------------

# Digilent JTAG HS2 programmer. FT232H-based dongle with buffers.
# https://digilent.com/reference/_media/reference/programmers/jtag-hs2/jtag-hs2_rm.pdf

programmer # digilent-hs2
    id                     = "digilent-hs2";
    desc                   = "Digilent JTAG HS2 (MPSSE)";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0x6014;
    usbdev                 = "A";
    buff                   = 5, 6, 7;
    reset                  = 3;
    sck                    = 0;
    sdo                    = 1;
    sdi                    = 2;
;

#------------------------------------------------------------
# flyswatter2
#------------------------------------------------------------

# FT2232H based JTAG programmer. Requires a buff pin to be set.
# https://www.tincantools.com/flyswatter2

programmer # flyswatter2
    id                     = "flyswatter2";
    desc                   = "TinCan Tools Flyswatter 2";
    type                   = "avrftdi";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x0403;
    usbpid                 = 0x6010;
    usbdev                 = "A";
    usbvendor              = "TinCanTools";
    usbproduct             = "Flyswatter2";
    buff                   = ~6;
    reset                  = 3;
    sck                    = 0;
    sdo                    = 1;
    sdi                    = 2;
    rdyled                 = ~11;
    pgmled                 = ~12;
;

#------------------------------------------------------------
# serialupdi
#------------------------------------------------------------

# The SerialUPDI programmer implementation is based on the
# Microchip pymcuprog utility. In a nutshell, this programmer
# consists of simple USB->UART adapter, diode and couple of
# resistors. It uses serial connection to provide UPDI interface.
# See https://github.com/microchip-pic-avr-tools/pymcuprog
# for details.

programmer # serialupdi
    id                     = "serialupdi";
    desc                   = "SerialUPDI";
    type                   = "serialupdi";
    prog_modes             = PM_UPDI;
    connection_type        = serial;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# avrisp
#------------------------------------------------------------

# The original RS232 based Atmel AVR ISP programmer

programmer # avrisp
    id                     = "avrisp";
    desc                   = "Atmel AVR ISP";
    type                   = "stk500";
    prog_modes             = PM_ISP;
    connection_type        = serial;
;

#------------------------------------------------------------
# avrispv2
#------------------------------------------------------------

programmer # avrispv2
    id                     = "avrispv2";
    desc                   = "Atmel AVR ISP v2";
    type                   = "stk500v2";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = serial;
;

#------------------------------------------------------------
# avrispmkII
#------------------------------------------------------------

# Atmel AVR ISP mkII programmer. See
# https://www.microchip.com/en-us/development-tool/atavrisp2
# for details.

programmer # avrispmkII
    id                     = "avrispmkII", "avrisp2";
    desc                   = "Atmel AVR ISP mkII";
    type                   = "stk500v2";
    prog_modes             = PM_TPI | PM_ISP | PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
;

#------------------------------------------------------------
# buspirate
#------------------------------------------------------------

# Bus Pirate in AVR programming mode (hardware v3 and v4).
# See http://dangerousprototypes.com/docs/Bus_Pirate
# for details.
#
# PIN  ISP
# > 1  GND
#   2  (3.3V)
#   3  (5.0V)
#   4
#   5
#   6  (XTAL1)
#   7  SCK
#   8  SDO
#   9  RST
#  10  SDI

programmer # buspirate
    id                     = "buspirate";
    desc                   = "The Bus Pirate";
    type                   = "buspirate";
    prog_modes             = PM_ISP;
    connection_type        = serial;
;

#------------------------------------------------------------
# buspirate_bb
#------------------------------------------------------------

# Bus pirate in bit banging mode (hardware v3 and v4).

programmer # buspirate_bb
    id                     = "buspirate_bb";
    desc                   = "The Bus Pirate (bitbang interface, supports TPI)";
    type                   = "buspirate_bb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = serial;
  # pins are bits in bitbang byte (numbers are 87654321)
  # 1|POWER|PULLUP|AUX|SDO|CLK|SDI|CS
    reset                  = 1;
    sck                    = 3;
    sdo                    = 4;
    sdi                    = 2;
  # vcc                    = 7; # Internally set independent of this setting
;

#------------------------------------------------------------
# stk500
#------------------------------------------------------------

# This is supposed to be the "default" STK500 entry.
# Attempts to select the correct firmware version
# by probing for it.  Better use one of the entries
# below instead.

programmer # stk500
    id                     = "stk500";
    desc                   = "Atmel STK500 (probes STK500v2 first then STK500v1)";
    type                   = "stk500generic";
    prog_modes             = PM_ISP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = serial;
;

#------------------------------------------------------------
# stk500v1
#------------------------------------------------------------

# The original STK500 protocol. Used by the Arduino as ISP
# programmer and various bootloaders.
# See AVR061 for details.

programmer # stk500v1
    id                     = "stk500v1";
    desc                   = "Atmel STK500 version 1.x firmware";
    type                   = "stk500";
    prog_modes             = PM_ISP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = serial;
;

#------------------------------------------------------------
# arduino_as_isp
#------------------------------------------------------------

# Not to be confused with arduinoISP, this is the same as `-c stk500v1`
# but treats EEPROM r/w correctly for arduino_as_isp programmers
# See https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/
# for details.

programmer # arduino_as_isp
    id                     = "arduino_as_isp";
    desc                   = "Arduino board as programmer using arduino as ISP firmware";
    type                   = "stk500";
    prog_modes             = PM_ISP;
    connection_type        = serial;
    baudrate               = 19200;
;

#------------------------------------------------------------
# mib510
#------------------------------------------------------------

# The MIB510 is a serial gateway that can program AVRs over
# ISP or TPI using the stk500v1 protocol. See
# http://www.cmt-gmbh.de/Produkte/WirelessSensorNetworks/MIB510.html
# for details.

programmer # mib510
    id                     = "mib510";
    desc                   = "Crossbow MIB510 programming board";
    type                   = "stk500";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = serial;
;

#------------------------------------------------------------
# stk500v2
#------------------------------------------------------------

# Version 2 of the STK500 protocol. See AVR068 for details.

programmer # stk500v2
    id                     = "stk500v2", "scratchmonkey";
    desc                   = "Atmel STK500 version 2.x firmware";
    type                   = "stk500v2";
    prog_modes             = PM_TPI | PM_ISP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = serial;
;

#------------------------------------------------------------
# stk500pp
#------------------------------------------------------------

programmer # stk500pp
    id                     = "stk500pp", "scratchmonkey_pp";
    desc                   = "Atmel STK500 v2 in parallel programming mode";
    type                   = "stk500pp";
    prog_modes             = PM_HVPP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = serial;
;

#------------------------------------------------------------
# stk500hvsp
#------------------------------------------------------------

programmer # stk500hvsp
    id                     = "stk500hvsp", "scratchmonkey_hvsp";
    desc                   = "Atmel STK500 v2 in high-voltage serial programming mode";
    type                   = "stk500hvsp";
    prog_modes             = PM_HVSP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = serial;
;

#------------------------------------------------------------
# stk600
#------------------------------------------------------------

# STK600 development board. See
# https://www.microchip.com/en-us/development-tool/atstk600
# and AVR079 for details.

programmer # stk600
    id                     = "stk600";
    desc                   = "Atmel STK600";
    type                   = "stk600";
    prog_modes             = PM_TPI | PM_ISP | PM_PDI;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = usb;
;

#------------------------------------------------------------
# stk600pp
#------------------------------------------------------------

programmer # stk600pp
    id                     = "stk600pp";
    desc                   = "Atmel STK600 in parallel programming mode";
    type                   = "stk600pp";
    prog_modes             = PM_HVPP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = usb;
;

#------------------------------------------------------------
# stk600hvsp
#------------------------------------------------------------

programmer # stk600hvsp
    id                     = "stk600hvsp";
    desc                   = "Atmel STK600 in high-voltage serial programming mode";
    type                   = "stk600hvsp";
    prog_modes             = PM_HVSP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ | HAS_FOSC_ADJ | HAS_VAREF_ADJ;
    connection_type        = usb;
;

#------------------------------------------------------------
# avr910
#------------------------------------------------------------

# The AVR910 is a programmer implementation based on the
# AVR910 application note.

programmer # avr910
    id                     = "avr910";
    desc                   = "Atmel Low Cost Serial Programmer";
    type                   = "avr910";
    prog_modes             = PM_ISP;
    connection_type        = serial;
;

#------------------------------------------------------------
# ft245r
#------------------------------------------------------------

# Ftdi_syncbb-type programmers utilise FTDI chips for programming
# in a bit-banging mode. In contrast to avrftdi-type programmers,
# the pin mapping to the main ISP signals (reset, sck, sdo, sdi) is
# somewhat arbitrary and will be determined by the actual routing
# of the FTDI IC pins to the ISP header of the physical programmer.

programmer # ft245r
    id                     = "ft245r";
    desc                   = "FT245R based generic programmer";
    type                   = "ftdi_syncbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    reset                  = 4; # D4
    sck                    = 0; # D0
    sdo                    = 2; # D2
    sdi                    = 1; # D1
;

#------------------------------------------------------------
# ft232r
#------------------------------------------------------------

programmer # ft232r
    id                     = "ft232r";
    desc                   = "FT232R based generic programmer";
    type                   = "ftdi_syncbb";
    prog_modes             = PM_TPI | PM_ISP;
    is_serialadapter       = yes;
    connection_type        = usb;
    usbvid                 = 0x0403; # For use as serial adapter
    usbpid                 = 0x6001; # "
    reset                  = 4;  # DTR
    sck                    = 0;  # TxD
    sdo                    = 2;  # RTS
    sdi                    = 1;  # RxD
;

#------------------------------------------------------------
# bwmega
#------------------------------------------------------------

# see http://www.bitwizard.nl/wiki/index.php/FTDI_ATmega

programmer # bwmega
    id                     = "bwmega";
    desc                   = "BitWizard ftdi_atmega builtin programmer";
    type                   = "ftdi_syncbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    reset                  = 7;  # RI
    sck                    = 6;  # DCD
    sdo                    = 3;  # CTS
    sdi                    = 5;  # DSR
;

#------------------------------------------------------------
# arduino-ft232r
#------------------------------------------------------------

# This programmer helps programming the Arduino Diecimila, NG and
# Duemilanove (but not the Uno) without bootloader or external
# programmer using the on-board FT232RL chip. Instructions here:
# https://make.kosakalab.com/arduino/bootloader/index_en.html
# Note that the -c diecimila avrdude.conf entry mentioned in above post
# is the same as the -c arduino-ft232r entry here.

programmer # arduino-ft232r
    id                     = "arduino-ft232r", "diecimila";
    desc                   = "Arduino: FT232R connected to ISP";
    type                   = "ftdi_syncbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    reset                  = 7;  # RI  X3(4)
    sck                    = 5;  # DSR X3(2)
    sdo                    = 6;  # DCD X3(3)
    sdi                    = 3;  # CTS X3(1)
;

#------------------------------------------------------------
# tc2030
#------------------------------------------------------------

# See https://www.tag-connect.com/product-category/products/cables/ftdi
# for details.

programmer # tc2030
    id                     = "tc2030";
    desc                   = "Tag-Connect TC2030";
    type                   = "ftdi_syncbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
  #                      FOR TPI devices:
    reset                  = 3;  # CTS = D3 (wire to ~RESET)
    sck                    = 2;  # RTS = D2 (wire to SCK)
    sdo                    = 0;  # TxD = D0 (wire to TPIDATA via 1k resistor)
    sdi                    = 1;  # RxD = D1 (wire to TPIDATA directly)
;

#------------------------------------------------------------
# uncompatino
#------------------------------------------------------------

# There is a ATmega328P kit PCB called "uncompatino".
# This board allows ISP via its on-board FT232R.
# This is designed like Arduino Duemilanove but has no standard ICPS header.
# Its 4 pairs of pins are shorted to enable ftdi_syncbb.
# http://akizukidenshi.com/catalog/g/gP-07487/
# http://akizukidenshi.com/download/ds/akizuki/k6096_manual_20130816.pdf

programmer # uncompatino
    id                     = "uncompatino";
    desc                   = "uncompatino with all pairs of pins shorted";
    type                   = "ftdi_syncbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    reset                  = 7; # ri
    sck                    = 5; # dsr
    sdo                    = 6; # dcd
    sdi                    = 3; # cts
;

#------------------------------------------------------------
# ttl232r
#------------------------------------------------------------

# FTDI USB to serial cable TTL-232R-5V with a custom adapter for ICSP
#  - https://ftdichip.com/product-category/products/cables/usb-ttl-serial-cable-series/
#  - http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf
#
# For ICSP pinout see, e.g., http://ww1.microchip.com/downloads/en/DeviceDoc/doc2562.pdf
# (Figure 1. ISP6PIN header pinout and Table 1. Connections required for ISP ...)
# TTL-232R GND 1 Black  -> ICPS GND   (pin 6)
# TTL-232R CTS 2 Brown  -> ICPS SDO   (pin 4)
# TTL-232R VCC 3 Red    -> ICPS VCC   (pin 2)
# TTL-232R TXD 4 Orange -> ICPS RESET (pin 5)
# TTL-232R RXD 5 Yellow -> ICPS SCK   (pin 3)
# TTL-232R RTS 6 Green  -> ICPS SDI   (pin 1)
#
# Except for VCC and GND, you can connect arbitrary pairs as long as the
# following table is adjusted.

programmer # ttl232r
    id                     = "ttl232r";
    desc                   = "FTDI TTL232R-5V with ICSP adapter";
    type                   = "ftdi_syncbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    reset                  = 0; # txd
    sck                    = 1; # rxd
    sdo                    = 3; # cts
    sdi                    = 2; # rts
;

#------------------------------------------------------------
# usbasp
#------------------------------------------------------------

# From http://www.fischl.de/usbasp
# USBasp is a USB in-circuit programmer for Atmel AVR controllers. It
# simply consists of an ATmega88 or an ATmega8 and a couple of passive
# components. The programmer uses a firmware-only USB driver, no
# special USB controller is needed.
#
# Firmware, schematics and drivers are available under above URL, too.
#
# Alternative firmware for the external programmer:
#
# - https://github.com/mariusgreuel/USBasp
#   Windows OS descriptor to load WinUSB driver automatically
#
# - https://github.com/nerdralph/usbasp
#   WCID compliant, meaning it should work on Windows without any
#   driver or .inf install; default SCK clock of 1.5 MHz and automatic
#   SCK slowing if target does not respond; PORTD is left as input, so
#   this firmware also works with USBISP modules, eg,
#   https://www.sciencetronics.com/greenphotons/?p=938
#
# - https://github.com/dioannidis/usbasp
#   As above plus HID UART support, setting unique serial number and
#   AT89S51/AT89S52 support

programmer # usbasp
    id                     = "usbasp";
    desc                   = "USBasp ISP and TPI programmer";
    type                   = "usbasp";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x16c0; # VOTI
    usbpid                 = 0x05dc; # Obdev's free shared PID
    usbvendor              = "www.fischl.de";
    usbproduct             = "USBasp";
  # Old usbasp from fischl.de:
  # usbvid                 = 0x03EB; # ATMEL
  # usbpid                 = 0xC7B4; # (unoffical) USBasp
  # usbvendor              = "www.fischl.de";
  # usbproduct             = "USBasp";
;

#------------------------------------------------------------
# nibobee
#------------------------------------------------------------

# http://www.nicai-systems.com/en/nibobee

programmer # nibobee
    id                     = "nibobee";
    desc                   = "NIBObee";
    type                   = "usbasp";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x16c0; # VOTI
    usbpid                 = 0x092f; # NIBObee PID
    usbvendor              = "www.nicai-systems.com";
    usbproduct             = "NIBObee";
;

#------------------------------------------------------------
# usbasp-clone
#------------------------------------------------------------

programmer # usbasp-clone
    id                     = "usbasp-clone";
    desc                   = "Any usbasp clone with correct VID/PID";
    type                   = "usbasp";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x16c0; # VOTI
    usbpid                 = 0x05dc; # Obdev's free shared PID
;

#------------------------------------------------------------
# usbtiny
#------------------------------------------------------------

# https://learn.adafruit.com/usbtinyisp
#
# The ISP USBtiny programmer can also be used for TPI programming.
# In that case, a resistor of 1 kOhm is needed between SDI and SDO
# pins of the connector, and SDI (pin 1 of the 6-pin connector)
# connects to TPIDATA.

programmer # usbtiny
    id                     = "usbtiny";
    desc                   = "USBtiny simple USB programmer";
    type                   = "usbtiny";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x1781;
    usbpid                 = 0x0c9f;
;

#------------------------------------------------------------
# arduino_gemma
#------------------------------------------------------------

# https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/gemma

programmer # arduino_gemma
    id                     = "arduino_gemma";
    desc                   = "Arduino Gemma bootloader disguised as USBtiny";
    type                   = "usbtiny";
    prog_modes             = PM_SPM;
    connection_type        = usb;
    usbvid                 = 0x2341;
    usbpid                 = 0x0c9f;
;

#------------------------------------------------------------
# adafruit_gemma
#------------------------------------------------------------

# https://github.com/adafruit/Adafruit-Trinket-Gemma-Bootloader

programmer # adafruit_gemma
    id                     = "adafruit_gemma";
    desc                   = "Adafruit Trinket Gemma bootloader disguised as USBtiny";
    type                   = "usbtiny";
    prog_modes             = PM_SPM;
    connection_type        = usb;
    usbvid                 = 0x1781;
    usbpid                 = 0x0c9f;
;

#------------------------------------------------------------
# arduinoisp
#------------------------------------------------------------

# Arduino LLC branded USBtiny programmer
# https://docs.arduino.cc/retired/boards/arduino-isp/

programmer # arduinoisp
    id                     = "arduinoisp";
    desc                   = "Arduino ISP Programmer";
    type                   = "usbtiny";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x2341;
    usbpid                 = 0x0049;
;

#------------------------------------------------------------
# arduinoisporg
#------------------------------------------------------------

# Identical to the Arduino LLC branded USBtiny programmer,
# but with a different USB VID.

programmer # arduinoisporg
    id                     = "arduinoisporg";
    desc                   = "Arduino ISP Programmer";
    type                   = "usbtiny";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x2a03;
    usbpid                 = 0x0049;
;

#------------------------------------------------------------
# ehajo-isp
#------------------------------------------------------------

# Commercial version of USBtiny using a separate VID/PID from
# http://www.eHaJo.de (closed from end of 2023)

programmer # ehajo-isp
    id                     = "ehajo-isp";
    desc                   = "AVR ISP programmer from eHaJo.de";
    type                   = "usbtiny";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x16d0;
    usbpid                 = 0x0ba5;
;

#------------------------------------------------------------
# iseavrprog
#------------------------------------------------------------

# Commercial version of USBtiny using a separate VID/PID from
# https://iascaled.com
#
# https://github.com/IowaScaledEngineering/ckt-avrprogrammer

programmer # iseavrprog
    id                     = "iseavrprog";
    desc                   = "AVR ISP programmer from iascaled.com";
    type                   = "usbtiny";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = usb;
    usbvid                 = 0x1209;
    usbpid                 = 0x6570;
;

#------------------------------------------------------------
# micronucleus
#------------------------------------------------------------

# Micronucleus is a bootloader designed for AVR ATtiny
# microcontrollers with a minimal usb interface and a
# strong emphasis on bootloader compactness. See
# https://github.com/micronucleus/micronucleus
# for details.

programmer # micronucleus
    id                     = "micronucleus";
    desc                   = "Micronucleus for bootloader";
    type                   = "micronucleus";
    prog_modes             = PM_SPM;
    connection_type        = usb;
    usbvid                 = 0x16d0;
    usbpid                 = 0x0753;
;

#------------------------------------------------------------
# teensy
#------------------------------------------------------------

# Proprietary bootloader used on the AVR based PJRC Teensy boards.
# Can only write to memory, not read/verify.
# See https://www.pjrc.com/teensy/ for details.

programmer # teensy
    id                     = "teensy";
    desc                   = "Teensy for bootloader";
    type                   = "teensy";
    prog_modes             = PM_SPM;
    connection_type        = usb;
    usbvid                 = 0x16c0;
    usbpid                 = 0x0478;
;

#------------------------------------------------------------
# ch341a
#------------------------------------------------------------

# Allows programming of AVR parts with F_CPU of min 6.8 MHz with the
# CH341A chip http://www.wch-ic.com/downloads/CH341DS1_PDF.html
#
# See also:
# https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html
#
# Connection scheme:
#  CH341A chip -- AVR ISP Connector
#  ~CTS/D0/CS0 -- RESET (can be D1 or D2, see reset setting below)
#  ~DCD/D3/DCK -- SCK
# ~DTR/D5/DOUT -- SDO
#  ~SLP/D7/DIN -- SDI
#          GND -- GND
#           5V -- Vcc/Vin (or disconnect if separately powered)

programmer # ch341a
    id                     = "ch341a";
    desc                   = "ch341a programmer (AVR must have minimum F_CPU of 6.8 MHz)";
    type                   = "ch341a";
    prog_modes             = PM_ISP;
    is_serialadapter       = yes;
    connection_type        = usb;
    usbvid                 = 0x1a86;
    usbpid                 = 0x5512;
    usbvendor              = "wch.cn";
    usbproduct             = "CH341A";
    reset                  = 0; # Can be 0, 1 or 2 for CS0, CS1 or CS2
;

#------------------------------------------------------------
# butterfly
#------------------------------------------------------------

# Bootloader origininally designed around the AVR Butterfly
# development board. See
# https://www.microchip.com/en-us/development-tool/atavrbfly
# for details.

programmer # butterfly
    id                     = "butterfly";
    desc                   = "Atmel for bootloader (Butterfly Development Board)";
    type                   = "butterfly";
    prog_modes             = PM_SPM;
    connection_type        = serial;
;

#------------------------------------------------------------
# avr109
#------------------------------------------------------------

# AVR109 "Butterfly" bootloader.
# See the AVR109 and AVR911 application notes for details.

programmer # avr109
    id                     = "avr109", "avr911";
    desc                   = "Atmel for bootloader using AppNote AVR109/911";
    type                   = "butterfly";
    prog_modes             = PM_SPM;
    connection_type        = serial;
;

#------------------------------------------------------------
# butterfly_mk and mkbutterfly
#------------------------------------------------------------

# http://forum.mikrokopter.de

programmer # butterfly_mk
    id                     = "butterfly_mk", "mkbutterfly";
    desc                   = "Mikrokopter.de Butterfly for bootloader";
    type                   = "butterfly_mk";
    prog_modes             = PM_SPM;
    connection_type        = serial;
;

#------------------------------------------------------------
# jtagmkI
#------------------------------------------------------------

# The original AVR JTAG ICE. It only supports a handful of
# chips (search for PM_JTAGmkI in this file), but can easily be
# DIY'ed. See doc2475, AVR060, and the following URLs for details:
# https://scienceprog.com/build-your-own-avr-jtagice-clone/
# https://www.olimex.com/Products/AVR/Programmers/AVR-JTAG-USB-A/
# https://www.electrodragon.com/product/avr-usb-jtag-ice-programmer/

programmer # jtagmkI
    id                     = "jtagmkI", "jtag1";
    desc                   = "Atmel JTAG ICE (mkI)";
    type                   = "jtagmki";
    prog_modes             = PM_JTAGmkI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = serial;
    baudrate               = 115200;    # default is 115200
;

#------------------------------------------------------------
# jtag1slow
#------------------------------------------------------------

programmer parent "jtag1" # jtag1slow
    id                     = "jtag1slow";
    baudrate               = 19200;
;

#------------------------------------------------------------
# jtagmkII
#------------------------------------------------------------

# The JTAG ICE mkII has both, serial and USB connectivity.  As it is
# mostly used through USB these days (AVR Studio 5 only supporting it
# that way), we make connection_type = usb the default.  Users are
# still free to use a serial port with the -P option. See AVR067 or
# https://www.microchip.com/en-us/development-tool/atjtagice2
# for details.

programmer # jtagmkII
    id                     = "jtagmkII";
    desc                   = "Atmel JTAG ICE mkII";
    type                   = "jtagmkii";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 19200;    # default is 19200
;

#------------------------------------------------------------
# jtag2slow
#------------------------------------------------------------

programmer parent "jtagmkII" # jtag2slow
    id                     = "jtag2slow";
;

#------------------------------------------------------------
# jtag2fast
#------------------------------------------------------------

# JTAG ICE mkII @ 115200 Bd (and alias jtag2 the fast version)

programmer parent "jtag2slow" # jtag2fast
    id                     = "jtag2fast", "jtag2";
    baudrate               = 115200;
;

#------------------------------------------------------------
# jtag2isp
#------------------------------------------------------------

# JTAG ICE mkII in ISP mode

programmer # jtag2isp
    id                     = "jtag2isp";
    desc                   = "Atmel JTAG ICE mkII in ISP mode";
    type                   = "jtagmkii_isp";
    prog_modes             = PM_TPI | PM_ISP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# jtag2dw
#------------------------------------------------------------

# JTAG ICE mkII in debugWIRE mode

programmer # jtag2dw
    id                     = "jtag2dw";
    desc                   = "Atmel JTAG ICE mkII in debugWIRE mode";
    type                   = "jtagmkii_dw";
    prog_modes             = PM_debugWIRE;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# jtagmkII_avr32
#------------------------------------------------------------

# JTAG ICE mkII in AVR32 mode

programmer # jtagmkII_avr32
    id                     = "jtagmkII_avr32", "jtag2avr32";
    desc                   = "Atmel JTAG ICE mkII in AVR32 mode";
    type                   = "jtagmkii_avr32";
    prog_modes             = PM_aWire;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# jtag2pdi
#------------------------------------------------------------

# JTAG ICE mkII in PDI mode

programmer # jtag2pdi
    id                     = "jtag2pdi";
    desc                   = "Atmel JTAG ICE mkII in PDI mode";
    type                   = "jtagmkii_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# dragon_jtag
#------------------------------------------------------------

# AVR Dragon in JTAG mode. See
# https://www.microchip.com/en-us/development-tool/atavrdragon
# for details.

programmer # dragon_jtag
    id                     = "dragon_jtag";
    desc                   = "Atmel AVR Dragon in JTAG mode";
    type                   = "dragon_jtag";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# dragon_isp
#------------------------------------------------------------

# AVR Dragon in ISP mode

programmer # dragon_isp
    id                     = "dragon_isp";
    desc                   = "Atmel AVR Dragon in ISP mode";
    type                   = "dragon_isp";
    prog_modes             = PM_TPI | PM_ISP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# dragon_pp
#------------------------------------------------------------

# AVR Dragon in PP mode

programmer # dragon_pp
    id                     = "dragon_pp";
    desc                   = "Atmel AVR Dragon in PP mode";
    type                   = "dragon_pp";
    prog_modes             = PM_HVPP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# dragon_hvsp
#------------------------------------------------------------

# AVR Dragon in HVSP mode

programmer # dragon_hvsp
    id                     = "dragon_hvsp";
    desc                   = "Atmel AVR Dragon in HVSP mode";
    type                   = "dragon_hvsp";
    prog_modes             = PM_HVSP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# dragon_dw
#------------------------------------------------------------

# AVR Dragon in debugWIRE mode

programmer # dragon_dw
    id                     = "dragon_dw";
    desc                   = "Atmel AVR Dragon in debugWIRE mode";
    type                   = "dragon_dw";
    prog_modes             = PM_debugWIRE;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# dragon_pdi
#------------------------------------------------------------

# AVR Dragon in PDI mode

programmer # dragon_pdi
    id                     = "dragon_pdi";
    desc                   = "Atmel AVR Dragon in PDI mode";
    type                   = "dragon_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    baudrate               = 115200;
;

#------------------------------------------------------------
# jtag3
#------------------------------------------------------------

# Atmel JTAGICE3 programmer. See
# https://www.microchip.com/en-us/development-tool/atjtagice3
# for details.
#
# The JTAGICE3 supports the following programming modes
# using different programmer names:
#
# Interface:   Programmer name:
# JTAG         jtag3
# PDI          jtag3pdi
# UPDI         jtag3updi
# debugWIRE    jtag3dw
# ISP          jtag3isp

programmer # jtag3
    id                     = "jtag3";
    desc                   = "Atmel AVR JTAGICE3 in JTAG mode";
    type                   = "jtagice3";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2110, 0x2140;
;

#------------------------------------------------------------
# jtag3pdi
#------------------------------------------------------------

programmer # jtag3pdi
    id                     = "jtag3pdi";
    desc                   = "Atmel AVR JTAGICE3 in PDI mode";
    type                   = "jtagice3_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2110, 0x2140;
;

#------------------------------------------------------------
# jtag3updi
#------------------------------------------------------------

programmer # jtag3updi
    id                     = "jtag3updi";
    desc                   = "Atmel AVR JTAGICE3 in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2110, 0x2140;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# jtag3dw
#------------------------------------------------------------

programmer # jtag3dw
    id                     = "jtag3dw";
    desc                   = "Atmel AVR JTAGICE3 in debugWIRE mode";
    type                   = "jtagice3_dw";
    prog_modes             = PM_debugWIRE;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2110, 0x2140;
;

#------------------------------------------------------------
# jtag3isp
#------------------------------------------------------------

programmer # jtag3isp
    id                     = "jtag3isp";
    desc                   = "Atmel AVR JTAGICE3 in ISP mode";
    type                   = "jtagice3_isp";
    prog_modes             = PM_ISP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2110, 0x2140;
;

#------------------------------------------------------------
# xplainedpro / xplainedpro_jtag
#------------------------------------------------------------

# On-board EDBG based programmer found on various AVR based
# Microchip Xplained Pro boards

# Different Xplained Pro boards uses different programming
# interfaces. These are the ones available:
#
# Interface:   Programmer name:
# JTAG         xplainedpro, xplainedpro_jtag
# PDI          xplainedpro_pdi
# UPDI         xplainedpro_updi

programmer # xplainedpro
    id                     = "xplainedpro", "xplainedpro_jtag";
    desc                   = "Atmel AVR XplainedPro in JTAG mode";
    type                   = "jtagice3";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2111;
;

#------------------------------------------------------------
# xplainedpro_pdi
#------------------------------------------------------------

programmer # xplainedpro_pdi
    id                     = "xplainedpro_pdi";
    desc                   = "Atmel AVR XplainedPro in PDI mode";
    type                   = "jtagice3_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2111;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# xplainedpro_updi
#------------------------------------------------------------

programmer # xplainedpro_updi
    id                     = "xplainedpro_updi";
    desc                   = "Atmel AVR XplainedPro in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2111;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# xplainedmini / xplainedmini_isp
#------------------------------------------------------------

# On-board mEDBG based programmer found on AVR based
# Microchip Xplained Mini/Nano boards
#
# Different Xplained Mini/Nano boards uses different
# programming interfaces. These are the ones available:
#
# Interface:   Programmer name:
# ISP          xplainedmini, xplainedmini_isp
# debugWIRE    xplainedmini_dw
# UPDI         xplainedmini_updi
# TPI          xplainedmini_tpi
#
# Some Xplained Mini boards has a programmable target voltage
# switch that can be controlled using the -xvtarg_switch flag.
# By modifying the SUFFER register using the -xsuffer flag,
# certain programmer safety features can be enabled or disabled.

programmer # xplainedmini
    id                     = "xplainedmini", "xplainedmini_isp";
    desc                   = "Atmel AVR XplainedMini in ISP mode";
    type                   = "jtagice3_isp";
    prog_modes             = PM_ISP;
    extra_features         = HAS_SUFFER | HAS_VTARG_SWITCH;
    connection_type        = usb;
    usbpid                 = 0x2145;
;

#------------------------------------------------------------
# xplainedmini_dw
#------------------------------------------------------------

# The Xplained Mini debugWIRE interface may be finicky,
# and usually require the mEDBG chip to drive the XTAL1
# pin on the target to keep the debugWIRE interface
# in sync

programmer # xplainedmini_dw
    id                     = "xplainedmini_dw";
    desc                   = "Atmel AVR XplainedMini in debugWIRE mode";
    type                   = "jtagice3_dw";
    prog_modes             = PM_debugWIRE;
    extra_features         = HAS_SUFFER | HAS_VTARG_SWITCH;
    connection_type        = usb;
    usbpid                 = 0x2145;
;

#------------------------------------------------------------
# xplainedmini_updi
#------------------------------------------------------------

# Note that the on-board programmer only support the
# megaAVR-0 and tinyAVR-0/1/2 chip families.

programmer # xplainedmini_updi
    id                     = "xplainedmini_updi";
    desc                   = "Atmel AVR XplainedMini in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_SUFFER | HAS_VTARG_SWITCH;
    connection_type        = usb;
    usbpid                 = 0x2145;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# xplainedmini_tpi
#------------------------------------------------------------

programmer # xplainedmini_tpi
    id                     = "xplainedmini_tpi";
    desc                   = "Atmel AVR XplainedMini in TPI mode";
    type                   = "jtagice3_tpi";
    prog_modes             = PM_TPI;
    connection_type        = usb;
    usbpid                 = 0x2145;
;

#------------------------------------------------------------
# atmelice / atmelice_jtag
#------------------------------------------------------------

# Atmel-ICE programmer. See
# https://www.microchip.com/en-us/development-tool/atatmel-ice
# for details.
#
# The Atmel-ICE supports the following programming modes
# using different programmer names:
#
# Interface:   Programmer name:
# JTAG         atmelice, atmelice_jtag
# PDI          atmelice_pdi
# UPDI         atmelice_updi
# debugWIRE    atmelice_dw
# ISP          atmelice_isp

programmer # atmelice
    id                     = "atmelice", "atmelice_jtag";
    desc                   = "Atmel-ICE (ARM/AVR) in JTAG mode";
    type                   = "jtagice3";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2141;
;

#------------------------------------------------------------
# atmelice_pdi
#------------------------------------------------------------

programmer # atmelice_pdi
    id                     = "atmelice_pdi";
    desc                   = "Atmel-ICE (ARM/AVR) in PDI mode";
    type                   = "jtagice3_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2141;
;

#------------------------------------------------------------
# atmelice_updi
#------------------------------------------------------------

programmer # atmelice_updi
    id                     = "atmelice_updi";
    desc                   = "Atmel-ICE (ARM/AVR) in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2141;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# atmelice_dw
#------------------------------------------------------------

programmer # atmelice_dw
    id                     = "atmelice_dw";
    desc                   = "Atmel-ICE (ARM/AVR) in debugWIRE mode";
    type                   = "jtagice3_dw";
    prog_modes             = PM_debugWIRE;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2141;
;

#------------------------------------------------------------
# atmelice_isp
#------------------------------------------------------------

programmer # atmelice_isp
    id                     = "atmelice_isp";
    desc                   = "Atmel-ICE (ARM/AVR) in ISP mode";
    type                   = "jtagice3_isp";
    prog_modes             = PM_ISP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2141;
;

#------------------------------------------------------------
# atmelice_tpi
#------------------------------------------------------------

programmer # atmelice_tpi
    id                     = "atmelice_tpi";
    desc                   = "Atmel-ICE (ARM/AVR) in TPI mode";
    type                   = "jtagice3_tpi";
    prog_modes             = PM_TPI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2141;
;

#------------------------------------------------------------
# powerdebugger / powerdebugger_jtag
#------------------------------------------------------------

# Microchip Power Debugger. See
# https://www.microchip.com/en-us/development-tool/atpowerdebugger
# for details.
#
# The Power Debugger supports the following programming modes
# using different programmer names:
#
# Interface:   Programmer name:
# JTAG         powerdebugger, powerdebugger_jtag
# PDI          powerdebugger_pdi
# UPDI         powerdebugger_updi
# debugWIRE    powerdebugger_dw
# ISP          powerdebugger_isp
#
# The Power Debugger has a programmable voltage source and
# can read the target voltage of the connected device.
# It also has two independent current measurement channels.
# All this can be utilized using the Avrdude terminal mode.

programmer # powerdebugger
    id                     = "powerdebugger", "powerdebugger_jtag";
    desc                   = "Atmel PowerDebugger (ARM/AVR) in JTAG mode";
    type                   = "jtagice3";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG | PM_AVR32JTAG;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2144;
;

#------------------------------------------------------------
# powerdebugger_pdi
#------------------------------------------------------------

programmer # powerdebugger_pdi
    id                     = "powerdebugger_pdi";
    desc                   = "Atmel PowerDebugger (ARM/AVR) in PDI mode";
    type                   = "jtagice3_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2144;
;

#------------------------------------------------------------
# powerdebugger_updi
#------------------------------------------------------------

programmer # powerdebugger_updi
    id                     = "powerdebugger_updi";
    desc                   = "Atmel PowerDebugger (ARM/AVR) in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2144;
    hvupdi_support         = 0, 1;
;

#------------------------------------------------------------
# powerdebugger_dw
#------------------------------------------------------------

programmer # powerdebugger_dw
    id                     = "powerdebugger_dw";
    desc                   = "Atmel PowerDebugger (ARM/AVR) in debugWire mode";
    type                   = "jtagice3_dw";
    prog_modes             = PM_debugWIRE;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2144;
;

#------------------------------------------------------------
# powerdebugger_isp
#------------------------------------------------------------

programmer # powerdebugger_isp
    id                     = "powerdebugger_isp";
    desc                   = "Atmel PowerDebugger (ARM/AVR) in ISP mode";
    type                   = "jtagice3_isp";
    prog_modes             = PM_ISP;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2144;
;

#------------------------------------------------------------
# powerdebugger_tpi
#------------------------------------------------------------

programmer # powerdebugger_tpi
    id                     = "powerdebugger_tpi";
    desc                   = "Atmel PowerDebugger (ARM/AVR) in TPI mode";
    type                   = "jtagice3_tpi";
    prog_modes             = PM_TPI;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2144;
;

#------------------------------------------------------------
# pickit4 / pickit4_jtag
#------------------------------------------------------------

# Microchip PICkit 4. See
# https://www.microchip.com/en-us/development-tool/pg164140
# for details.
#
# The PICkit 4 supports the following programming modes
# using different programmer names:
#
# Interface:   Programmer name:
# JTAG         pickit4, pickit4_jtag
# PDI          pickit4_pdi
# UPDI         pickit4_updi
# debugWIRE    pickit4_dw
# ISP          pickit4_isp
#
# The pinout is identical to the MPLAB SNAP, but different
# from other Microchip branded AVR programmers, and would
# usually require an adapter or custom wiring if your target
# board has a standard 6 or 10-pin programming connector.
#
# PIN  JTAG PDI   UPDI  DW   ISP  UART*
# > 1
#   2  VCC  VCC   VCC   VCC  VCC  VCC
#   3  GND  GND   GND   GND  GND  GND
#   4  TDO  DATA  UPDI       SDI
#   5  TCK                   SCK
#   6  RST  SCK         dW   RST
#   7  TDI                   SDI  TX (target)
#   8  TMS                        RX (target)
#
# * The PICkit4 can also be used as a USB to UART
# interface for simple serial debugging.

programmer # pickit4
    id                     = "pickit4", "pickit4_jtag";
    desc                   = "MPLAB(R) PICkit 4 in JTAG mode";
    type                   = "jtagice3";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2177, 0x2178, 0x2179;
;

#------------------------------------------------------------
# pickit4_updi
#------------------------------------------------------------

programmer # pickit4_updi
    id                     = "pickit4_updi";
    desc                   = "MPLAB(R) PICkit 4 in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2177, 0x2178, 0x2179;
    hvupdi_support         = 0, 1, 2;
;

#------------------------------------------------------------
# pickit4_pdi
#------------------------------------------------------------

programmer # pickit4_pdi
    id                     = "pickit4_pdi";
    desc                   = "MPLAB(R) PICkit 4 in PDI mode";
    type                   = "jtagice3_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2177, 0x2178, 0x2179;
;

#------------------------------------------------------------
# pickit4_isp
#------------------------------------------------------------

# Due to hardware limitations, the PICkit 4 can only
# reach an ISP clock speed of about 330 kHz

programmer # pickit4_isp
    id                     = "pickit4_isp";
    desc                   = "MPLAB(R) PICkit 4 in ISP mode";
    type                   = "jtagice3_isp";
    prog_modes             = PM_ISP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2177, 0x2178, 0x2179;
;

#------------------------------------------------------------
# pickit4_tpi
#------------------------------------------------------------

programmer # pickit4_tpi
    id                     = "pickit4_tpi";
    desc                   = "MPLAB(R) PICkit 4 in TPI mode";
    type                   = "jtagice3_tpi";
    prog_modes             = PM_TPI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2177, 0x2178, 0x2179;
;

#------------------------------------------------------------
# snap /snap_jtag
#------------------------------------------------------------

# Microchip MPLAB SNAP. See
# https://www.microchip.com/en-us/development-tool/pg164100
# for details.
#
# The MPLAB SNAP supports the following programming modes
# using different programmer names:
#
# Interface:   Programmer name:
# JTAG         snap, snap_jtag
# PDI          snap_pdi
# UPDI         snap_updi
# debugWIRE    snap_dw
# ISP          snap_isp
#
# The pinout is identical to the PICkit 4, but different
# from other Microchip branded AVR programmers, and would
# usually require an adapter or custom wiring if your target
# board has a standard 6 or 10-pin programming connector.
#
#   PIN  JTAG PDI   UPDI  DW   ISP  UART*
#   > 1
#     2  VCC  VCC   VCC   VCC  VCC  VCC
#     3  GND  GND   GND   GND  GND  GND
#     4  TDO  DATA  UPDI       SDI
#     5  TCK                   SCK
#     6  RST  SCK         dW   RST
#     7  TDI                   SDI  TX (target)
#     8  TMS                        RX (target)
#
# * The MPLAB SNAP can also be used as a USB to UART
#   interface for simple serial debugging.

programmer # snap
    id                     = "snap", "snap_jtag";
    desc                   = "MPLAB(R) SNAP in JTAG mode";
    type                   = "jtagice3";
    prog_modes             = PM_JTAG | PM_XMEGAJTAG;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2180, 0x217f, 0x2181;
;

#------------------------------------------------------------
# snap_updi
#------------------------------------------------------------

# Note that certain MPLAB SNAP programmer needs a hardware
# modification to be used as a UPDI programmer.
# See the Microchip ETN #36 for details.

programmer # snap_updi
    id                     = "snap_updi";
    desc                   = "MPLAB(R) SNAP in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2180, 0x217f, 0x2181;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# snap_pdi
#------------------------------------------------------------

programmer # snap_pdi
    id                     = "snap_pdi";
    desc                   = "MPLAB(R) SNAP in PDI mode";
    type                   = "jtagice3_pdi";
    prog_modes             = PM_PDI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2180, 0x217f, 0x2181;
;

#------------------------------------------------------------
# snap_isp
#------------------------------------------------------------

# Due to hardware limitations, the MPLAB SNAP can only
# reach an ISP clock speed of about 330 kHz

programmer # snap_isp
    id                     = "snap_isp";
    desc                   = "MPLAB(R) SNAP in ISP mode";
    type                   = "jtagice3_isp";
    prog_modes             = PM_ISP;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2180, 0x217f, 0x2181;
;

#------------------------------------------------------------
# snap_tpi
#------------------------------------------------------------

programmer # snap_tpi
    id                     = "snap_tpi";
    desc                   = "MPLAB(R) SNAP in TPI mode";
    type                   = "jtagice3_tpi";
    prog_modes             = PM_TPI;
    extra_features         = HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2180, 0x217f, 0x2181;
;

#------------------------------------------------------------
# pkobn_updi
#------------------------------------------------------------

# Microchip PICkit On-Board Nano is the name of the nEDBG
# based programmer/debugger that's found on AVR based
# Curiosity Nano boards.
#
# These boards can read and adjust the target voltage supply
# and can be done in the Avrdude terminal mode.

programmer # pkobn_updi
    id                     = "pkobn_updi";
    desc                   = "Curiosity nano (nEDBG) in UPDI mode";
    type                   = "jtagice3_updi";
    prog_modes             = PM_UPDI;
    extra_features         = HAS_VTARG_ADJ | HAS_VTARG_READ;
    connection_type        = usb;
    usbpid                 = 0x2175;
    hvupdi_support         = 1;
;

#------------------------------------------------------------
# pavr
#------------------------------------------------------------

# AVR910 based programmer. See
# https://web.archive.org/web/20040803005703/http://avr1.org/pavr/pavr.html
# for details.

programmer # pavr
    id                     = "pavr";
    desc                   = "Jason Kyle's pAVR Serial Programmer";
    type                   = "avr910";
    prog_modes             = PM_ISP;
    connection_type        = serial;
;

#------------------------------------------------------------
# pickit2
#------------------------------------------------------------

# Microchip PICkit 2. See
# https://www.microchip.com/en-us/development-tool/pg164120
# for details.
#
#   PIN  ISP
#   > 1  RST
#     2  VCC
#     3  GND
#     4  SDI
#     5  SCK
#     6  SDO

programmer # pickit2
    id                     = "pickit2";
    desc                   = "Microchip PICkit 2 programmer in ISP mode";
    type                   = "pickit2";
    prog_modes             = PM_ISP;
    connection_type        = usb;
;

#------------------------------------------------------------
# flip1
#------------------------------------------------------------

# The Atmel "Flexible in-system programmer" (FLIP v1) is a
# USB DFU bootloader designed for 8-bit AVRs with a native
# USB interface.
# See doc7618 for more information.

programmer # flip1
    id                     = "flip1";
    desc                   = "FLIP for bootloader using USB DFU protocol version 1 (doc7618)";
    type                   = "flip1";
    prog_modes             = PM_SPM;
    connection_type        = usb;
;

#------------------------------------------------------------
# flip2
#------------------------------------------------------------

# The Atmel "Flexible in-system programmer" (FLIP v2) is a
# USB DFU bootloader designed for AVR XMEGA and AVR32.
# See AVR4023 for more information.

programmer # flip2
    id                     = "flip2";
    desc                   = "FLIP for bootloader using USB DFU protocol version 2 (AVR4023)";
    type                   = "flip2";
    prog_modes             = PM_SPM;
    connection_type        = usb;
;

#------------------------------------------------------------
# ponyser
#------------------------------------------------------------

# some ultra cheap programmers use bitbanging on the serialport
#
# PC - DB9 - Pins for RS232:
#
# GND   5   -- |O
#              |   O| <-   9   RI
# DTR   4   <- |O   |
#              |   O| <-   8   CTS
# TXD   3   <- |O   |
#              |   O| ->   7   RTS
# RXD   2   -> |O   |
#              |   O| <-   6   DSR
# DCD   1   -> |O
#
# Using RXD is currently not supported.
# Using RI is not supported under Win32 but is supported under Posix.

# serial ponyprog design (dasa2 in uisp)
# reset=!txd sck=rts sdo=dtr sdi=cts

programmer # ponyser
    id                     = "ponyser";
    desc                   = "design ponyprog serial, reset=!txd sck=rts sdo=dtr sdi=cts";
    type                   = "serbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = serial;
    reset                  = ~3;
    sck                    = 7;
    sdo                    = 4;
    sdi                    = 8;
;

#------------------------------------------------------------
# siprog
#------------------------------------------------------------

# Serial port adapter http://www.lancos.com/siprogsch.html
# Same as above, different name

programmer parent "ponyser" # siprog
    id                     = "siprog";
    desc                   = "Lancos SI-Prog (same as ponyser)";
;

#------------------------------------------------------------
# dasa
#------------------------------------------------------------

# unknown (dasa in uisp)
# reset=rts sck=dtr sdo=txd sdi=cts

programmer # dasa
    id                     = "dasa";
    desc                   = "serial port banging, reset=rts sck=dtr sdo=txd sdi=cts";
    type                   = "serbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = serial;
    reset                  = 7;
    sck                    = 4;
    sdo                    = 3;
    sdi                    = 8;
;

#------------------------------------------------------------
# dasa3
#------------------------------------------------------------

# unknown (dasa3 in uisp)
# reset=!dtr sck=rts sdo=txd sdi=cts

programmer # dasa3
    id                     = "dasa3";
    desc                   = "serial port banging, reset=!dtr sck=rts sdo=txd sdi=cts";
    type                   = "serbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = serial;
    reset                  = ~4;
    sck                    = 7;
    sdo                    = 3;
    sdi                    = 8;
;

#------------------------------------------------------------
# C2N232i
#------------------------------------------------------------

# C2N232i (jumper configuration "auto")
# reset=dtr sck=!rts sdo=!txd sdi=!cts

programmer # c2n232i
    id                     = "c2n232i";
    desc                   = "serial port banging, reset=dtr sck=!rts sdo=!txd sdi=!cts";
    type                   = "serbb";
    prog_modes             = PM_TPI | PM_ISP;
    connection_type        = serial;
    reset                  = 4;
    sck                    = ~7;
    sdo                    = ~3;
    sdi                    = ~8;
;

#------------------------------------------------------------
# jtag2updi
#------------------------------------------------------------

# https://github.com/ElTangas/jtag2updi
# Original source for the jtag2updi project
#
# https://github.com/askn37/jtag2updi
# Enhanced firmware with better device support
#
# https://github.com/arduino/ArduinoCore-megaavr/tree/master/firmwares/MuxTO
# Arduino Nano Every (jtag2updi with 1200 baud touch, -r)

programmer # jtag2updi
    id                     = "jtag2updi", "nanoevery";
    desc                   = "JTAGv2 to UPDI bridge";
    type                   = "jtagmkii_updi";
    prog_modes             = PM_UPDI;
    connection_type        = serial;
    baudrate               = 115200;
    hvupdi_support         = 1;
;

#
# SERIAL ADAPTER DEFINITIONS
#

# A serialadapter is a programmer that has only USB parameters defined; it
# can be used for a -P <serialadapter>[:<serial number>] port
# specification instead of the created serial port. Per-user serialadapter
# definitions in ~/.avrduderc or avrdude.rc files can add a serial number
# to assign a particular board a specific id and default upload baud rate:
#
# serialadapter parent "ft232r"
#     id                     = "bike-shed-door";
#     usbsn                  = "0123456789";
#     baudrate               = 250000;
# ;
#
# This is particularly useful for uploading to a bootloader as it allows
# specifying the port as -P bike-shed-door rather than having to figure
# out which serial port name the operating system has assigned to the
# plugged in bike-shed-door board at runtime. Note that each programmer
# that defines usbpid and sets is_serialadapter = yes can also be utilised
# as a serialadapter.

#------------------------------------------------------------
# ch340
#------------------------------------------------------------

serialadapter # ch340
    id                     = "ch340";
    desc                   = "WCH CH340 USB to serial adapter";
    usbvid                 = 0x1a86;
    usbpid                 = 0x7523;
;

#------------------------------------------------------------
# ch343
#------------------------------------------------------------

# CH343 doc https://www.wch-ic.com/downloads/CH343DS1_PDF.html

serialadapter # ch343
    id                     = "ch343";
    desc                   = "WCH CH343 USB to serial adapter";
    usbvid                 = 0x1a86;
    usbpid                 = 0x55d3;
;

#------------------------------------------------------------
# ch9102
#------------------------------------------------------------

serialadapter # ch9102
    id                     = "ch9102";
    desc                   = "WCH CH9102 USB to serial adapter";
    usbvid                 = 0x1a86;
    usbpid                 = 0x55d4;
;

#------------------------------------------------------------
# cp210x
#------------------------------------------------------------

serialadapter # cp210x
    id                     = "cp210x";
    desc                   = "Silabs CP210x USB to serial adapter";
    usbvid                 = 0x10c4;
    usbpid                 = 0xea60, 0xea70, 0xea71;
;

#------------------------------------------------------------
# ft231x / ft234x / ft230x
#------------------------------------------------------------

serialadapter # ft231x
    id                     = "ft231x", "ft234x", "ft230x";
    desc                   = "FTDI FT23X series USB to serial adapter";
    usbvid                 = 0x0403;
    usbpid                 = 0x6015;
;

#------------------------------------------------------------
# pl2303
#------------------------------------------------------------

serialadapter # pl2303
    id                     = "pl2303";
    desc                   = "Profilic PL2303 USB to serial adapter";
    usbvid                 = 0x067b;
    usbpid                 = 0x2303, 0x2304, 0x23a3, 0x23b3, 0x23c3, 0x23d3, 0x23e3, 0x23f3;
;

#
# PART DEFINITIONS
#

#------------------------------------------------------------
# ATtiny11
#------------------------------------------------------------

# This is an HVSP-only device.

part # t11
    desc                   = "ATtiny11";
    id                     = "t11";
    variants               =
        "ATtiny11:      N/A,   Fmax=N/A,   T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny11-6PC:  DIP8,  Fmax=6 MHz, T=[0 C,   70 C], Vcc=[4 V,   5.5 V]",
        "ATtiny11-6PI:  DIP8,  Fmax=6 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATtiny11-6PU:  DIP8,  Fmax=6 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATtiny11-6SC:  SOIC8, Fmax=6 MHz, T=[0 C,   70 C], Vcc=[4 V,   5.5 V]",
        "ATtiny11-6SI:  SOIC8, Fmax=6 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATtiny11-6SU:  SOIC8, Fmax=6 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATtiny11L-2PC: DIP8,  Fmax=2 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny11L-2PI: DIP8,  Fmax=2 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny11L-2SC: SOIC8, Fmax=2 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny11L-2SI: SOIC8, Fmax=2 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny11L-2SU: SOIC8, Fmax=2 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_HVSP;
    mcuid                  = 8;
    n_interrupts           = 5;
    stk500_devcode         = 0x11;
    chip_erase_delay       = 20000;
    signature              = 0x1e 0x90 0x04;
    serial                 = no;
    timeout                = 200;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    factory_fcpu           = 1200000;

    memory "eeprom"
        size               = 64;
        delay              = 5;
        blocksize          = 64;
        readsize           = 256;
    ;

    memory "flash"
        size               = 1024;
        delay              = 3;
        blocksize          = 128;
        readsize           = 256;
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xf4;
        bitmask            = 0x1f;
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
    ;

    memory "signature"
        size               = 3;
    ;

    memory "calibration"
        size               = 1;
    ;

    memory "io"
        size               = 64;
    ;

    memory "sram"
        size               = 32;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny12
#------------------------------------------------------------

part # t12
    desc                   = "ATtiny12";
    id                     = "t12";
    variants               =
        "ATtiny12:       N/A,   Fmax=8 MHz,   T=[N/A,   85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny12-8PU:   PDIP8, Fmax=8 MHz,   T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATtiny12-8SU:   SOIC8, Fmax=8 MHz,   T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATtiny12L-4PU:  PDIP8, Fmax=4 MHz,   T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny12L-4SU:  SOIC8, Fmax=4 MHz,   T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny12L-4SUR: SOIC8, Fmax=4 MHz,   T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny12V-1SU:  SOIC8, Fmax=1.2 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny12V-1SUR: SOIC8, Fmax=1.2 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_ISP | PM_HVSP;
    mcuid                  = 9;
    n_interrupts           = 6;
    stk500_devcode         = 0x12;
    avr910_devcode         = 0x55;
    chip_erase_delay       = 20000;
    signature              = 0x1e 0x90 0x05;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    factory_fcpu           = 1200000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 64;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--xxaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 1024;
        min_write_delay    = 4500;
        max_write_delay    = 20000;
        readback           = 0xff 0x00;
        mode               = 0x04;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0x52;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--101x.xxxx--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
    ;

    memory "sram"
        size               = 32;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny13
#------------------------------------------------------------

part # t13
    desc                   = "ATtiny13";
    id                     = "t13";
    variants               =
        "ATtiny13:         N/A,    Fmax=20 MHz, T=[N/A,   85 C], Vcc=[N/A,     N/A]",
        "ATtiny13-20MMU:   MLF10,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20MMUR:  VDFN10, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20MU:    MLF20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20MUR:   WQFN20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20PU:    PDIP8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SQ:    SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SQR:   SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SSQ:   SOIC8N, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SSQR:  SOIC8,  Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SSU:   SOIC8N, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SSUR:  SOIC8N, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SU:    SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13-20SUR:   SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny13V-10MMU:  MLF10,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10MMUR: VDFN10, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10MU:   MLF20,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10MUR:  WQFN20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10PQ:   PDIP8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10PU:   PDIP8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10SSU:  SOIC8N, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10SSUR: SOIC8N, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10SU:   SOIC8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13V-10SUR:  SOIC8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 10;
    n_interrupts           = 10;
    stk500_devcode         = 0x14;
    chip_erase_delay       = 4000;
    signature              = 0x1e 0x90 0x07;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    flash_instr            =  0xb4, 0x0e, 0x1e;
    eeprom_instr           =
        0xbb, 0xfe, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x0e, 0xb4, 0x0e, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    idr                    = 0x2e;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 0;
    factory_fcpu           = 1200000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 64;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        mode               = 0x41;
        delay              = 5;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--xxaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--xxaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 1024;
        page_size          = 32;
        num_pages          = 32;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 32;
        readsize           = 256;
        read_lo            = "0010.0000--0000.000a--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.000a--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.000a--aaaa.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x6a;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x1f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 2;
        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 64;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny13A
#------------------------------------------------------------

part parent "t13" # t13a
    desc                   = "ATtiny13A";
    id                     = "t13a";
    variants               =
        "ATtiny13A-MMF:  VDFN10, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-MMFR: VDFN10, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-MMU:  MLF10,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-MMUR: MLF10,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-MU:   MLF20,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-MUR:  WQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-PU:   PDIP8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SF:   SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SFR:  SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SH:   SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SN:   SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SNR:  SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SS7:  SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SS7R: SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SSH:  SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SSHR: SOIC8N, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SSU:  SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SSUR: SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SU:   SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny13A-SUR:  SOIC8,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 11;
;

#------------------------------------------------------------
# ATtiny15
#------------------------------------------------------------

part # t15
    desc                   = "ATtiny15";
    id                     = "t15";
    variants               =
        "ATtiny15:      N/A,   Fmax=N/A,     T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny15L-1PC: DIP8,  Fmax=1.6 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny15L-1PI: DIP8,  Fmax=1.6 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny15L-1PU: DIP8,  Fmax=1.6 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny15L-1SC: SOIC8, Fmax=1.6 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny15L-1SI: SOIC8, Fmax=1.6 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny15L-1SU: SOIC8, Fmax=1.6 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_ISP | PM_HVSP;
    mcuid                  = 12;
    n_interrupts           = 9;
    stk500_devcode         = 0x13;
    avr910_devcode         = 0x56;
    chip_erase_delay       = 8200;
    signature              = 0x1e 0x90 0x06;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 16;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    hvspcmdexedelay        = 5;
    factory_fcpu           = 1600000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 64;
        min_write_delay    = 8200;
        max_write_delay    = 8200;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--xxaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 1024;
        min_write_delay    = 4100;
        max_write_delay    = 4100;
        readback           = 0xff 0x00;
        mode               = 0x04;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0x5c;
        bitmask            = 0xf3;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--oooo.xxoo";
        write              = "1010.1100--101x.xxxx--xxxx.xxxx--iiii.11ii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
    ;

    memory "sram"
        size               = 32;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT89S51
#------------------------------------------------------------

# Nonstandard part
#   - Tested with -c avrisp
#   - USBASP programmers may require different firmware

part # 89S51
    desc                   = "AT89S51";
    id                     = "89S51";
    variants               =
        "AT89S51:      N/A,    Fmax=33 MHz, T=[N/A,    N/A], Vcc=[4 V, 5.5 V]",
        "AT89S51-24AU: TQFP44, Fmax=24 MHz, T=[-40 C, 85 C], Vcc=[4 V, 5.5 V]",
        "AT89S51-24JU: PLCC44, Fmax=24 MHz, T=[-40 C, 85 C], Vcc=[4 V, 5.5 V]",
        "AT89S51-24PU: PDIP40, Fmax=24 MHz, T=[-40 C, 85 C], Vcc=[4 V, 5.5 V]";
    prog_modes             = PM_ISP | PM_HVPP;
    mcuid                  = 372;
    stk500_devcode         = 0xe0;
    chip_erase_delay       = 250000;
    signature              = 0x1e 0x51 0x06;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 4;
    pollvalue              = 0x69;
    predelay               = 1;
    postdelay              = 1;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 1;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "flash"
        size               = 4096;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0xff;
        mode               = 0x02;
        delay              = 10;
        blocksize          = 256;
        read               = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "0100.0000--xxxa.aaaa--aaaa.aaaa--iiii.iiii";
        # Nonstandard page mode is available but not implemented
    ;

    memory "lock"
        size               = 1;
        read               = "0010.0100--xxxx.xxxx--xxxx.xxxx--xxxo.ooxx";
        # Nonstandard write: expect verification errors
        # See datasheet Page 20, Note 1 https://ww1.microchip.com/downloads/en/DeviceDoc/doc2487.pdf
        # Activate lock mode 0 through chip erase: avrdude -e
        # Activate lock mode 1: avrdude -e -V -U lock:w:1:m
        # Activate lock mode 2: avrdude -e -V -U lock:w:1:m -U lock:w:2:m
        # Activate lock mode 3: avrdude -e -V -U lock:w:1:m -U lock:w:2:m -U lock:w:3:m
        write              = "1010.1100--1110.00ii--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0 0 1 0 1 0 0 0  x x x x x x a1 a0  x x x x x x x 0  o o o o o o o o";
    ;
;

#------------------------------------------------------------
# AT89S52
#------------------------------------------------------------

part parent "89S51" # 89S52
    desc                   = "AT89S52";
    id                     = "89S52";
    variants               =
        "AT89S52:       N/A,    Fmax=33 MHz, T=[N/A,    N/A], Vcc=[4 V, 5.5 V]",
        "AT89S52-24AU:  TQFP44, Fmax=24 MHz, T=[-40 C, 85 C], Vcc=[4 V, 5.5 V]",
        "AT89S52-24AUR: TQFP44, Fmax=24 MHz, T=[-40 C, 85 C], Vcc=[4 V, 5.5 V]",
        "AT89S52-24JU:  PLCC44, Fmax=24 MHz, T=[-40 C, 85 C], Vcc=[4 V, 5.5 V]",
        "AT89S52-24PU:  PDIP40, Fmax=24 MHz, T=[-40 C, 85 C], Vcc=[4 V, 5.5 V]";
    mcuid                  = 373;
    stk500_devcode         = 0xe1;
    signature              = 0x1e 0x52 0x06;

    memory "flash"
        size               = 8192;
    ;
;

#------------------------------------------------------------
# AT90S1200
#------------------------------------------------------------

part # 1200
    desc                   = "AT90S1200";
    id                     = "1200";
    variants               =
        "AT90S1200-12PC:  DIP20,  Fmax=12 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S1200-12PI:  DIP20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S1200-12SC:  SOIC20, Fmax=12 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S1200-12SI:  SOIC20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S1200-12YC:  SSOP20, Fmax=12 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S1200-12YI:  SSOP20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S1200-4PC:   DIP20,  Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200-4PI:   DIP20,  Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200-4SC:   SOIC20, Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200-4SI:   SOIC20, Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200-4YC:   SSOP20, Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200-4YI:   SSOP20, Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200A-12PC: DIP20,  Fmax=12 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S1200A-12PI: DIP20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S1200A-12SC: SOIC20, Fmax=12 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S1200A-12SI: SOIC20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S1200A-12YC: SSOP20, Fmax=12 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S1200A-12YI: SSOP20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S1200A-4PC:  DIP20,  Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200A-4PI:  DIP20,  Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200A-4SC:  SOIC20, Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200A-4SI:  SOIC20, Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200A-4YC:  SSOP20, Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S1200A-4YI:  SSOP20, Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 183;
    n_interrupts           = 4;
    stk500_devcode         = 0x33;
    avr910_devcode         = 0x13;
    chip_erase_delay       = 20000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x90 0x01;
    is_at90s1200           = yes;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 1;
    pollvalue              = 0xff;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 64;
        min_write_delay    = 4000;
        max_write_delay    = 9000;
        readback           = 0x00 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 32;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--xxaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 1024;
        min_write_delay    = 4000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x02;
        delay              = 15;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xdf;
        bitmask            = 0x21;
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 32;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90S4414
#------------------------------------------------------------

part # 4414
    desc                   = "AT90S4414";
    id                     = "4414";
    variants               =
        "AT90S4414-4AC: TQFP44, Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S4414-4AI: TQFP44, Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S4414-4JC: LCC44,  Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S4414-4JI: LCC44,  Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S4414-4PC: DIP40,  Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S4414-4PI: DIP40,  Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S4414-8AC: TQFP44, Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S4414-8AI: TQFP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S4414-8JC: LCC44,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S4414-8JI: LCC44,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S4414-8PC: DIP40,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S4414-8PI: DIP40,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 190;
    n_interrupts           = 13;
    stk500_devcode         = 0x50;
    avr910_devcode         = 0x28;
    chip_erase_delay       = 20000;
    signature              = 0x1e 0x92 0x01;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0x80 0x7f;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 4096;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0x7f 0x7f;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xdf;
        bitmask            = 0x21;
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 256;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90S2313
#------------------------------------------------------------

part # 2313
    desc                   = "AT90S2313";
    id                     = "2313";
    variants               =
        "AT90S2313-10PC: DIP20,  Fmax=10 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S2313-10PI: DIP20,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S2313-10SC: SOIC20, Fmax=10 MHz, T=[0 C,   70 C], Vcc=[4 V,   6 V]",
        "AT90S2313-10SI: SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[4 V,   6 V]",
        "AT90S2313-4PC:  DIP20,  Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S2313-4PI:  DIP20,  Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "AT90S2313-4SC:  SOIC20, Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "AT90S2313-4SI:  SOIC20, Fmax=4 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 186;
    n_interrupts           = 11;
    stk500_devcode         = 0x40;
    avr910_devcode         = 0x20;
    chip_erase_delay       = 20000;
    signature              = 0x1e 0x91 0x01;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        min_write_delay    = 4000;
        max_write_delay    = 9000;
        readback           = 0x80 0x7f;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 2048;
        min_write_delay    = 4000;
        max_write_delay    = 9000;
        readback           = 0x7f 0x7f;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xdf;
        bitmask            = 0x21;
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        write              = "1010.1100--111x.xiix--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90S2333
#------------------------------------------------------------

part # 2333
##### WARNING: No XML file for device 'AT90S2333'! #####
    desc                   = "AT90S2333";
    id                     = "2333";
    variants               =
        "AT90S2333-8AC: TQFP32, Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S2333-8AI: TQFP32, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S2333-8PC: DIP28,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S2333-8PI: DIP28,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 188;
    n_interrupts           = 14;
    stk500_devcode         = 0x42;
    avr910_devcode         = 0x34;
    chip_erase_delay       = 20000;
    signature              = 0x1e 0x91 0x05;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0x00 0xff;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 2048;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        pwroff_after_write = yes;
        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xxoo.oooo";
        write              = "1010.1100--101i.iiii--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "lock"
        size               = 1;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90S2343 (also AT90S2323 and ATtiny22)
#------------------------------------------------------------

part # 2343
    desc                   = "AT90S2343";
    id                     = "2343";
    variants               =
        "AT90S2343-10PC: DIP8,  Fmax=10 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S2343-10PI: DIP8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S2343-10SC: SOIC8, Fmax=10 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S2343-10SI: SOIC8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP;
    mcuid                  = 189;
    n_interrupts           = 3;
    stk500_devcode         = 0x43;
    avr910_devcode         = 0x4c;
    chip_erase_delay       = 18000;
    signature              = 0x1e 0x91 0x03;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x00,
        0x68, 0x78, 0x68, 0x68, 0x00, 0x00, 0x68, 0x78,
        0x78, 0x00, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    poweroffdelay          = 25;
    resetdelayus           = 50;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0x00 0xff;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--0000.0000--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.0000--xaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 2048;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 128;
        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xde;
        bitmask            = 0x21;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxox.xxxo";
        write              = "1010.1100--1011.111i--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        read               = "0 1 0 1 1 0 0 0  x x x x x x x x  x x x x x x x x  o1 o2 x x x x x x";
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90S2323
#------------------------------------------------------------

part parent "2343" # 2323
    desc                   = "AT90S2323";
    id                     = "2323";
    variants               =
        "AT90S2323-10PC: DIP8,  Fmax=10 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S2323-10PI: DIP8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S2323-10SC: SOIC8, Fmax=10 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S2323-10SI: SOIC8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]";
    mcuid                  = 187;
    stk500_devcode         = 0x41;
    avr910_devcode         = 0x48;
    signature              = 0x1e 0x91 0x02;
;

#------------------------------------------------------------
# ATtiny22
#------------------------------------------------------------

part parent "2343" # t22
    desc                   = "ATtiny22";
    id                     = "t22";
    variants               =
        "ATtiny22L-1PC: DIP8,  Fmax=1 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "ATtiny22L-1PI: DIP8,  Fmax=1 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]",
        "ATtiny22L-1SC: SOIC8, Fmax=1 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 6 V]",
        "ATtiny22L-1SI: SOIC8, Fmax=1 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 6 V]";
    mcuid                  = 13;
    stk500_devcode         = 0x20;
    avr910_devcode         = 0x00; # Unknown
    signature              = 0x1e 0x91 0x06;

    memory "fuse"
        initval            = -1;
    ;
;

#------------------------------------------------------------
# AT90S4433
#------------------------------------------------------------

part parent "2333" # 4433
    desc                   = "AT90S4433";
    id                     = "4433";
    variants               =
        "AT90S4433-8AC: TQFP32, Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S4433-8AI: TQFP32, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S4433-8PC: DIP28,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S4433-8PI: DIP28,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]";
    mcuid                  = 191;
    stk500_devcode         = 0x51;
    avr910_devcode         = 0x30;
    signature              = 0x1e 0x92 0x03;

    memory "eeprom"
        size               = 256;
        read               = "1010.0000--xxxx.xxxx--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 4096;
        read_lo            = "0010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        initval            = 0xda;
    ;

    memory "lock"
        initval            = 0xff;
    ;
;

#------------------------------------------------------------
# AT90S8515
#------------------------------------------------------------

part # 8515
    desc                   = "AT90S8515";
    id                     = "8515";
    variants               =
        "AT90S8515-8PC: DIP40, Fmax=8 MHz, T=[0 C, 70 C], Vcc=[4 V, 6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 193;
    n_interrupts           = 13;
    stk500_devcode         = 0x60;
    avr910_devcode         = 0x38;
    chip_erase_delay       = 20000;
    signature              = 0x1e 0x93 0x01;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        min_write_delay    = 4000;
        max_write_delay    = 9000;
        readback           = 0x80 0x7f;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 8192;
        min_write_delay    = 4000;
        max_write_delay    = 9000;
        readback           = 0x7f 0x7f;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xdf;
        bitmask            = 0x21;
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 512;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90S8535
#------------------------------------------------------------

part # 8535
    desc                   = "AT90S8535";
    id                     = "8535";
    variants               =
        "AT90S8535-8AC: TQFP44, Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S8535-8AI: TQFP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S8535-8JC: LCC44,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S8535-8JI: LCC44,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S8535-8PC: DIP40,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S8535-8PI: DIP40,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 195;
    n_interrupts           = 17;
    stk500_devcode         = 0x61;
    avr910_devcode         = 0x68;
    chip_erase_delay       = 20000;
    signature              = 0x1e 0x93 0x03;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0x00 0xff;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 8192;
        min_write_delay    = 9000;
        max_write_delay    = 20000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xdf;
        bitmask            = 0x21;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxox.xxxo";
        write              = "1010.1100--1011.111i--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0 1 0 1 1 0 0 0  x x x x x x x x  x x x x x x x x  o1 o2 x x x x x x";
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 512;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90S4434
#------------------------------------------------------------

# No XML file for device AT90S4434, so parenting off AT90S8535
# with which it shares the datasheet.

part parent "8535" # 4434
    desc                   = "AT90S4434";
    id                     = "4434";
    variants               =
        "AT90S4434-8AC: TQFP44, Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S4434-8AI: TQFP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S4434-8JC: LCC44,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S4434-8JI: LCC44,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]",
        "AT90S4434-8PC: DIP40,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V, 6 V]",
        "AT90S4434-8PI: DIP40,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 6 V]";
    mcuid                  = 192;
    stk500_devcode         = 0x52;
    avr910_devcode         = 0x6c;
    signature              = 0x1e 0x92 0x02;

    memory "eeprom"
        size               = 256;
        read               = "1010.0000--xxxx.xxxx--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        size               = 4096;
        read_lo            = "0010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        write_lo           = "0100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
        write_hi           = "0100.1000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "fuse"
        max_write_delay    = 20000;
    ;

    memory "lock"
        max_write_delay    = 20000;
    ;

    memory "sram"
        size               = 256;
    ;
;

#------------------------------------------------------------
# ATmega103
#------------------------------------------------------------

part # m103
    desc                   = "ATmega103";
    id                     = "m103";
    variants               =
        "ATmega103-6AC:  TQFP64, Fmax=6 MHz, T=[0 C,   70 C], Vcc=[4 V,   5.5 V]",
        "ATmega103-6AI:  TQFP64, Fmax=6 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATmega103L-4AC: TQFP64, Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 3.6 V]",
        "ATmega103L-4AI: TQFP64, Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 84;
    n_interrupts           = 24;
    stk500_devcode         = 0xb1;
    avr910_devcode         = 0x41;
    chip_erase_delay       = 112000;
    pagel                  = 0xa0;
    bs2                    = 0xd7;
    signature              = 0x1e 0x97 0x01;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x8e, 0x9e, 0x2e, 0x3e, 0xae, 0xbe,
        0x4e, 0x5e, 0xce, 0xde, 0x6e, 0x7e, 0xee, 0xde,
        0x66, 0x76, 0xe6, 0xf6, 0x6a, 0x7a, 0xea, 0x7a,
        0x7f, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepulsewidth    = 15;
    programfusepulsewidth  = 2;
    programlockpolltimeout = 10;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        min_write_delay    = 4000;
        max_write_delay    = 9000;
        readback           = 0x80 0x7f;
        mode               = 0x04;
        delay              = 12;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x20000;
        page_size          = 256;
        num_pages          = 512;
        min_write_delay    = 22000;
        max_write_delay    = 56000;
        readback           = 0xff 0xff;
        mode               = 0x11;
        delay              = 70;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xdf;
        bitmask            = 0x2b;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xxox.o1oo";
        write              = "1010.1100--1011.i1ii--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x06;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xoox";
        write              = "1010.1100--1111.1ii1--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 4000;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega64
#------------------------------------------------------------

part # m64
    desc                   = "ATmega64";
    id                     = "m64";
    variants               =
        "ATmega64:       N/A,    Fmax=16 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega64-16AN:  TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega64-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.2 V, 5.5 V]",
        "ATmega64-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.2 V, 5.5 V]",
        "ATmega64-16MN:  QFN64,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega64-16MU:  QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega64-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega64L-8AN:  TQFP64, Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8AQ:  TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8AQR: TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8AUR: TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8MN:  QFN64,  Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8MQ:  MLF64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8MQR: VQFN64, Fmax=8 MHz,  T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8MU:  QFN64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64L-8MUR: MLF64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
    mcuid                  = 72;
    n_interrupts           = 35;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0xa0;
    avr910_devcode         = 0x45;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x96 0x02;
    reset                  = io;
    allowfullpagebitstream = yes;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x22;
    spmcr                  = 0x68;
    eecr                   = 0x3c;
    ocdrev                 = 2;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 2048;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xfd;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega64A
#------------------------------------------------------------

part parent "m64" # m64a
    desc                   = "ATmega64A";
    id                     = "m64a";
    variants               =
        "ATmega64A-AN:  TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64A-ANR: TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64A-AU:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64A-AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64A-MN:  QFN64,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64A-MU:  MLF64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64A-MUR: VQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 73;
;

#------------------------------------------------------------
# ATmega128
#------------------------------------------------------------

part # m128
    desc                   = "ATmega128";
    id                     = "m128";
    variants               =
        "ATmega128-16AN:  TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega128-16ANR: TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega128-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega128-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega128-16MN:  MLF64,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega128-16MNR: MLF64,  Fmax=16 MHz, T=[N/A,     N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega128-16MU:  MLF64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega128-16MUR: MLF64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega128L-8AN:  TQFP64, Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[3 V,   5.5 V]",
        "ATmega128L-8ANR: TQFP64, Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[3 V,   5.5 V]",
        "ATmega128L-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128L-8AUR: TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128L-8MN:  MLF64,  Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[3 V,   5.5 V]",
        "ATmega128L-8MNR: MLF64,  Fmax=8 MHz,  T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega128L-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128L-8MUR: MLF64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
    mcuid                  = 85;
    n_interrupts           = 35;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0xb2;
    avr910_devcode         = 0x43;
    chip_erase_delay       = 10000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x97 0x02;
    reset                  = io;
    allowfullpagebitstream = yes;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x22;
    rampz                  = 0x3b;
    spmcr                  = 0x68;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        page_size          = 8;
        min_write_delay    = 10000;
        max_write_delay    = 10000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x20000;
        page_size          = 256;
        num_pages          = 512;
        min_write_delay    = 5000;
        max_write_delay    = 5000;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xfd;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega128A
#------------------------------------------------------------

part parent "m128" # m128a
    desc                   = "ATmega128A";
    id                     = "m128a";
    variants               =
        "ATmega128A:     TQFP64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega128A-AN:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128A-ANR: TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128A-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128A-AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128A-MN:  VQFN64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128A-MNR: TQFP64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega128A-MU:  QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega128A-MUR: QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 86;
;

#------------------------------------------------------------
# AT90CAN128
#------------------------------------------------------------

part # c128
    desc                   = "AT90CAN128";
    id                     = "c128";
    variants               =
        "AT90CAN128:       N/A,    Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[4.5 V,   N/A]",
        "AT90CAN128-15AZ:  TQFP64, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN128-16AI:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN128-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN128-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN128-16MI:  QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN128-16MU:  QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN128-16MUR: QFN64,  Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
    mcuid                  = 176;
    n_interrupts           = 37;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0xb3;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
#   avr910_devcode         = 0x43;
    signature              = 0x1e 0x97 0x81;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    rampz                  = 0x3b;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--000x.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x20000;
        page_size          = 256;
        num_pages          = 512;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90CAN64
#------------------------------------------------------------

part # c64
    desc                   = "AT90CAN64";
    id                     = "c64";
    variants               =
        "AT90CAN64:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN64-16AI:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN64-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN64-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN64-16MI:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN64-16MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN64-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 172;
    n_interrupts           = 37;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0xb3;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
#   avr910_devcode         = 0x43;
    signature              = 0x1e 0x96 0x81;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 2048;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--000x.xaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90CAN32
#------------------------------------------------------------

part # c32
    desc                   = "AT90CAN32";
    id                     = "c32";
    variants               =
        "AT90CAN32:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN32-16AI:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN32-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN32-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN32-16MI:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN32-16MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90CAN32-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 171;
    n_interrupts           = 37;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0xb3;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
#   avr910_devcode         = 0x43;
    signature              = 0x1e 0x95 0x81;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--000x.xxaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 256;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega16
#------------------------------------------------------------

part # m16
    desc                   = "ATmega16";
    id                     = "m16";
    variants               =
        "ATmega16:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega16-16AQR: TQFP44, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega16-16AU:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega16-16AUR: TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega16-16MQ:  MLF44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega16-16MU:  MLF44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega16-16MUR: MLF44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega16-16PU:  PDIP40, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega16L-8AQ:  TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16L-8AQR: TQFP44, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega16L-8AU:  TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16L-8AUR: TQFP44, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega16L-8MU:  MLF44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16L-8MUR: VQFN44, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega16L-8PU:  PDIP40, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
    mcuid                  = 49;
    n_interrupts           = 21;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x82;
    avr910_devcode         = 0x74;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x94 0x03;
    reset                  = io;
    allowfullpagebitstream = yes;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 2;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--00xx.xxaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--000x.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega16A
#------------------------------------------------------------

part parent "m16" # m16a
    desc                   = "ATmega16A";
    id                     = "m16a";
    variants               =
        "ATmega16A:     N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega16A-AU:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16A-AUR: TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16A-MU:  MLF44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16A-MUR: VQFN44, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega16A-PU:  PDIP40, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 50;
;

#------------------------------------------------------------
# ATmega324P
#------------------------------------------------------------

part # m324p
    desc                   = "ATmega324P";
    id                     = "m324p";
    variants               =
        "ATmega324P:        N/A,    Fmax=20 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega324P-20AN:   TQFP44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20AQ:   TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20AQR:  TQFP44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20AU:   TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20AUR:  TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20MN:   VQFN44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20MQR:  VQFN44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20MU:   VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20MUR:  VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20PN:   PDIP40, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324P-20PU:   PDIP40, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega324PV-10AN:  TQFP44, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PV-10AU:  TQFP44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PV-10AUR: TQFP44, Fmax=10 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PV-10MN:  VQFN44, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PV-10MU:  VQFN44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PV-10PN:  PDIP40, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PV-10PU:  PDIP40, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 111;
    n_interrupts           = 31;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    stk500_devcode         = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode         = 0x74;
    chip_erase_delay       = 55000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x95 0x08;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--00xx.xaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xaaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 128;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0aaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega164P
#------------------------------------------------------------

part parent "m324p" # m164p
    desc                   = "ATmega164P";
    id                     = "m164p";
    variants               =
        "ATmega164P:        N/A,    Fmax=20 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega164P-20AN:   TQFP44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20AQ:   TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20AU:   TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20AUR:  TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20MN:   VQFN44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20MQ:   VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20MU:   VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20MUR:  VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20PN:   PDIP40, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20PQ:   PDIP40, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164P-20PU:   PDIP40, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega164PV-10AN:  TQFP44, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PV-10AQ:  VQFN44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PV-10AU:  TQFP44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PV-10AUR: TQFP44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PV-10MU:  VQFN44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PV-10MUR: VQFN44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PV-10PN:  PDIP40, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PV-10PU:  PDIP40, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 93;
    boot_section_size      = 256;
    signature              = 0x1e 0x94 0x0a;

    memory "eeprom"
        size               = 512;
        delay              = 20;
    ;

    memory "flash"
        size               = 0x4000;
        num_pages          = 128;
    ;

    memory "sram"
        size               = 1024;
    ;
;

#------------------------------------------------------------
# ATmega164PA
#------------------------------------------------------------

part parent "m164p" # m164pa
    desc                   = "ATmega164PA";
    id                     = "m164pa";
    variants               =
        "ATmega164PA:      N/A,     Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-AN:   TQFP44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-ANR:  TQFP44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-AU:   TQFP44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-AUR:  TQFP44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-CU:   VFBGA49, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-CUR:  VFBGA49, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-MCH:  QFN44,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-MCHR: QFN44,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-MN:   TQFP44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-MNR:  VQFN44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-MU:   VQFN44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-MUR:  VQFN44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-PN:   PDIP40,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164PA-PU:   PDIP40,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 94;
;

#------------------------------------------------------------
# ATmega164A
#------------------------------------------------------------

part parent "m164p" # m164a
    desc                   = "ATmega164A";
    id                     = "m164a";
    variants               =
        "ATmega164A:      N/A,     Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-AU:   TQFP44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-AUR:  TQFP44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-CU:   VFBGA49, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-CUR:  VFBGA49, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-MCH:  QFN44,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-MCHR: QFN44,   Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-MU:   QFN44,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-MUR:  QFN44,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega164A-PU:   PDIP40,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 92;
    signature              = 0x1e 0x94 0x0f;
;

#------------------------------------------------------------
# ATmega324PB
#------------------------------------------------------------

part parent "m324p" # m324pb
    desc                   = "ATmega324PB";
    id                     = "m324pb";
    variants               =
        "ATmega324PB-AN:  TQFP44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PB-ANR: TQFP44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PB-AU:  TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PB-AUR: TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PB-MN:  QFN44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PB-MNR: QFN44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PB-MU:  VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PB-MUR: VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 113;
    n_interrupts           = 51;
    signature              = 0x1e 0x95 0x17;

    memory "efuse"
        initval            = 0x07;
        bitmask            = 0x0f;
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.iiii";
    ;

    memory "prodsig"
        size               = 24;
        read               = "0 0 1 1 a0 0 0 0  0 0 0 0 0 0 0 0  0 0 0 0 a4 a3 a2 a1  o o o o o o o o";
    ;

    memory "sigrow"
        alias "prodsig";
    ;
;

#------------------------------------------------------------
# ATmega324PA
#------------------------------------------------------------

part parent "m324p" # m324pa
    desc                   = "ATmega324PA";
    id                     = "m324pa";
    variants               =
        "ATmega324PA:      N/A,     Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-AN:   TQFP44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-AU:   TQFP44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-AUR:  TQFP44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-CU:   VFBGA49, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-MCH:  QFN44,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-MCHR: VQFN44,  Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-MN:   VQFN44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-MNR:  VQFN44,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-MU:   VQFN44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-MUR:  VQFN44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-PN:   PDIP40,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324PA-PU:   PDIP40,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 112;
    signature              = 0x1e 0x95 0x11;
;

#------------------------------------------------------------
# ATmega324A
#------------------------------------------------------------

part parent "m324p" # m324a
    desc                   = "ATmega324A";
    id                     = "m324a";
    variants               =
        "ATmega324A:     N/A,     Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega324A-AU:  TQFP44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324A-AUR: TQFP44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324A-CU:  VFBGA49, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324A-MCH: QFN44,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324A-MU:  VQFN44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega324A-MUR: VQFN44,  Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega324A-PU:  PDIP40,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 110;
    signature              = 0x1e 0x95 0x15;
;

#------------------------------------------------------------
# ATmega644
#------------------------------------------------------------

part # m644
    desc                   = "ATmega644";
    id                     = "m644";
    variants               =
        "ATmega644:        N/A,    Fmax=20 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega644-20AU:   TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644-20AUR:  TQFP44, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega644-20MU:   MLF44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644-20MUR:  VQFN44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644-20PU:   PDIP40, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644V-10AU:  TQFP44, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644V-10AUR: TQFP44, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644V-10MU:  MLF44,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644V-10MUR: VQFN44, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644V-10PU:  PDIP40, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 127;
    n_interrupts           = 28;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode         = 0x74;
    chip_erase_delay       = 55000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x96 0x09;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 2048;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--00xx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega644A
#------------------------------------------------------------

part parent "m644" # m644a
    desc                   = "ATmega644A";
    id                     = "m644a";
    variants               =
        "ATmega644A:     N/A,    Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644A-AU:  TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644A-AUR: TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644A-MU:  VQFN44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644A-MUR: VQFN44, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644A-PU:  PDIP40, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 128;
    n_interrupts           = 31;
;

#------------------------------------------------------------
# ATmega644P
#------------------------------------------------------------

part parent "m644" # m644p
    desc                   = "ATmega644P";
    id                     = "m644p";
    variants               =
        "ATmega644P:        N/A,    Fmax=20 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega644P-20AN:   TQFP44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20AQ:   TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20AQR:  TQFP44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20AU:   TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20AUR:  TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20MN:   VQFN44, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20MQ:   VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20MQR:  VQFN44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20MU:   VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20MUR:  VQFN44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20PN:   PDIP40, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20PQ:   PDIP40, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644P-20PU:   PDIP40, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega644PV-10AN:  TQFP44, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10AQ:  TQFP44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10AQR: TQFP44, Fmax=10 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10AU:  TQFP44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10AUR: TQFP44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10MN:  VQFN44, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10MQ:  VQFN44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10MQR: VQFN44, Fmax=10 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10MU:  VQFN44, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10MUR: VQFN44, Fmax=10 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10PN:  PDIP40, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10PQ:  PDIP40, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PV-10PU:  PDIP40, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 129;
    n_interrupts           = 31;
    signature              = 0x1e 0x96 0x0a;
;

#------------------------------------------------------------
# ATmega644PA
#------------------------------------------------------------

part parent "m644" # m644pa
    desc                   = "ATmega644PA";
    id                     = "m644pa";
    variants               =
        "ATmega644PA-AN:  TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-ANR: TQFP44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-AU:  TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-AUR: TQFP44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-MN:  VQFN44, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-MNR: VQFN44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-MU:  QFN44,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-MUR: VQFN44, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-PN:  PDIP40, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega644PA-PU:  PDIP40, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 130;
    n_interrupts           = 31;
    signature              = 0x1e 0x96 0x0a;
;

#------------------------------------------------------------
# ATmega1284
#------------------------------------------------------------

part # m1284
    desc                   = "ATmega1284";
    id                     = "m1284";
    variants               =
        "ATmega1284-AU:  TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284-AUR: TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284-MU:  MLF44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284-MUR: MLF44,  Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284-PU:  PDIP40, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 140;
    n_interrupts           = 35;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode         = 0x74;
    chip_erase_delay       = 55000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x97 0x06;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    rampz                  = 0x3b;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 128;
        read               = "1010.0000--00xx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x20000;
        page_size          = 256;
        num_pages          = 512;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 128;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--00xx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega1284P
#------------------------------------------------------------

part parent "m1284" # m1284p
    desc                   = "ATmega1284P";
    id                     = "m1284p";
    variants               =
        "ATmega1284P-AN:  TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284P-AU:  TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284P-AUR: TQFP44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284P-MN:  QFN44,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284P-MU:  VQFN44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284P-MUR: VQFN44, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284P-PN:  PDIP40, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1284P-PU:  PDIP40, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 141;
    signature              = 0x1e 0x97 0x05;
;

#------------------------------------------------------------
# ATmega162
#------------------------------------------------------------

part # m162
    desc                   = "ATmega162";
    id                     = "m162";
    variants               =
        "ATmega162:       N/A,     Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega162-16AC:  TQFP44,  Fmax=16 MHz, T=[0 C,   70 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega162-16AI:  TQFP44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16AJ:  TQFP44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16AU:  TQFP44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16AUR: TQFP44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16MC:  VFQFN44, Fmax=16 MHz, T=[0 C,   70 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega162-16MI:  VFQFN44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16MJ:  VFQFN44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16MU:  VFQFN44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16MUR: VFQFN44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16PC:  DIP40,   Fmax=16 MHz, T=[0 C,   70 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega162-16PI:  DIP40,   Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16PJ:  DIP40,   Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162-16PU:  DIP40,   Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162L-8AC:  TQFP44,  Fmax=8 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162L-8AI:  TQFP44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162L-8MC:  VFQFN44, Fmax=8 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162L-8MI:  VFQFN44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162L-8PC:  DIP40,   Fmax=8 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162L-8PI:  DIP40,   Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega162V-1AC:  TQFP44,  Fmax=1 MHz,  T=[0 C,   70 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega162V-1MC:  VFQFN44, Fmax=1 MHz,  T=[0 C,   70 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega162V-1PC:  DIP40,   Fmax=1 MHz,  T=[0 C,   70 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega162V-8AI:  TQFP44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8AJ:  TQFP44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8AU:  TQFP44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8AUR: TQFP44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8MI:  VFQFN44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8MJ:  VFQFN44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8MU:  VFQFN44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8MUR: VFQFN44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8PI:  DIP40,   Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8PJ:  DIP40,   Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega162V-8PU:  DIP40,   Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
    mcuid                  = 90;
    n_interrupts           = 28;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x83;
    avr910_devcode         = 0x63;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x94 0x04;
    reset                  = io;
    allowfullpagebitstream = yes;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x04;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 2;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--00xx.xxaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 16000;
        max_write_delay    = 16000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 16000;
        max_write_delay    = 16000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x1e;
        min_write_delay    = 16000;
        max_write_delay    = 16000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--111i.iii1";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 16000;
        max_write_delay    = 16000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--00xx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--00xx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega163
#------------------------------------------------------------

part # m163
    desc                   = "ATmega163";
    id                     = "m163";
    variants               =
        "ATmega163-8AC:  TQFP44, Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V,   5.5 V]",
        "ATmega163-8AI:  TQFP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATmega163-8PC:  DIP40,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V,   5.5 V]",
        "ATmega163-8PI:  DIP40,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATmega163L-4AC: TQFP44, Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega163L-4AI: TQFP44, Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega163L-4PC: DIP40,  Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega163L-4PI: DIP40,  Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 91;
    n_interrupts           = 18;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x81;
    avr910_devcode         = 0x64;
    chip_erase_delay       = 32000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x94 0x02;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepolltimeout   = 30;
    programfusepolltimeout = 2;
    programlockpolltimeout = 2;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        readback           = 0xff 0xff;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 16000;
        max_write_delay    = 16000;
        readback           = 0xff 0xff;
        mode               = 0x11;
        delay              = 20;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xdf;
        bitmask            = 0xef;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--ooxx.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--ii11.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--xxxx.1ooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--1111.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.1000--0000.0000--xxxx.0xxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega169
#------------------------------------------------------------

part # m169
    desc                   = "ATmega169";
    id                     = "m169";
    variants               =
        "ATmega169:      N/A,     Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega169-16AI: TQFP64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169-16AU: TQFP64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169-16MI: VFQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169-16MU: VFQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169L-4AC: TQFP64,  Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169L-4MC: VFQFN64, Fmax=4 MHz,  T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169L-8AI: TQFP64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169L-8MI: VFQFN64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169V-1AC: TQFP64,  Fmax=1 MHz,  T=[0 C,   70 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169V-1MC: VFQFN64, Fmax=1 MHz,  T=[0 C,   70 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169V-8AI: TQFP64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169V-8AU: TQFP64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169V-8MI: VFQFN64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169V-8MU: VFQFN64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
    mcuid                  = 104;
    n_interrupts           = 23;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x85;
    avr910_devcode         = 0x78;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x94 0x05;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 2;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0xff;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x0f;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega169A
#------------------------------------------------------------

part parent "m169" # m169a
    desc                   = "ATmega169A";
    id                     = "m169a";
    variants               =
        "ATmega169A-AN:  TQFP64,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169A-AU:  TQFP64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169A-AUR: TQFP64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169A-MCH: DRQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169A-MN:  QFN64,   Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169A-MU:  QFN64,   Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169A-MUR: QFN64,   Fmax=16 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 105;
    signature              = 0x1e 0x94 0x11;
    reset                  = io;
    latchcycles            = 6;
    togglevtg              = 0;
    poweroffdelay          = 0;
    resetdelayms           = 0;
    resetdelay             = 15;

    memory "eeprom"
        readback           = 0x00 0x00;
    ;

    memory "flash"
        readback           = 0x00 0x00;
        delay              = 10;
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;
;

#------------------------------------------------------------
# ATmega169P
#------------------------------------------------------------

part parent "m169" # m169p
    desc                   = "ATmega169P";
    id                     = "m169p";
    variants               =
        "ATmega169P:        N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega169P-16AU:   TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169P-16AUR:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169P-16MCH:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169P-16MCHR: QFN64,  Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega169P-16MCU:  VQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169P-16MU:   QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega169P-16MUR:  QFN64,  Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega169PV-8AU:   TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PV-8AUR:  TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PV-8MCH:  QFN64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PV-8MCHR: QFN64,  Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PV-8MCU:  VQFN64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PV-8MU:   MLF64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PV-8MUR:  QFN64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 106;
    reset                  = io;
    latchcycles            = 6;
    togglevtg              = 0;
    poweroffdelay          = 0;
    resetdelayms           = 0;
    resetdelay             = 15;

    memory "eeprom"
        readback           = 0x00 0x00;
    ;

    memory "flash"
        readback           = 0x00 0x00;
        delay              = 10;
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;
;

#------------------------------------------------------------
# ATmega169PA
#------------------------------------------------------------

part parent "m169" # m169pa
    desc                   = "ATmega169PA";
    id                     = "m169pa";
    variants               =
        "ATmega169PA-AN:   TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PA-ANR:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PA-AU:   TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PA-AUR:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PA-MCH:  QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PA-MCHR: QFN64,  Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega169PA-MN:   VQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PA-MNR:  QFN64,  Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega169PA-MU:   QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega169PA-MUR:  QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 107;
    reset                  = io;
    latchcycles            = 6;
    togglevtg              = 0;
    poweroffdelay          = 0;
    resetdelayms           = 0;
    resetdelay             = 15;

    memory "eeprom"
        readback           = 0x00 0x00;
    ;

    memory "flash"
        readback           = 0x00 0x00;
        delay              = 10;
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;
;

#------------------------------------------------------------
# ATmega329
#------------------------------------------------------------

part # m329
    desc                   = "ATmega329";
    id                     = "m329";
    variants               =
        "ATmega329:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega329-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega329-16AUR: TQFP64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega329-16MU:  MLF64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega329-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega329V-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329V-8AUR: TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329V-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329V-8MUR: VQFN64, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 121;
    n_interrupts           = 23;
    n_boot_sections        = 4;
    boot_section_size      = 512;
#   stk500_devcode         = 0x85; # no STK500 support, only STK500v2
#   avr910_devcode         = 0x?;  # try the ATmega169 one:
    avr910_devcode         = 0x75;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x95 0x03;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 128;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega329A
#------------------------------------------------------------

part parent "m329" # m329a
    desc                   = "ATmega329A";
    id                     = "m329a";
    variants               =
        "ATmega329A-AN:  TQFP64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329A-AU:  TQFP64, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329A-AUR: TQFP64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega329A-MN:  QFN64,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329A-MU:  VQFN64, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 122;
;

#------------------------------------------------------------
# ATmega329P
#------------------------------------------------------------

part parent "m329" # m329p
    desc                   = "ATmega329P";
    id                     = "m329p";
    variants               =
        "ATmega329P:        N/A,    Fmax=20 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega329P-20AN:   TQFP64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329P-20ANR:  TQFP64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega329P-20AU:   TQFP64, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega329P-20AUR:  TQFP64, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega329P-20MN:   VQFN64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega329P-20MNR:  VQFN64, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega329P-20MU:   MLF64,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega329P-20MUR:  VQFN64, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega329PV-10AU:  TQFP64, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PV-10AUR: TQFP64, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PV-10MN:  VQFN64, Fmax=10 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PV-10MU:  MLF64,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PV-10MUR: VQFN64, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 123;
    signature              = 0x1e 0x95 0x0b;
;

#------------------------------------------------------------
# ATmega329PA
#------------------------------------------------------------

part parent "m329" # m329pa
    desc                   = "ATmega329PA";
    id                     = "m329pa";
    variants               =
        "ATmega329PA-AN:  TQFP64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PA-AU:  TQFP64, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PA-AUR: TQFP64, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PA-MN:  QFN64,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PA-MU:  QFN64,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega329PA-MUR: VQFN64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 124;
    signature              = 0x1e 0x95 0x0b;
;

#------------------------------------------------------------
# ATmega3290
#------------------------------------------------------------

part parent "m329" # m3290
    desc                   = "ATmega3290";
    id                     = "m3290";
    variants               =
        "ATmega3290:       N/A,     Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290-16AU:  TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega3290-16AUR: TQFP100, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega3290V-8AU:  TQFP100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290V-8AUR: TQFP100, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 150;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x04;
;

#------------------------------------------------------------
# ATmega3290A
#------------------------------------------------------------

part parent "m329" # m3290a
    desc                   = "ATmega3290A";
    id                     = "m3290a";
    variants               =
        "ATmega3290A:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290A-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290A-AUR: TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 151;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x04;
;

#------------------------------------------------------------
# ATmega3290P
#------------------------------------------------------------

part parent "m329" # m3290p
    desc                   = "ATmega3290P";
    id                     = "m3290p";
    variants               =
        "ATmega3290P:        TQFP100, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290P-20AU:   TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega3290P-20AUR:  TQFP100, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega3290PV-10AU:  TQFP100, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290PV-10AUR: TQFP100, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 152;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x0c;
;

#------------------------------------------------------------
# ATmega3290PA
#------------------------------------------------------------

part parent "m329" # m3290pa
    desc                   = "ATmega3290PA";
    id                     = "m3290pa";
    variants               =
        "ATmega3290PA:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290PA-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3290PA-AUR: TQFP100, Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 153;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x0c;
;

#------------------------------------------------------------
# ATmega649
#------------------------------------------------------------

part # m649
    desc                   = "ATmega649";
    id                     = "m649";
    variants               =
        "ATmega649:       N/A,    Fmax=16 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega649-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega649-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega649-16MU:  MLF64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega649-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega649V-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega649V-8AUR: TQFP64, Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega649V-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega649V-8MUR: VQFN64, Fmax=8 MHz,  T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 135;
    n_interrupts           = 23;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
#   stk500_devcode         = 0x85; # no STK500 support, only STK500v2
#   avr910_devcode         = 0x?;  # try the ATmega169 one:
    avr910_devcode         = 0x75;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x96 0x03;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 2048;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega649A
#------------------------------------------------------------

part parent "m649" # m649a
    desc                   = "ATmega649A";
    id                     = "m649a";
    variants               =
        "ATmega649A-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega649A-AUR: TQFP64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega649A-MU:  VQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega649A-MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 136;
;

#------------------------------------------------------------
# ATmega649P
#------------------------------------------------------------

part parent "m649" # m649p
    desc                   = "ATmega649P";
    id                     = "m649p";
    variants               =
        "ATmega649P-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega649P-AUR: TQFP64, Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega649P-MU:  VQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega649P-MUR: VQFN64, Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 137;
    signature              = 0x1e 0x96 0x0b;
;

#------------------------------------------------------------
# ATmega6490
#------------------------------------------------------------

part parent "m649" # m6490
    desc                   = "ATmega6490";
    id                     = "m6490";
    variants               =
        "ATmega6490:       N/A,     Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega6490-16AU:  TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega6490-16AUR: TQFP100, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega6490V-8AU:  TQFP100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega6490V-8AUR: TQFP100, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 157;
    n_interrupts           = 25;
    signature              = 0x1e 0x96 0x04;
;

#------------------------------------------------------------
# ATmega6490A
#------------------------------------------------------------

part parent "m649" # m6490a
    desc                   = "ATmega6490A";
    id                     = "m6490a";
    variants               =
        "ATmega6490A:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega6490A-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega6490A-AUR: TQFP100, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 158;
    n_interrupts           = 25;
    signature              = 0x1e 0x96 0x04;
;

#------------------------------------------------------------
# ATmega6490P
#------------------------------------------------------------

part parent "m649" # m6490p
    desc                   = "ATmega6490P";
    id                     = "m6490p";
    variants               =
        "ATmega6490P:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega6490P-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega6490P-AUR: TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 159;
    n_interrupts           = 25;
    signature              = 0x1e 0x96 0x0c;
;

#------------------------------------------------------------
# ATmega32
#------------------------------------------------------------

part # m32
    desc                   = "ATmega32";
    id                     = "m32";
    variants               =
        "ATmega32:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega32-16AQ:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega32-16AQR: TQFP44, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega32-16AU:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega32-16AUR: TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega32-16MU:  MLF44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega32-16MUR: VQFN44, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega32-16PU:  PDIP40, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega32L-8AU:  TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32L-8AUR: TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32L-8MU:  MLF44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32L-8MUR: VQFN44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32L-8PU:  PDIP40, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
    mcuid                  = 58;
    n_interrupts           = 21;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    stk500_devcode         = 0x91;
    avr910_devcode         = 0x72;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x95 0x02;
    reset                  = io;
    allowfullpagebitstream = yes;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 2;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--00xx.xxaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 128;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega161
#------------------------------------------------------------

part # m161
    desc                   = "ATmega161";
    id                     = "m161";
    variants               =
        "ATmega161-8AC:  TQFP44, Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V,   5.5 V]",
        "ATmega161-8AI:  TQFP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATmega161-8PC:  DIP40,  Fmax=8 MHz, T=[0 C,   70 C], Vcc=[4 V,   5.5 V]",
        "ATmega161-8PI:  DIP40,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V,   5.5 V]",
        "ATmega161L-4AC: TQFP44, Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega161L-4AI: TQFP44, Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega161L-4PC: DIP40,  Fmax=4 MHz, T=[0 C,   70 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega161L-4PI: DIP40,  Fmax=4 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 89;
    n_interrupts           = 21;
    n_boot_sections        = 1;
    boot_section_size      = 1024;
    stk500_devcode         = 0x80;
    avr910_devcode         = 0x60;
    chip_erase_delay       = 28000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x94 0x01;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    chiperasepolltimeout   = 30;
    programfusepolltimeout = 2;
    programlockpolltimeout = 2;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        min_write_delay    = 3400;
        max_write_delay    = 3400;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 5;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 14000;
        max_write_delay    = 14000;
        readback           = 0xff 0xff;
        mode               = 0x21;
        delay              = 16;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xda;
        bitmask            = 0x77;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.0000--xxxx.xxxx--xxxx.xxxx--xoxo.oooo";
        write              = "1010.1100--101x.xxxx--xxxx.xxxx--1i1i.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega32A
#------------------------------------------------------------

part parent "m32" # m32a
    desc                   = "ATmega32A";
    id                     = "m32a";
    variants               =
        "ATmega32A-AN:  TQFP44, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-ANR: TQFP44, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-AU:  TQFP44, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-AUR: TQFP44, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-MN:  VQFN44, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-MNR: VQFN44, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-MU:  MLF44,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-MUR: VQFN44, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-PN:  PDIP40, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32A-PU:  PDIP40, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 59;
;

#------------------------------------------------------------
# ATmega8
#------------------------------------------------------------

part # m8
    desc                   = "ATmega8";
    id                     = "m8";
    variants               =
        "ATmega8:       N/A,    Fmax=16 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega8-16AN:  TQFP32, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8-16AU:  TQFP32, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8-16AUR: TQFP32, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8-16MN:  QFN32,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8-16MU:  MLF32,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8-16MUR: MLF32,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8-16PN:  PDIP28, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8-16PU:  PDIP28, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8L-8AN:  TQFP32, Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8L-8AU:  TQFP32, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8L-8AUR: TQFP32, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8L-8MN:  QFN32,  Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8L-8MU:  MLF32,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8L-8MUR: VQFN32, Fmax=8 MHz,  T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega8L-8PN:  PDIP28, Fmax=8 MHz,  T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8L-8PU:  PDIP28, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 45;
    n_interrupts           = 19;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x70;
    avr910_devcode         = 0x76;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
    signature              = 0x1e 0x93 0x07;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 2;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 20;
    programfusepolltimeout = 10;
    programlockpolltimeout = 10;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--00xx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega8A
#------------------------------------------------------------

part parent "m8" # m8a
    desc                   = "ATmega8A";
    id                     = "m8a";
    variants               =
        "ATmega8A:     N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-AN:  TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-ANR: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-AU:  TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-AUR: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-MN:  QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-MNR: VQFN32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-MU:  VQFN32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-MUR: QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-PN:  PDIP28, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8A-PU:  PDIP28, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 46;
;

#------------------------------------------------------------
# ATmega8515
#------------------------------------------------------------

part # m8515
    desc                   = "ATmega8515";
    id                     = "m8515";
    variants               =
        "ATmega8515:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega8515-16AU:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8515-16AUR: TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8515-16JU:  PLCC44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8515-16JUR: PLCC44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8515-16MU:  QFN44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8515-16MUR: VQFN44, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega8515-16PU:  PDIP40, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8515L-8AU:  TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8515L-8AUR: TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8515L-8JU:  PLCC44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8515L-8JUR: PLCC44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8515L-8MU:  MLF44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8515L-8MUR: VQFN44, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega8515L-8PU:  PDIP40, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 160;
    n_interrupts           = 17;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x63;
    avr910_devcode         = 0x3a;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x93 0x06;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega8535
#------------------------------------------------------------

part # m8535
    desc                   = "ATmega8535";
    id                     = "m8535";
    variants               =
        "ATmega8535:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega8535-16AU:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8535-16AUR: TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8535-16JU:  PLCC44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8535-16JUR: PLCC44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8535-16MU:  MLF44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8535-16MUR: VQFN44, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega8535-16PU:  PDIP40, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega8535L-8AU:  TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8535L-8AUR: TQFP44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8535L-8JU:  PLCC44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8535L-8JUR: PLCC44, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8535L-8MU:  MLF44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8535L-8MUR: MLF44,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8535L-8PU:  PDIP40, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP;
    mcuid                  = 161;
    n_interrupts           = 21;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x64;
    avr910_devcode         = 0x69;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x93 0x08;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 128;
        readsize           = 256;
        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 2000;
        max_write_delay    = 2000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--00xx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny26
#------------------------------------------------------------

part # t26
    desc                   = "ATtiny26";
    id                     = "t26";
    variants               =
        "ATtiny26:       N/A,    Fmax=16 MHz, T=[N/A,   85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny26-16MU:  MLF32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATtiny26-16MUR: VQFN32, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATtiny26-16PU:  PDIP20, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATtiny26-16SU:  SOIC20, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATtiny26-16SUR: SOIC20, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATtiny26L-8MU:  MLF32,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny26L-8MUR: VQFN32, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny26L-8PU:  PDIP20, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny26L-8SU:  SOIC20, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny26L-8SUR: SOIC20, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_ISP | PM_HVPP;
    mcuid                  = 17;
    n_interrupts           = 12;
    stk500_devcode         = 0x21;
    avr910_devcode         = 0x5e;
    chip_erase_delay       = 9000;
    pagel                  = 0xb3;
    bs2                    = 0xb2;
    signature              = 0x1e 0x91 0x09;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 2;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 20;
    programfusepolltimeout = 10;
    programlockpolltimeout = 10;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        readback           = 0xff 0xff;
        mode               = 0x04;
        delay              = 20;
        blocksize          = 64;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
    ;

    memory "flash"
        paged              = yes;
        size               = 2048;
        page_size          = 32;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0x00;
        mode               = 0x21;
        delay              = 10;
        blocksize          = 16;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxx.xxaa--aaaa.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xe1;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xf7;
        bitmask            = 0x1f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--xxxi.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 4;
        read               = "0011.1000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny261
#------------------------------------------------------------

part # t261
    desc                   = "ATtiny261";
    id                     = "t261";
    variants               =
        "ATtiny261:       N/A,    Fmax=20 MHz, T=[N/A,   85 C], Vcc=[N/A,     N/A]",
        "ATtiny261-20MU:  MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny261-20PU:  PDIP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny261-20SU:  SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny261V-10MU: MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261V-10PU: PDIP20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261V-10SU: SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 30;
    n_interrupts           = 19;
    chip_erase_delay       = 4000;
    pagel                  = 0xb3;
    bs2                    = 0xb2;
#   stk500_devcode         = 0x21;
#   avr910_devcode         = 0x5e;
    signature              = 0x1e 0x91 0x0c;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb4, 0x00, 0x10;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x00, 0xb4, 0x00, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x20;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        page_size          = 4;
        num_pages          = 32;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 2048;
        page_size          = 32;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 32;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xxaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxx.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxx.xxaa--aaaa.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny261A
#------------------------------------------------------------

part parent "t261" # t261a
    desc                   = "ATtiny261A";
    id                     = "t261a";
    variants               =
        "ATtiny261A:     N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-MF:  MLF32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-MFR: MLF32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-MN:  MLF32,   Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-MNR: VQFN32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-MU:  QFN32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-PU:  PDIP20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-SU:  SOIC20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-SUR: SOIC20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-XU:  TSSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny261A-XUR: TSSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 31;
;

#------------------------------------------------------------
# ATtiny461
#------------------------------------------------------------

part # t461
    desc                   = "ATtiny461";
    id                     = "t461";
    variants               =
        "ATtiny461:        N/A,    Fmax=20 MHz, T=[N/A,   85 C], Vcc=[N/A,     N/A]",
        "ATtiny461-20MU:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny461-20MUR:  VQFN32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny461-20PU:   PDIP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny461-20SU:   SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny461-20SUR:  SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny461V-10MU:  MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461V-10MUR: VQFN32, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461V-10PU:  PDIP20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461V-10SU:  SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461V-10SUR: SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 33;
    n_interrupts           = 19;
    chip_erase_delay       = 4000;
    pagel                  = 0xb3;
    bs2                    = 0xb2;
#   stk500_devcode         = 0x21;
#   avr910_devcode         = 0x5e;
    signature              = 0x1e 0x92 0x08;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb4, 0x00, 0x10;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x00, 0xb4, 0x00, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x20;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        num_pages          = 64;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxx--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxx--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 4096;
        page_size          = 64;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxx.xaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny461A
#------------------------------------------------------------

part parent "t461" # t461a
    desc                   = "ATtiny461A";
    id                     = "t461a";
    variants               =
        "ATtiny461A:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461A-MU:  QFN32,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461A-PU:  PDIP20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461A-SU:  SOIC20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461A-SUR: SOIC20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461A-XU:  TSSOP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny461A-XUR: TSSOP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 34;
;

#------------------------------------------------------------
# ATtiny861
#------------------------------------------------------------

part # t861
    desc                   = "ATtiny861";
    id                     = "t861";
    variants               =
        "ATtiny861:        N/A,    Fmax=20 MHz, T=[N/A,   85 C], Vcc=[N/A,     N/A]",
        "ATtiny861-20MU:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny861-20MUR:  VQFN32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny861-20PU:   PDIP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny861-20SU:   SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny861-20SUR:  SOIC20, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny861V-10MU:  MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861V-10MUR: VQFN32, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861V-10PU:  PDIP20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861V-10SU:  SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861V-10SUR: SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 38;
    n_interrupts           = 19;
    chip_erase_delay       = 4000;
    pagel                  = 0xb3;
    bs2                    = 0xb2;
#   stk500_devcode         = 0x21;
#   avr910_devcode         = 0x5e;
    signature              = 0x1e 0x93 0x0d;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb4, 0x00, 0x10;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x00, 0xb4, 0x00, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x20;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        num_pages          = 128;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxx.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--xxxx.xxxx--xxxx.xxxx--xxxx.xxoo";
        write              = "1010.1100--1111.11ii--xxxx.xxxx--xxxx.xxxx";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny861A
#------------------------------------------------------------

part parent "t861" # t861a
    desc                   = "ATtiny861A";
    id                     = "t861a";
    variants               =
        "ATtiny861A:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861A-MU:  QFN32,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861A-MUR: VQFN32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861A-PU:  PDIP20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861A-SU:  SOIC20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861A-SUR: SOIC20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861A-XU:  TSSOP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny861A-XUR: TSSOP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 39;
;

#------------------------------------------------------------
# ATtiny28
#------------------------------------------------------------

# This is an HVPP-only device.

part # t28
    desc                   = "ATtiny28";
    id                     = "t28";
    variants               =
        "ATtiny28:       N/A,    Fmax=N/A,     T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny28L-4AU:  TQFP32, Fmax=4 MHz,   T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny28L-4MU:  MLF32,  Fmax=4 MHz,   T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny28L-4MUR: VQFN32, Fmax=4 MHz,   T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny28L-4PU:  PDIP28, Fmax=4 MHz,   T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny28V-1AU:  TQFP32, Fmax=1.2 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny28V-1AUR: TQFP32, Fmax=1 MHz,   T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny28V-1MU:  MLF32,  Fmax=1.2 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny28V-1MUR: VQFN32, Fmax=1 MHz,   T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny28V-1PU:  PDIP28, Fmax=1.2 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_HVPP;
    mcuid                  = 18;
    n_interrupts           = 6;
    stk500_devcode         = 0x22;
    avr910_devcode         = 0x5c;
    signature              = 0x1e 0x91 0x07;
    serial                 = no;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    factory_fcpu           = 1200000;

    memory "flash"
        size               = 2048;
        page_size          = 2;
        delay              = 5;
        readsize           = 256;
    ;

    memory "fuse"
        size               = 1;
        initval            = 0x12;
        bitmask            = 0x1f;
    ;

    memory "lock"
        size               = 1;
        initval            = 0x06;
        bitmask            = 0x06;
    ;

    memory "signature"
        size               = 3;
    ;

    memory "calibration"
        size               = 1;
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 32;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega48
#------------------------------------------------------------

part # m48
    desc                   = "ATmega48";
    id                     = "m48";
    variants               =
        "ATmega48:         N/A,    Fmax=20 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega48-20AU:    TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48-20AUR:   TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48-20MMH:   VQFN28, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48-20MMU:   MLF28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48-20MU:    MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48-20MUR:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48-20PU:    PDIP28, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48V-10AU:   TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48V-10AUR:  TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48V-10MMH:  VQFN28, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48V-10MMU:  QFN28,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48V-10MMUR: VQFN28, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega48V-10MU:   MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48V-10MUR:  MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48V-10PU:   PDIP28, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 67;
    n_interrupts           = 26;
    stk500_devcode         = 0x59;
    chip_erase_delay       = 45000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x92 0x05;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 4096;
        page_size          = 64;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--0000.0000--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega48A
#------------------------------------------------------------

part parent "m48" # m48a
    desc                   = "ATmega48A";
    id                     = "m48a";
    variants               =
        "ATmega48A-AU:   TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48A-AUR:  TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48A-CCU:  UFBGA32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48A-MMH:  VQFN28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48A-MMHR: VQFN28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48A-MU:   QFN32,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48A-MUR:  VQFN32,  Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega48A-PU:   PDIP28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 68;
;

#------------------------------------------------------------
# ATmega48P
#------------------------------------------------------------

part parent "m48" # m48p
    desc                   = "ATmega48P";
    id                     = "m48p";
    variants               =
        "ATmega48P-20AU:    TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48P-20AUR:   TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48P-20MMU:   MLF28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48P-20MMUR:  VQFN28, Fmax=N/A,    T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega48P-20MU:    MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48P-20MUR:   VQFN32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48P-20PU:    PDIP28, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega48PV-10AU:   TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PV-10AUR:  TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PV-10MMU:  MLF28,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PV-10MMUR: VQFN28, Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PV-10MU:   MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PV-10MUR:  VQFN32, Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PV-10PU:   PDIP28, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 69;
    signature              = 0x1e 0x92 0x0a;
;

#------------------------------------------------------------
# ATmega48PA
#------------------------------------------------------------

part parent "m48" # m48pa
    desc                   = "ATmega48PA";
    id                     = "m48pa";
    variants               =
        "ATmega48PA:      N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-AN:   TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-ANR:  TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-AU:   TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-AUR:  QFP32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-CCU:  UFBGA32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MMH:  QFN28,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MMHR: QFN28,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MMN:  QFN28,   Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MMNR: TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MN:   QFN32,   Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MNR:  QFN32,   Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MU:   QFN32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-MUR:  VQFN32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-PN:   SPDIP28, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PA-PU:   PDIP28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 70;
    signature              = 0x1e 0x92 0x0a;
;

#------------------------------------------------------------
# ATmega48PB
#------------------------------------------------------------

part parent "m48" # m48pb
    desc                   = "ATmega48PB";
    id                     = "m48pb";
    variants               =
        "ATmega48PB-AN:  TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PB-ANR: TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PB-AU:  TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PB-AUR: TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PB-MN:  VQFN32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PB-MNR: VQFN32,  Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega48PB-MU:  VFQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega48PB-MUR: VQFN32,  Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 71;
    n_interrupts           = 27;
    chip_erase_delay       = 10500;
    signature              = 0x1e 0x92 0x10;
;

#------------------------------------------------------------
# ATmega88
#------------------------------------------------------------

part # m88
    desc                   = "ATmega88";
    id                     = "m88";
    variants               =
        "ATmega88:        N/A,    Fmax=20 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega88-20AU:   TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88-20AUR:  TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88-20MU:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88-20MUR:  MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88-20PU:   PDIP28, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88V-10AU:  TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88V-10AUR: TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88V-10MU:  MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88V-10MUR: VQFN32, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega88V-10PU:  PDIP28, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 79;
    n_interrupts           = 26;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x73;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x93 0x0a;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf9;
        bitmask            = 0x07;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega88A
#------------------------------------------------------------

part parent "m88" # m88a
    desc                   = "ATmega88A";
    id                     = "m88a";
    variants               =
        "ATmega88A:      N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-AU:   TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-AUR:  TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-CCU:  UFBGA32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-MMH:  QFN28,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-MMHR: VQFN28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-MU:   QFN32,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-MUR:  VQFN32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88A-PU:   PDIP28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 80;
;

#------------------------------------------------------------
# ATmega88P
#------------------------------------------------------------

part parent "m88" # m88p
    desc                   = "ATmega88P";
    id                     = "m88p";
    variants               =
        "ATmega88P-20AU:   TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88P-20AUR:  TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88P-20MU:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88P-20MUR:  VQFN32, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega88P-20PU:   PDIP28, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega88PV-10AU:  TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PV-10AUR: TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PV-10MU:  MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PV-10MUR: VQFN32, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PV-10PU:  PDIP28, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 81;
    signature              = 0x1e 0x93 0x0f;
;

#------------------------------------------------------------
# ATmega88PA
#------------------------------------------------------------

part parent "m88" # m88pa
    desc                   = "ATmega88PA";
    id                     = "m88pa";
    variants               =
        "ATmega88PA:      N/A,     Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-15MZ: TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-AN:   TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-ANR:  TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-AU:   TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-AUR:  TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-CCU:  UFBGA32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MMH:  QFN28,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MMHR: VQFN28,  Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MMN:  VQFN28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MMNR: VQFN28,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MMUR: PDIP28,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MN:   QFN32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MNR:  QFN32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MU:   QFN32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-MUR:  VQFN32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-PN:   PDIP28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PA-PU:   PDIP28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 82;
    signature              = 0x1e 0x93 0x0f;
;

#------------------------------------------------------------
# ATmega88PB
#------------------------------------------------------------

part parent "m88" # m88pb
    desc                   = "ATmega88PB";
    id                     = "m88pb";
    variants               =
        "ATmega88PB-AN:  TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PB-ANR: TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PB-AU:  TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PB-AUR: TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PB-MN:  VQFN32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PB-MNR: VQFN32,  Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega88PB-MU:  VFQFN32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega88PB-MUR: VQFN32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 83;
    n_interrupts           = 27;
    chip_erase_delay       = 10500;
    signature              = 0x1e 0x93 0x16;
;

#------------------------------------------------------------
# ATmega168
#------------------------------------------------------------

part # m168
    desc                   = "ATmega168";
    id                     = "m168";
    variants               =
        "ATmega168:        N/A,    Fmax=20 MHz, T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATmega168-15AD:   TQFP32, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168-20AU:   TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168-20AUR:  TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168-20MQ:   MLF32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168-20MQR:  QFN32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168-20MU:   MLF32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168-20MUR:  MLF32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168-20PU:   PDIP28, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168V-10AU:  TQFP32, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168V-10AUR: TQFP32, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168V-10MQ:  QFN32,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168V-10MQR: QFN32,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168V-10MU:  MLF32,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168V-10MUR: MLF32,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168V-10PU:  PDIP28, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 99;
    n_interrupts           = 26;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x86;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x94 0x06;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--000a.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf9;
        bitmask            = 0x07;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega168A
#------------------------------------------------------------

part parent "m168" # m168a
    desc                   = "ATmega168A";
    id                     = "m168a";
    variants               =
        "ATmega168A:      N/A,     Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-AU:   TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-AUR:  TQFP32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-CCU:  UFBGA32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-MMH:  VQFN28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-MMHR: VQFN28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-MU:   QFN32,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-MUR:  QFN32,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168A-PU:   PDIP28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 100;
;

#------------------------------------------------------------
# ATmega168P
#------------------------------------------------------------

part parent "m168" # m168p
    desc                   = "ATmega168P";
    id                     = "m168p";
    variants               =
        "ATmega168P-20AN:   TQFP32, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20ANR:  TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20AU:   TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20AUR:  TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20MQ:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20MQR:  QFN32,  Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20MU:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20MUR:  MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168P-20PU:   PDIP28, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega168PV-10AN:  TQFP32, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PV-10AU:  TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PV-10AUR: TQFP32, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PV-10MU:  MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PV-10MUR: MLF32,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PV-10PU:  PDIP28, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 101;
    signature              = 0x1e 0x94 0x0b;
;

#------------------------------------------------------------
# ATmega168PA
#------------------------------------------------------------

part parent "m168" # m168pa
    desc                   = "ATmega168PA";
    id                     = "m168pa";
    variants               =
        "ATmega168PA:      N/A,     Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-AN:   TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-ANR:  TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-AU:   TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-AUR:  TQFP32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-CCU:  UFBGA32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-MMH:  MLF28,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-MMHR: QFN32,   Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-MN:   QFN32,   Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-MNR:  QFN32,   Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-MU:   VQFN32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-MUR:  QFN32,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-PN:   PDIP28,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PA-PU:   PDIP28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 102;
    signature              = 0x1e 0x94 0x0b;
;

#------------------------------------------------------------
# ATmega168PB
#------------------------------------------------------------

part parent "m168" # m168pb
    desc                   = "ATmega168PB";
    id                     = "m168pb";
    variants               =
        "ATmega168PB-AN:  TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PB-ANR: TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PB-AU:  TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PB-AUR: TQFP32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PB-MN:  VQFN32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PB-MU:  VFQFN32, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega168PB-MUR: VQFN32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 103;
    n_interrupts           = 27;
    chip_erase_delay       = 10500;
    signature              = 0x1e 0x94 0x15;
;

#------------------------------------------------------------
# ATtiny828
#------------------------------------------------------------

part # t828
    desc                   = "ATtiny828";
    id                     = "t828";
    variants               =
        "ATtiny828:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.62 V, 5.5 V]",
        "ATtiny828-AU:  TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.7 V,  5.5 V]",
        "ATtiny828-AUR: TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.7 V,  5.5 V]",
        "ATtiny828-MU:  QFN32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.7 V,  5.5 V]",
        "ATtiny828-MUR: VQFN32, Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,      N/A]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 35;
    n_interrupts           = 26;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x86;
    chip_erase_delay       = 15000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x93 0x14;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x6e;
        bitmask            = 0xf3;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0xf7;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATtiny828R
#------------------------------------------------------------

part parent "t828" # t828r
    desc                   = "ATtiny828R";
    id                     = "t828r";
    variants               =
        "ATtiny828R-AU:  TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny828R-AUR: TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]";
    mcuid                  = 36;
;

#------------------------------------------------------------
# ATtiny87
#------------------------------------------------------------

part # t87
    desc                   = "ATtiny87";
    id                     = "t87";
    variants               =
        "ATtiny87:     N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny87-MU:  VQFN32,  Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny87-MUR: VQFN32,  Fmax=16 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny87-SU:  SOIC20,  Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny87-SUR: SOIC20,  Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny87-XU:  TSSOP20, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny87-XUR: TSSOP20, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 27;
    n_interrupts           = 20;
#   no STK500 devcode in XML file, use the ATtiny45 one
    stk500_devcode         = 0x14;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 15000;
    pagel                  = 0xb3;
    bs2                    = 0xb2;
    signature              = 0x1e 0x93 0x87;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
        0x06, 0x16, 0x46, 0x56, 0x0a, 0x1a, 0x4a, 0x5a,
        0x1e, 0x7c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 128;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
    ;

    # ATtiny87 has signature bytes 0x1E 0x93 0x87
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATtiny167
#------------------------------------------------------------

part # t167
    desc                   = "ATtiny167";
    id                     = "t167";
    variants               =
        "ATtiny167:       N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny167-A15XD: TSSOP20, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny167-MMU:   WQFN20,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny167-MMUR:  WQFN20,  Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATtiny167-MU:    VQFN32,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny167-MUR:   VQFN32,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny167-SU:    SOIC20,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny167-SUR:   SOIC20,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny167-XU:    TSSOP20, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny167-XUR:   TSSOP20, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 29;
    n_interrupts           = 20;
#   no STK500 devcode in XML file, use the ATtiny45 one
    stk500_devcode         = 0x14;
#   avr910_devcode         = 0x??;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 15000;
    pagel                  = 0xb3;
    bs2                    = 0xb2;
    signature              = 0x1e 0x94 0x87;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
        0x06, 0x16, 0x46, 0x56, 0x0a, 0x1a, 0x4a, 0x5a,
        0x1e, 0x7c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--00xx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--00xx.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--000a.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATtiny48
#------------------------------------------------------------

part # t48
    desc                   = "ATtiny48";
    id                     = "t48";
    variants               =
        "ATtiny48-AU:   TQFP32,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-AUR:  TQFP32,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-CCU:  UFBGA32, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-MMH:  VQFN28,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-MMHR: VQFN28,  Fmax=12 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-MMU:  MLF28,   Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-MMUR: VQFN28,  Fmax=12 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-MU:   MLF32,   Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-MUR:  VQFN32,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny48-PU:   PDIP28,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 23;
    n_interrupts           = 20;
    stk500_devcode         = 0x73;
    chip_erase_delay       = 15000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x92 0x09;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 64;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 4096;
        page_size          = 64;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x6e;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.111i";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATtiny88
#------------------------------------------------------------

part # t88
    desc                   = "ATtiny88";
    id                     = "t88";
    variants               =
        "ATtiny88-AU:   TQFP32,  Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-AUR:  TQFP32,  Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-CCU:  UFBGA32, Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-MMH:  VQFN28,  Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-MMHR: VQFN28,  Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-MMU:  QFN28,   Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-MMUR: QFN28,   Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-MU:   QFN32,   Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-MUR:  VQFN32,  Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny88-PU:   PDIP28,  Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 28;
    n_interrupts           = 20;
    stk500_devcode         = 0x73;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x93 0x11;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 64;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x6e;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega328
#------------------------------------------------------------

part # m328
    desc                   = "ATmega328";
    id                     = "m328";
    variants               =
        "ATmega328-AU:   TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328-AUR:  TQFP32, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328-MMH:  MLF28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328-MMHR: MLF28,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328-MU:   MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328-MUR:  MLF32,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328-PU:   PDIP28, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 118;
    n_interrupts           = 26;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    stk500_devcode         = 0x86;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc2;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x95 0x14;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 128;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega328P
#------------------------------------------------------------

part parent "m328" # m328p
    desc                   = "ATmega328P";
    id                     = "m328p";
    variants               =
        "ATmega328P:      N/A,    Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-15MZ: MLF32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-AN:   TQFP32, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-ANR:  TQFP32, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-AU:   TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-AUR:  TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-MMH:  MLF28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-MMHR: MLF28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-MN:   QFN32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-MNR:  MLF32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-MU:   MLF32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-MUR:  MLF32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-PN:   PDIP28, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328P-PU:   PDIP28, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 119;
    signature              = 0x1e 0x95 0x0f;
;

#------------------------------------------------------------
# ATmega328PB
#------------------------------------------------------------

part parent "m328" # m328pb
    desc                   = "ATmega328PB";
    id                     = "m328pb";
    variants               =
        "ATmega328PB-AN:  TQFP32, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328PB-ANR: TQFP32, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328PB-AU:  TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328PB-AUR: TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328PB-MN:  QFN32,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328PB-MNR: QFN32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328PB-MU:  QFN32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega328PB-MUR: QFN32,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 120;
    n_interrupts           = 45;
    chip_erase_delay       = 10500;
    signature              = 0x1e 0x95 0x16;

    memory "efuse"
        initval            = 0xf7;
        bitmask            = 0x0f;
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "prodsig"
        size               = 24;
        read               = "0 0 1 1 a0 0 0 0  0 0 0 0 0 0 0 0  0 0 0 0 a4 a3 a2 a1  o o o o o o o o";
    ;

    memory "sigrow"
        alias "prodsig";
    ;
;

#------------------------------------------------------------
# ATmega64M1
#------------------------------------------------------------

part # m64m1
    desc                   = "ATmega64M1";
    id                     = "m64m1";
    variants               =
        "ATmega64M1-15MD: VQFN32, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega64M1-AU:   TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64M1-MU:   QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 76;
    n_interrupts           = 31;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xe2;
    signature              = 0x1e 0x96 0x84;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 2048;
        page_size          = 8;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.0aaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--0000.0aaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--0aaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--0aaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0aaa.aaaa--a000.0000--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--11oo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--11ii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega32M1
#------------------------------------------------------------

part parent "m64m1" # m32m1
    desc                   = "ATmega32M1";
    id                     = "m32m1";
    variants               =
        "ATmega32M1:     N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega32M1-AU:  TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32M1-AUR: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32M1-MU:  QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 63;
    boot_section_size      = 512;
    signature              = 0x1e 0x95 0x84;

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        blocksize          = 4;
        read               = "1010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.00aa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.00aa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 128;
        blocksize          = 128;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--00aa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--00aa.aaaa--iiii.iiii";
        writepage          = "0100.1100--00aa.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "sram"
        size               = 2048;
    ;
;

#------------------------------------------------------------
# ATmega16M1
#------------------------------------------------------------

part parent "m32m1" # m16m1
    desc                   = "ATmega16M1";
    id                     = "m16m1";
    variants               =
        "ATmega16M1-AU: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16M1-MU: QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 54;
    signature              = 0x1e 0x94 0x84;

    memory "eeprom"
        size               = 512;
        read               = "1010.0000--0000.000a--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.000a--aaaa.aaaa--iiii.iiii";
        writepage          = "1100.0010--0000.000a--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        size               = 0x4000;
        num_pages          = 128;
        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        writepage          = "0100.1100--000a.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "sram"
        size               = 1024;
    ;
;

#------------------------------------------------------------
# ATmega32C1
#------------------------------------------------------------

part parent "m32m1" # m32c1
    desc                   = "ATmega32C1";
    id                     = "m32c1";
    variants               =
        "ATmega32C1-15AD: TQFP32, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32C1-15AZ: TQFP32, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32C1-15MD: VQFN32, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32C1-15MZ: VQFN32, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32C1-AU:   TQFP32, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32C1-ESAD: TQFP32, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32C1-ESMD: VQFN32, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32C1-MU:   QFN32,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 62;
    signature              = 0x1e 0x95 0x86;
;

#------------------------------------------------------------
# ATmega64C1
#------------------------------------------------------------

part parent "m64m1" # m64c1
    desc                   = "ATmega64C1";
    id                     = "m64c1";
    variants               =
        "ATmega64C1-15AD: TQFP32, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64C1-15AZ: TQFP32, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64C1-15MD: VQFN32, Fmax=16 MHz, T=[-40 C, 150 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64C1-15MZ: VQFN32, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64C1-AU:   TQFP32, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64C1-ESAZ: TQFP32, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64C1-ESMZ: VQFN32, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega64C1-MU:   QFN32,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 75;
    signature              = 0x1e 0x96 0x86;
;

#------------------------------------------------------------
# ATA5505
#------------------------------------------------------------

part parent "t167" # ata5505
    desc                   = "ATA5505";
    id                     = "ata5505";
    variants               =
        "ATA5505:      N/A,     Fmax=N/A, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATA5505-P3QW: VFQFN38, Fmax=N/A, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 198;
    chip_erase_delay       = 4000;
    reset                  = dedicated;

    memory "eeprom"
        max_write_delay    = 4000;
    ;

    memory "lfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "hfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "efuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--1111.111o";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.111i";
    ;

    memory "lock"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--1111.11oo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--1111.11ii";
    ;
;

#------------------------------------------------------------
# ATA6612C
#------------------------------------------------------------

part parent "m88" # ata6612c
    desc                   = "ATA6612C";
    id                     = "ata6612c";
    variants               =
        "ATA6612C-PLQW:   VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATA6612C-PLQW-1: VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 216;
    chip_erase_delay       = 4000;

    memory "eeprom"
        min_write_delay    = 4000;
        max_write_delay    = 4000;
    ;

    memory "efuse"
        read               = "0101.0000--0000.1000--xxxx.xxxx--1111.1ooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
    ;

    memory "lock"
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
    ;
;

#------------------------------------------------------------
# ATA6613C
#------------------------------------------------------------

part parent "m168" # ata6613c
    desc                   = "ATA6613C";
    id                     = "ata6613c";
    variants               =
        "ATA6613C-PLQW:   VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATA6613C-PLQW-1: VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 217;

    memory "efuse"
        read               = "0101.0000--0000.1000--xxxx.xxxx--1111.1ooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
    ;

    memory "lock"
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
    ;
;

#------------------------------------------------------------
# ATA6614Q
#------------------------------------------------------------

part parent "m328" # ata6614q
    desc                   = "ATA6614Q";
    id                     = "ata6614q";
    variants               =
        "ATA6614Q-PLQW:   VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATA6614Q-PLQW-1: VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 218;
    signature              = 0x1e 0x95 0x0f;

    memory "efuse"
        read               = "0101.0000--0000.1000--xxxx.xxxx--1111.1ooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.1iii";
    ;

    memory "lock"
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
    ;
;

#------------------------------------------------------------
# ATA6616C
#------------------------------------------------------------

part parent "t87" # ata6616c
    desc                   = "ATA6616C";
    id                     = "ata6616c";
    variants               =
        "ATA6616C-P3PW:   VFQFN38, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATA6616C-P3QW:   VFQFN38, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATA6616C-P3QW-1: VFQFN38, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 219;
    chip_erase_delay       = 4000;
    reset                  = dedicated;

    memory "eeprom"
        max_write_delay    = 4000;
    ;

    memory "flash"
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        writepage          = "0100.1100--0000.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "lfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "hfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "efuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--1111.111o";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.111i";
    ;

    memory "lock"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--1111.11oo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--1111.11ii";
    ;
;

#------------------------------------------------------------
# ATA6617C
#------------------------------------------------------------

part parent "t167" # ata6617c
    desc                   = "ATA6617C";
    id                     = "ata6617c";
    variants               =
        "ATA6617C-P3QW:   VFQFN38, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATA6617C-P3QW-1: VFQFN38, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 220;
    chip_erase_delay       = 4000;
    reset                  = dedicated;

    memory "eeprom"
        max_write_delay    = 4000;
    ;

    memory "lfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "hfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "efuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--1111.111o";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.111i";
    ;

    memory "lock"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--1111.11oo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--1111.11ii";
    ;
;

#------------------------------------------------------------
# ATA664251
#------------------------------------------------------------

part parent "t167" # ata664251
    desc                   = "ATA664251";
    id                     = "ata664251";
    variants               =
        "ATA664251:        N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATA664251-WGQW:   VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATA664251-WGQW-1: VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 225;
    chip_erase_delay       = 4000;
    reset                  = dedicated;

    memory "eeprom"
        max_write_delay    = 4000;
    ;

    memory "lfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "hfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "efuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--1111.111o";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.111i";
    ;

    memory "lock"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--1111.11oo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--1111.11ii";
    ;
;

#------------------------------------------------------------
# ATmega16HVA
#------------------------------------------------------------

part # m16hva
    desc                   = "ATmega16HVA";
    id                     = "m16hva";
    variants               =
        "ATmega16HVA:       N/A,     Fmax=N/A,   T=[N/A,    N/A], Vcc=[1.8 V, 4.5 V]",
        "ATmega16HVA-4CKU:  WFLGA36, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]",
        "ATmega16HVA-4CKUR: WFLGA36, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]",
        "ATmega16HVA-4TU:   TSSOP28, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]",
        "ATmega16HVA-4TUR:  TSSOP28, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 51;
    n_interrupts           = 21;
    chip_erase_delay       = 4000;
    signature              = 0x1e 0x94 0x0c;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    resetdelayus           = 70;
    hvleavestabdelay       = 101;
    resetdelay             = 26;
    chiperasepolltimeout   = 40;
    chiperasetime          = 1;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.0000--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.0000--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.0000--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--00aa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--00aa.aaaa--iiii.iiii";
        writepage          = "0100.1100--000a.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "fuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--1111.11oo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--1111.11ii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega8HVA
#------------------------------------------------------------

part parent "m16hva" # m8hva
    desc                   = "ATmega8HVA";
    id                     = "m8hva";
    variants               =
        "ATmega8HVA:       N/A,     Fmax=N/A,   T=[N/A,    N/A], Vcc=[1.8 V, 4.5 V]",
        "ATmega8HVA-4CKU:  WFLGA36, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]",
        "ATmega8HVA-4CKUR: WFLGA36, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]",
        "ATmega8HVA-4TU:   TSSOP28, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]",
        "ATmega8HVA-4TUR:  TSSOP28, Fmax=4 MHz, T=[-20 C, 85 C], Vcc=[1.8 V,   9 V]";
    mcuid                  = 47;
    signature              = 0x1e 0x93 0x10;

    memory "flash"
        size               = 8192;
        num_pages          = 64;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        writepage          = "0100.1100--0000.aaaa--aa00.0000--xxxx.xxxx";
    ;
;

#------------------------------------------------------------
# ATmega16HVB
#------------------------------------------------------------

part # m16hvb
    desc                   = "ATmega16HVB";
    id                     = "m16hvb";
    variants               =
        "ATmega16HVB:      N/A,     Fmax=N/A,   T=[N/A,    N/A], Vcc=[4 V, 18 V]",
        "ATmega16HVB-8X3:  TFSOP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 25 V]",
        "ATmega16HVB-8X3R: TFSOP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 25 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 52;
    n_interrupts           = 29;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    chip_erase_delay       = 4000;
    pagel                  = 0xa3;
    bs2                    = 0xa2;
    signature              = 0x1e 0x94 0x0d;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.000a--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.000a--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.000a--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--00aa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--00aa.aaaa--iiii.iiii";
        writepage          = "0100.1100--000a.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xdd;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xe9;
        bitmask            = 0x1f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--111o.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--111i.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega16HVBrevB
#------------------------------------------------------------

part parent "m16hvb" # m16hvbrevb
    desc                   = "ATmega16HVBrevB";
    id                     = "m16hvbrevb";
    variants               =
        "ATmega16HVBrevB: N/A, Fmax=N/A, T=[N/A, N/A], Vcc=[3.0 V, 4.5 V]";
    mcuid                  = 53;
;

#------------------------------------------------------------
# ATmega32HVB
#------------------------------------------------------------

part parent "m16hvb" # m32hvb
    desc                   = "ATmega32HVB";
    id                     = "m32hvb";
    variants               =
        "ATmega32HVB:      N/A,     Fmax=N/A,   T=[N/A,    N/A], Vcc=[4 V, 18 V]",
        "ATmega32HVB-8X3:  TFSOP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 25 V]",
        "ATmega32HVB-8X3R: TFSOP44, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[4 V, 25 V]";
    mcuid                  = 60;
    signature              = 0x1e 0x95 0x10;

    memory "eeprom"
        size               = 1024;
        read               = "1010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.00aa--aaaa.aaaa--iiii.iiii";
        writepage          = "1100.0010--0000.00aa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        size               = 0x8000;
        num_pages          = 256;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        writepage          = "0100.1100--00aa.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "sram"
        size               = 2048;
    ;
;

#------------------------------------------------------------
# ATmega32HVBrevB
#------------------------------------------------------------

part parent "m32hvb" # m32hvbrevb
    desc                   = "ATmega32HVBrevB";
    id                     = "m32hvbrevb";
    variants               =
        "ATmega32HVBrevB: N/A, Fmax=N/A, T=[N/A, N/A], Vcc=[3.0 V, 4.5 V]";
    mcuid                  = 61;
;

#------------------------------------------------------------
# ATmega64HVE2
#------------------------------------------------------------

part # m64hve2
    desc                   = "ATmega64HVE2";
    id                     = "m64hve2";
    variants               =
        "ATmega64HVE2:      N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[3.0 V, 3.6 V]",
        "ATmega64HVE2-PLPW: VFQFN48, Fmax=15 MHz, T=[-40 C, 125 C], Vcc=[3 V,   3.6 V]",
        "ATmega64HVE2-PLQW: VFQFN48, Fmax=15 MHz, T=[-40 C, 125 C], Vcc=[3 V,   3.6 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 77;
    n_interrupts           = 25;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    chip_erase_delay       = 4000;
    signature              = 0x1e 0x96 0x10;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    resetdelayus           = 70;
    hvleavestabdelay       = 101;
    resetdelay             = 26;
    chiperasepolltimeout   = 40;
    chiperasetime          = 1;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.00aa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.00aa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 128;
        num_pages          = 512;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--00aa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--00aa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0aaa.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xd7;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xf9;
        bitmask            = 0x0f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--1111.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--1111.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega32HVE2
#------------------------------------------------------------

part parent "m64hve2" # m32hve2
    desc                   = "ATmega32HVE2";
    id                     = "m32hve2";
    variants               =
        "ATmega32HVE2-PLPW: VFQFN48, Fmax=15 MHz, T=[-40 C, 125 C], Vcc=[3 V, 3.6 V]",
        "ATmega32HVE2-PLQW: VFQFN48, Fmax=15 MHz, T=[-40 C, 125 C], Vcc=[3 V, 3.6 V]";
    mcuid                  = 379;
    boot_section_size      = 512;
    signature              = 0x1e 0x95 0x13;

    memory "flash"
        size               = 0x8000;
        num_pages          = 256;
    ;
;

#------------------------------------------------------------
# ATtiny2313
#------------------------------------------------------------

part # t2313
    desc                   = "ATtiny2313";
    id                     = "t2313";
    variants               =
        "ATtiny2313:        N/A,    Fmax=20 MHz, T=[N/A,   85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313-20MU:   MLF20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny2313-20MUR:  MLF20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny2313-20PU:   PDIP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny2313-20SU:   SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny2313-20SUR:  SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny2313V-10MU:  MLF20,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313V-10MUR: WQFN20, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313V-10PU:  PDIP20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313V-10SU:  SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313V-10SUR: SOIC20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 42;
    n_interrupts           = 19;
    stk500_devcode         = 0x23;
#   Use the ATtiny26 devcode:
    avr910_devcode         = 0x5e;
    chip_erase_delay       = 9000;
    pagel                  = 0xd4;
    bs2                    = 0xd6;
    signature              = 0x1e 0x91 0x0a;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
        0x26, 0x36, 0x66, 0x76, 0x2a, 0x3a, 0x6a, 0x7a,
        0x2e, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb2, 0x0f, 0x1f;
    eeprom_instr           =
        0xbb, 0xfe, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xba, 0x0f, 0xb2, 0x0f, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x1f;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 0;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 2048;
        page_size          = 32;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 32;
        readsize           = 256;
        read_lo            = "0010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.00aa--aaaa.aaaa--oooo.oooo";
# The information in the data sheet of April/2004 is wrong, this works:
        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
# The information in the data sheet of April/2004 is wrong, this works:
        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
# The information in the data sheet of April/2004 is wrong, this works:
        writepage          = "0100.1100--0000.00aa--aaaa.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x64;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    # ATtiny2313 has signature bytes 0x1E 0x91 0x0A
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

# The Tiny2313 has calibration data for both 4 MHz and 8 MHz.
# The information in the data sheet of April/2004 is wrong, this works:

    memory "calibration"
        size               = 2;
        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny2313A
#------------------------------------------------------------

part parent "t2313" # t2313a
    desc                   = "ATtiny2313A";
    id                     = "t2313a";
    variants               =
        "ATtiny2313A:      N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313A-MMH:  VQFN20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313A-MMHR: VQFN20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313A-MU:   QFN20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313A-MUR:  WQFN20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313A-PU:   PDIP20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313A-SU:   SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny2313A-SUR:  SOIC20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 43;
    n_interrupts           = 21;
    idr                    = 0x27;

    memory "lfuse"
        initval            = 0x62;
    ;
;

#------------------------------------------------------------
# ATtiny4313
#------------------------------------------------------------

part # t4313
    desc                   = "ATtiny4313";
    id                     = "t4313";
    variants               =
        "ATtiny4313:      N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4313-MMH:  VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4313-MMHR: VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4313-MU:   MLF20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4313-MUR:  MLF20,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4313-PU:   PDIP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4313-SU:   SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4313-SUR:  SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 44;
    n_interrupts           = 21;
    stk500_devcode         = 0x23;
#   Use the ATtiny26 devcode:
    avr910_devcode         = 0x5e;
    chip_erase_delay       = 9000;
    pagel                  = 0xd4;
    bs2                    = 0xd6;
    signature              = 0x1e 0x92 0x0d;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
        0x26, 0x36, 0x66, 0x76, 0x2a, 0x3a, 0x6a, 0x7a,
        0x2e, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb2, 0x0f, 0x1f;
    eeprom_instr           =
        0xbb, 0xfe, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xba, 0x0f, 0xb2, 0x0f, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x27;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 0;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 4096;
        page_size          = 64;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 32;
        readsize           = 256;
        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    # ATtiny4313 has signature bytes 0x1E 0x92 0x0D
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 2;
        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# AT90PWM1
#------------------------------------------------------------

part # pwm1
    desc                   = "AT90PWM1";
    id                     = "pwm1";
    variants               =
        "AT90PWM1:       SOIC24, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM1-16MU:  QFN32,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM1-16MUR: QFN32,  Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM1-16SU:  SOIC24, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 166;
    n_interrupts           = 32;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xe2;
    signature              = 0x1e 0x93 0x83;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 5;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.000a--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.000a--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.000a--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--000a.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--000a.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaa0.0000--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf9;
        bitmask            = 0xb7;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--o1oo.1ooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--i1ii.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90PWM2
#------------------------------------------------------------

part # pwm2
    desc                   = "AT90PWM2";
    id                     = "pwm2";
    variants               =
        "AT90PWM2:       SOIC24, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM2-16SQ:  SOIC24, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM2-16SQR: SOIC24, Fmax=N/A,    T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 167;
    n_interrupts           = 32;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    stk500_devcode         = 0x65;
    chip_erase_delay       = 9000;
    pagel                  = 0xd8;
    bs2                    = 0xe2;
#   avr910_devcode         = ?;
    signature              = 0x1e 0x93 0x81;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        readback           = 0xff 0xff;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        readback           = 0xff 0xff;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf9;
        bitmask            = 0xf7;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    # AT90PWM2 has signature bytes 0x1E 0x93 0x81
    memory "signature"
        size               = 3;
        read               = "0011.0000--00xx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90PWM3
#------------------------------------------------------------

# Completely identical to AT90PWM2 (including the signature!)

part parent "pwm2" # pwm3
    desc                   = "AT90PWM3";
    id                     = "pwm3";
    variants               =
        "AT90PWM3:       N/A,   Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM3-16MQ:  QFN32, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM3-16MQT: QFN32, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 169;
    resetdelay             = 15;
    idr                    = 0x31;
    ocdrev                 = 1;

    memory "eeprom"
        readback           = 0x00 0x00;
        delay              = 5;
    ;

    memory "flash"
        readback           = 0x00 0x00;
        delay              = 10;
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;
;

#------------------------------------------------------------
# AT90PWM2B
#------------------------------------------------------------
# Same as AT90PWM2 but different signature.

part parent "pwm2" # pwm2b
    desc                   = "AT90PWM2B";
    id                     = "pwm2b";
    variants               =
        "AT90PWM2B:       N/A,    Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM2B-16SU:  SOIC24, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM2B-16SUR: SOIC24, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 168;
    signature              = 0x1e 0x93 0x83;
    resetdelay             = 15;
    idr                    = 0x31;
    ocdrev                 = 1;

    memory "eeprom"
        readback           = 0x00 0x00;
        delay              = 5;
    ;

    memory "flash"
        readback           = 0x00 0x00;
        delay              = 10;
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;
;

#------------------------------------------------------------
# AT90PWM3B
#------------------------------------------------------------

# Completely identical to AT90PWM2B (including the signature!)

part parent "pwm2b" # pwm3b
    desc                   = "AT90PWM3B";
    id                     = "pwm3b";
    variants               =
        "AT90PWM3B:       N/A,   Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM3B-16MU:  QFN32, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM3B-16MUR: QFN32, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 170;
;

#------------------------------------------------------------
# AT90PWM161
#------------------------------------------------------------

part # pwm161
    desc                   = "AT90PWM161";
    id                     = "pwm161";
    variants               =
        "AT90PWM161:       N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM161-16MN:  QFN32,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM161-16MNR: QFN32,  Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM161-16SN:  SOIC20, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM161-16SNR: SOIC20, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 177;
    n_interrupts           = 20;
    n_boot_sections        = 4;
    boot_section_size      = 256;
    chip_erase_delay       = 9000;
    pagel                  = 0xe2;
    bs2                    = 0xd6;
    signature              = 0x1e 0x94 0x8b;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0xc4, 0xe4, 0xc4, 0xe4, 0xcc, 0xec, 0xcc, 0xec,
        0xd4, 0xf4, 0xd4, 0xf4, 0xdc, 0xfc, 0xdc, 0xfc,
        0xc8, 0xe8, 0xd8, 0xf8, 0x4c, 0x6c, 0x5c, 0x7c,
        0xec, 0xbc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 5;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.000a--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.000a--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.000a--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--000a.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--00aa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--00aa.aaaa--iiii.iiii";
        writepage          = "0100.1100--000a.aaaa--aa00.0000--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xfd;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--11oo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90PWM81
#------------------------------------------------------------

part parent "pwm161" # pwm81
    desc                   = "AT90PWM81";
    id                     = "pwm81";
    variants               =
        "AT90PWM81:        N/A,    Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM81-16MF:   QFN32,  Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM81-16MN:   QFN32,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM81-16SF:   SOIC20, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM81-16SN:   SOIC20, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM81EP-16MN: QFN32,  Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 173;
    signature              = 0x1e 0x93 0x88;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--000a.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--000a.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaa0.0000--xxxx.xxxx";
    ;

    memory "sram"
        size               = 256;
    ;
;

#------------------------------------------------------------
# AT90PWM316
#------------------------------------------------------------

# Similar to AT90PWM3B, but with 16 kiB flash, 512 B EEPROM, and 1024 B SRAM.

part parent "pwm3b" # pwm316
    desc                   = "AT90PWM316";
    id                     = "pwm316";
    variants               =
        "AT90PWM316:       N/A,   Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM316-16MU:  QFN32, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM316-16MUR: QFN32, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 180;
    boot_section_size      = 512;
    signature              = 0x1e 0x94 0x83;

    memory "flash"
        size               = 0x4000;
        page_size          = 128;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--00xx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--00aa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "sram"
        size               = 1024;
    ;
;

#------------------------------------------------------------
# AT90PWM216
#------------------------------------------------------------
# Completely identical to AT90PWM316 (including the signature!)

part parent "pwm316" # pwm216
    desc                   = "AT90PWM216";
    id                     = "pwm216";
    variants               =
        "AT90PWM216:       N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM216-16SU:  SOIC24, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "AT90PWM216-16SUR: SOIC24, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 179;
;

#------------------------------------------------------------
# ATtiny25
#------------------------------------------------------------

part # t25
    desc                   = "ATtiny25";
    id                     = "t25";
    variants               =
        "ATtiny25:         N/A,    Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[N/A,     N/A]",
        "ATtiny25-15ST:    SOIC8,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20MF:    MLF20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20MFR:   MLF20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20MU:    MLF20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20MUR:   MLF20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20PU:    PDIP8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SN:    SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SNR:   SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SSH:   SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SSHR:  SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SSN:   SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SSNR:  SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SSU:   SOIC8N, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SSUR:  SOIC8N, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SU:    SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25-20SUR:   SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-10MF:   MLF20,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10MFR:  MLF20,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10MU:   MLF20,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10MUR:  MLF20,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10PU:   PDIP8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SH:   SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SN:   SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SNR:  SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SSH:  SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SSHR: SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SSN:  SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SSNR: SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SSU:  SOIC8N, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SSUR: SOIC8N, Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SU:   SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-10SUR:  SOIC8,  Fmax=10 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny25V-20MF:   MLF20,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20MU:   MLF20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20PU:   PDIP8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20SH:   SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20SN:   SOIC8,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20SSH:  SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20SSN:  SOIC8,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20SSU:  SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny25V-20SU:   SOIC8,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 16;
    n_interrupts           = 15;
#  no STK500 devcode in XML file, use the ATtiny45 one
    stk500_devcode         = 0x14;
#   avr910_devcode         = ?;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 4500;
    signature              = 0x1e 0x91 0x08;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    flash_instr            =  0xb4, 0x02, 0x12;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x02, 0xb4, 0x02, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    idr                    = 0x22;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 5;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 2048;
        page_size          = 32;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 32;
        readsize           = 256;
        read_lo            = "0010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.00aa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.00aa--aaaa.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    # ATtiny25 has signature bytes 0x1E 0x91 0x08
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 2;
        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny45
#------------------------------------------------------------

part # t45
    desc                   = "ATtiny45";
    id                     = "t45";
    variants               =
        "ATtiny45:        N/A,    Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[N/A,     N/A]",
        "ATtiny45-15SZ:   SOIC8,  Fmax=N/A,    T=[-40 C, 85 C], Vcc=[N/A,     N/A]",
        "ATtiny45-20MU:   MLF20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45-20MUR:  MLF20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45-20PU:   PDIP8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45-20SU:   SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45-20SUR:  SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45-20XU:   TSSOP8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45-20XUR:  TSSOP8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45V-10MU:  MLF20,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-10MUR: MLF20,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-10PU:  PDIP8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-10SH:  SOIC8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-10SU:  SOIC8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-10SUR: SOIC8,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-10XU:  TSSOP8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-10XUR: TSSOP8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny45V-20MU:  MLF20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45V-20PU:  PDIP8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45V-20SH:  SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45V-20SU:  SOIC8,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny45V-20XU:  TSSOP8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 22;
    n_interrupts           = 15;
    stk500_devcode         = 0x14;
#   avr910_devcode         = ?;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 4500;
    signature              = 0x1e 0x92 0x06;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    flash_instr            =  0xb4, 0x02, 0x12;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x02, 0xb4, 0x02, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    idr                    = 0x22;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 5;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 4096;
        page_size          = 64;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    # ATtiny45 has signature bytes 0x1E 0x92 0x08 (data sheet 2586C-AVR-06/05 doc2586.pdf indicates otherwise)
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 2;
        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny85
#------------------------------------------------------------

part # t85
    desc                   = "ATtiny85";
    id                     = "t85";
    variants               =
        "ATtiny85:        N/A,   Fmax=20 MHz, T=[N/A,   85 C], Vcc=[N/A,     N/A]",
        "ATtiny85-20MU:   MLF20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85-20MUR:  MLF20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85-20PU:   PDIP8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85-20SF:   SOIC8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny85-20SFR:  SOIC8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85-20SU:   SOIC8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85-20SUR:  SOIC8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85V-10MU:  MLF20, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny85V-10MUR: MLF20, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny85V-10PU:  PDIP8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny85V-10SH:  SOIC8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny85V-10SU:  SOIC8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny85V-10SUR: SOIC8, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny85V-20MU:  MLF20, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85V-20PU:  PDIP8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85V-20SH:  SOIC8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny85V-20SU:  SOIC8, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 26;
    n_interrupts           = 15;
#   no STK500 devcode in XML file, use the ATtiny45 one
    stk500_devcode         = 0x14;
#   avr910_devcode         = ?;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 4500;
    signature              = 0x1e 0x93 0x0b;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x00;
    flash_instr            =  0xb4, 0x02, 0x12;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x02, 0xb4, 0x02, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    idr                    = 0x22;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 5;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    # ATtiny85 has signature bytes 0x1E 0x93 0x08
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 2;
        read               = "0011.1000--000x.xxxx--0000.000a--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega640
#------------------------------------------------------------
# Almost same as ATmega1280, except for different memory sizes

part # m640
    desc                   = "ATmega640";
    id                     = "m640";
    variants               =
        "ATmega640:       N/A,      Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega640-16AU:  TQFP100,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega640-16AUR: TQFP100,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega640-16CU:  CBGA100,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega640V-8AU:  TQFP100,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega640V-8AUR: TQFP100,  Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega640V-8CU:  CBGA100,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega640V-8CUR: TFBGA100, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 126;
    n_interrupts           = 57;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
#   stk500_devcode         = 0xB2;
#   avr910_devcode         = 0x43;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x96 0x08;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0aaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 480;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x200;
    ;
;

#------------------------------------------------------------
# ATmega1280
#------------------------------------------------------------

part # m1280
    desc                   = "ATmega1280";
    id                     = "m1280";
    variants               =
        "ATmega1280:       TQFP100, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega1280-16AU:  TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega1280-16AUR: TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega1280-16CU:  CBGA100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega1280V-8AU:  TQFP100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1280V-8AUR: TQFP100, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega1280V-8CU:  CBGA100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 138;
    n_interrupts           = 57;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
#   stk500_devcode         = 0xB2;
#   avr910_devcode         = 0x43;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x97 0x03;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    rampz                  = 0x3b;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x20000;
        page_size          = 256;
        num_pages          = 512;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 480;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x200;
    ;
;

#------------------------------------------------------------
# ATmega1281
#------------------------------------------------------------
# Identical to ATmega1280

part parent "m1280" # m1281
    desc                   = "ATmega1281";
    id                     = "m1281";
    variants               =
        "ATmega1281:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega1281-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega1281-16AUR: TQFP64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega1281-16MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega1281-16MUR: QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega1281V-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1281V-8AUR: QFN64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1281V-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1281V-8MUR: MLF64,  Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 139;
    signature              = 0x1e 0x97 0x04;
;

#------------------------------------------------------------
# ATmega2560
#------------------------------------------------------------

part # m2560
    desc                   = "ATmega2560";
    id                     = "m2560";
    variants               =
        "ATmega2560:       TQFP100, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega2560-16AU:  TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega2560-16AUR: TQFP100, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega2560-16CU:  CBGA100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega2560V-8AU:  TQFP100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega2560V-8AUR: TQFP100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega2560V-8CU:  CBGA100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 143;
    n_interrupts           = 57;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
    stk500_devcode         = 0xb2;
#   avr910_devcode         = 0x43;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x98 0x01;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    rampz                  = 0x3b;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    eind                   = 0x5c;
    ocdrev                 = 4;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x40000;
        page_size          = 256;
        num_pages          = 1024;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        load_ext_addr      = "0100.1101--0000.0000--0000.000a--0000.0000";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 480;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x200;
    ;
;

#------------------------------------------------------------
# ATmega2561
#------------------------------------------------------------

part parent "m2560" # m2561
    desc                   = "ATmega2561";
    id                     = "m2561";
    variants               =
        "ATmega2561:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega2561-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega2561-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega2561-16MU:  MLF64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[4.5 V, 5.5 V]",
        "ATmega2561-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[4.5 V, 5.5 V]",
        "ATmega2561V-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega2561V-8AUR: TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega2561V-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega2561V-8MUR: VQFN64, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 144;
    signature              = 0x1e 0x98 0x02;
;

#------------------------------------------------------------
# ATmega128RFA1
#------------------------------------------------------------
# Identical to ATmega2561 but half the ROM

part parent "m2561" # m128rfa1
    desc                   = "ATmega128RFA1";
    id                     = "m128rfa1";
    variants               =
        "ATmega128RFA1:           N/A,     Fmax=N/A, T=[N/A,     N/A], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFA1-ZF:        VFQFN64, Fmax=N/A, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFA1-ZFR:       VFQFN64, Fmax=N/A, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFA1-ZU:        VFQFN64, Fmax=N/A, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFA1-ZU00:      VFQFN64, Fmax=N/A, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFA1-ZUR:       VFQFN64, Fmax=N/A, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFA1-ZUR-SL514: VFQFN64, Fmax=N/A, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFA1-ZUR00:     VFQFN64, Fmax=N/A, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]";
    mcuid                  = 87;
    n_interrupts           = 72;
    chip_erase_delay       = 18500;
    bs2                    = 0xe2;
    signature              = 0x1e 0xa7 0x01;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    latchcycles            = 5;
    ocdrev                 = 3;

    memory "eeprom"
        min_write_delay    = 13000;
        max_write_delay    = 13000;
        delay              = 50;
    ;

    memory "flash"
        size               = 0x20000;
        num_pages          = 512;
        delay              = 50;
        load_ext_addr      = NULL;
    ;

    memory "lfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "hfuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "efuse"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "lock"
        min_write_delay    = 4500;
        max_write_delay    = 4500;
    ;

    memory "sram"
        size               = 0x4000;
    ;
;

#------------------------------------------------------------
# ATmega256RFR2
#------------------------------------------------------------

part parent "m128rfa1" # m256rfr2
    desc                   = "ATmega256RFR2";
    id                     = "m256rfr2";
    variants               =
        "ATmega256RFR2-ZF:  VFQFN64, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega256RFR2-ZFR: VFQFN64, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega256RFR2-ZU:  VFQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega256RFR2-ZUR: VFQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]";
    mcuid                  = 108;
    n_interrupts           = 77;
    signature              = 0x1e 0xa8 0x02;
    chiperasepolltimeout   = 20;
    ocdrev                 = 4;

    memory "eeprom"
        size               = 8192;
        read               = "1010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxa.aaaa--aaaa.aaaa--iiii.iiii";
        writepage          = "1100.0010--00xa.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        size               = 0x40000;
        num_pages          = 1024;
        load_ext_addr      = "0100.1101--0000.0000--0000.000a--0000.0000";
    ;

    memory "efuse"
        initval            = 0xfe;
    ;

    #####
    # Three separate flash pages
    #   - Offset 0x100 in signature row
    #   - Only programmable with JTAG or HVPP
    #   - Readable from an application
    #   - Cannot be read using ISP
    #   - Not erased by chip erase
    #
    memory "usersig"
        paged              = yes;
        size               = 768;
        page_size          = 256;
        num_pages          = 3;
        offset             = 0x100;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 50;
        blocksize          = 256;
        readsize           = 256;
    ;

    memory "sram"
        size               = 0x8000;
    ;
;

#------------------------------------------------------------
# ATmega128RFR2
#------------------------------------------------------------

part parent "m256rfr2" # m128rfr2
    desc                   = "ATmega128RFR2";
    id                     = "m128rfr2";
    variants               =
        "ATmega128RFR2-ZF:  VFQFN64, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFR2-ZFR: VFQFN64, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFR2-ZU:  VFQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega128RFR2-ZUR: VFQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]";
    mcuid                  = 88;
    signature              = 0x1e 0xa7 0x02;
    ocdrev                 = 3;

    memory "eeprom"
        size               = 4096;
    ;

    memory "flash"
        size               = 0x20000;
        num_pages          = 512;
        load_ext_addr      = NULL;
    ;

    memory "sram"
        size               = 0x4000;
    ;
;

#------------------------------------------------------------
# ATmega64RFR2
#------------------------------------------------------------

part parent "m128rfr2" # m64rfr2
    desc                   = "ATmega64RFR2";
    id                     = "m64rfr2";
    variants               =
        "ATmega64RFR2-ZF:  VFQFN64, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega64RFR2-ZFR: VFQFN64, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega64RFR2-ZU:  VFQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega64RFR2-ZUR: VFQFN64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]";
    mcuid                  = 78;
    signature              = 0x1e 0xa6 0x02;

    memory "eeprom"
        size               = 2048;
        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        size               = 0x10000;
        num_pages          = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        writepage          = "0100.1100--0aaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "sram"
        size               = 8192;
    ;
;

#------------------------------------------------------------
# ATmega2564RFR2
#------------------------------------------------------------

part parent "m256rfr2" # m2564rfr2
    desc                   = "ATmega2564RFR2";
    id                     = "m2564rfr2";
    variants               =
        "ATmega2564RFR2-ZF:  VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega2564RFR2-ZFR: VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega2564RFR2-ZU:  VFQFN48, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega2564RFR2-ZUR: VFQFN48, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]";
    mcuid                  = 145;
    signature              = 0x1e 0xa8 0x03;
;

#------------------------------------------------------------
# ATmega1284RFR2
#------------------------------------------------------------

part parent "m128rfr2" # m1284rfr2
    desc                   = "ATmega1284RFR2";
    id                     = "m1284rfr2";
    variants               =
        "ATmega1284RFR2-ZF:  VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega1284RFR2-ZFR: VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega1284RFR2-ZU:  VFQFN48, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega1284RFR2-ZUR: VFQFN48, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]";
    mcuid                  = 142;
    signature              = 0x1e 0xa7 0x03;
;

#------------------------------------------------------------
# ATmega644RFR2
#------------------------------------------------------------

part parent "m64rfr2" # m644rfr2
    desc                   = "ATmega644RFR2";
    id                     = "m644rfr2";
    variants               =
        "ATmega644RFR2-ZF:  VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega644RFR2-ZFR: VFQFN48, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega644RFR2-ZU:  VFQFN48, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]",
        "ATmega644RFR2-ZUR: VFQFN48, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 3.6 V]";
    mcuid                  = 131;
    signature              = 0x1e 0xa6 0x03;
;

#------------------------------------------------------------
# ATtiny24
#------------------------------------------------------------

part # t24
    desc                   = "ATtiny24";
    id                     = "t24";
    variants               =
        "ATtiny24:         N/A,     Fmax=20 MHz, T=[N/A,   85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24-20MU:    QFN20,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny24-20MUR:   WQFN20,  Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny24-20PU:    PDIP14,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny24-20SSU:   SOIC14N, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny24-20SSUR:  SOIC14N, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny24V-10MU:   MLF20,   Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24V-10MUR:  MLF20,   Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24V-10PU:   PDIP14,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24V-10SSU:  SOIC14N, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24V-10SSUR: SOIC14N, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 14;
    n_interrupts           = 17;
#   no STK500 devcode in XML file, use the ATtiny45 one
    stk500_devcode         = 0x14;
#   avr910_devcode         = ?;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 4500;
    signature              = 0x1e 0x91 0x0b;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
    flash_instr            =  0xb4, 0x07, 0x17;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 50;
    resetdelayus           = 3;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    hvspcmdexedelay        = 50;
    idr                    = 0x27;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 128;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--xaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--xaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 2048;
        page_size          = 32;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 32;
        readsize           = 256;
        read_lo            = "0010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.00aa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.00aa--aaaa.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
    ;

    # ATtiny24 has signature bytes 0x1E 0x91 0x0B
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny24A
#------------------------------------------------------------

part parent "t24" # t24a
    desc                   = "ATtiny24A";
    id                     = "t24a";
    variants               =
        "ATtiny24A:      N/A,     Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-CCU:  UFBGA15, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-CCUR: UFBGA15, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MF:   QFN20,   Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MFR:  QFN20,   Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MM8:  VQFN20,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MM8R: VQFN20,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MMH:  VQFN20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MMHR: VQFN20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MU:   QFN20,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-MUR:  QFN20,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-PU:   PDIP14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-SSF:  SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-SSFR: SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-SSN:  SOIC14,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-SSNR: SOIC14,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-SSU:  SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny24A-SSUR: SOIC14N, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 15;
;

#------------------------------------------------------------
# ATtiny44
#------------------------------------------------------------

part # t44
    desc                   = "ATtiny44";
    id                     = "t44";
    variants               =
        "ATtiny44:         N/A,     Fmax=20 MHz, T=[N/A,   85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44-20MU:    QFN20,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny44-20MUR:   WQFN20,  Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny44-20PU:    PDIP14,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny44-20SSU:   SOIC14N, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny44-20SSUR:  SOIC14N, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny44V-10MU:   MLF20,   Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44V-10MUR:  WQFN20,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44V-10PU:   PDIP14,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44V-10SSU:  SOIC14N, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44V-10SSUR: SOIC14N, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 20;
    n_interrupts           = 17;
#   no STK500 devcode in XML file, use the ATtiny45 one
    stk500_devcode         = 0x14;
#   avr910_devcode         = ?;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 4500;
    signature              = 0x1e 0x92 0x07;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
    flash_instr            =  0xb4, 0x07, 0x17;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 50;
    resetdelayus           = 3;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    hvspcmdexedelay        = 50;
    idr                    = 0x27;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 4096;
        page_size          = 64;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
    ;

    # ATtiny44 has signature bytes 0x1E 0x92 0x07
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny44A
#------------------------------------------------------------

part parent "t44" # t44a
    desc                   = "ATtiny44A";
    id                     = "t44a";
    variants               =
        "ATtiny44A:      N/A,     Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-CCU:  UFBGA15, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-CCUR: UFBGA15, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-MF:   QFN20,   Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-MFR:  QFN20,   Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-MMH:  VQFN20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-MMHR: VQFN20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-MU:   QFN20,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-MUR:  QFN20,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-PU:   PDIP14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-SSF:  SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-SSFR: SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-SSN:  SOIC14,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-SSNR: SOIC14,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-SSU:  SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny44A-SSUR: SOIC14N, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = XVII + IV; # 21;

;

#------------------------------------------------------------
# ATtiny84
#------------------------------------------------------------

part # t84
    desc                   = "ATtiny84";
    id                     = "t84";
    variants               =
        "ATtiny84:         N/A,     Fmax=20 MHz, T=[N/A,   85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84-15MZ:    MLF20,   Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny84-20MU:    MLF20,   Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny84-20MUR:   WQFN20,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny84-20PU:    PDIP14,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny84-20SSU:   SOIC14,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny84-20SSUR:  SOIC14N, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny84V-10MU:   MLF20,   Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84V-10MUR:  WQFN20,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84V-10PU:   PDIP14,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84V-10SSU:  SOIC14,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84V-10SSUR: SOIC14,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVSP | PM_debugWIRE;
    mcuid                  = 24;
    n_interrupts           = 17;
#   no STK500 devcode in XML file, use the ATtiny45 one
    stk500_devcode         = 0x14;
#   avr910_devcode         = ?;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 4500;
    signature              = 0x1e 0x93 0x0c;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    hvsp_controlstack      =
        0x4c, 0x0c, 0x1c, 0x2c, 0x3c, 0x64, 0x74, 0x66,
        0x68, 0x78, 0x68, 0x68, 0x7a, 0x6a, 0x68, 0x78,
        0x78, 0x7d, 0x6d, 0x0c, 0x80, 0x40, 0x20, 0x10,
        0x11, 0x08, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0f;
    flash_instr            =  0xb4, 0x07, 0x17;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 1;
    togglevtg              = 1;
    poweroffdelay          = 50;
    resetdelayus           = 3;
    hvleavestabdelay       = 100;
    resetdelay             = 25;
    chiperasepolltimeout   = 40;
    programfusepolltimeout = 25;
    programlockpolltimeout = 25;
    synchcycles            = 6;
    hvspcmdexedelay        = 50;
    idr                    = 0x27;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 64;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--xxxx.xxii";
    ;

    # ATtiny84 has signature bytes 0x1E 0x93 0x0C
    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATtiny84A
#------------------------------------------------------------

part parent "t84" # t84a
    desc                   = "ATtiny84A";
    id                     = "t84a";
    variants               =
        "ATtiny84A-CCU:  UFBGA15, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-CCUR: UFBGA15, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-MF:   WQFN20,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-MFR:  WQFN20,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-MMH:  VQFN20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-MMHR: VQFN20,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-MU:   QFN20,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-MUR:  QFN20,   Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-PU:   PDIP14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-SSF:  SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-SSFR: SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-SSU:  SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny84A-SSUR: SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 25;
;

#------------------------------------------------------------
# ATtiny441
#------------------------------------------------------------

part parent "t44" # t441
    desc                   = "ATtiny441";
    id                     = "t441";
    variants               =
        "ATtiny441-MMH:  VQFN20, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny441-MMHR: VQFN20, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny441-MU:   QFN20,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny441-MUR:  QFN20,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny441-SSU:  SOIC14, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny441-SSUR: SOIC14, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]";
    mcuid                  = 32;
    n_interrupts           = 30;
    n_page_erase           = 4;
    signature              = 0x1e 0x92 0x15;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    resetdelayus           = 0;
    hvspcmdexedelay        = 0;

    memory "flash"
        page_size          = 16;
        num_pages          = 256;
        blocksize          = 16;
        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.xaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.xaaa--iiii.iiii";
        writepage          = "0100.1100--0000.0aaa--aaaa.axxx--xxxx.xxxx";
    ;

    memory "lfuse"
        bitmask            = 0xdf;
    ;

    memory "efuse"
        bitmask            = 0xff;
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "io"
        size               = 224;
    ;

    memory "sram"
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATtiny841
#------------------------------------------------------------

part parent "t84" # t841
    desc                   = "ATtiny841";
    id                     = "t841";
    variants               =
        "ATtiny841-MMH:  VQFN20, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny841-MMHR: VQFN20, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny841-MU:   QFN20,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny841-MUR:  QFN20,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny841-SSU:  SOIC14, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]",
        "ATtiny841-SSUR: SOIC14, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.7 V, 5.5 V]";
    mcuid                  = 37;
    n_interrupts           = 30;
    n_page_erase           = 4;
    signature              = 0x1e 0x93 0x15;
    poweroffdelay          = 25;
    resetdelayms           = 1;
    resetdelayus           = 0;
    hvspcmdexedelay        = 0;

    memory "flash"
        page_size          = 16;
        num_pages          = 512;
        blocksize          = 16;
        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.xaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.xaaa--iiii.iiii";
        writepage          = "0100.1100--0000.aaaa--aaaa.axxx--xxxx.xxxx";
    ;

    memory "lfuse"
        bitmask            = 0xdf;
    ;

    memory "efuse"
        bitmask            = 0xff;
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "io"
        size               = 224;
    ;

    memory "sram"
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATtiny43U
#------------------------------------------------------------

part # t43u
    desc                   = "ATtiny43U";
    id                     = "t43u";
    variants               =
        "ATtiny43U:     N/A,    Fmax=N/A,   T=[N/A,    N/A], Vcc=[0.7 V, 5.5 V]",
        "ATtiny43U-MU:  QFN20,  Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny43U-MUR: WQFN20, Fmax=8 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATtiny43U-SU:  SOIC20, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny43U-SUR: SOIC20, Fmax=8 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 19;
    n_interrupts           = 16;
    stk500_devcode         = 0x14;
#   avr910_devcode         = ?;
#   Try the AT90S2313 devcode:
    avr910_devcode         = 0x20;
    chip_erase_delay       = 1000;
    pagel                  = 0xa3;
    bs2                    = 0xa2;
    signature              = 0x1e 0x92 0x0c;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0e, 0x1e, 0x2e, 0x3e, 0x2e, 0x3e,
        0x4e, 0x5e, 0x4e, 0x5e, 0x6e, 0x7e, 0x6e, 0x7e,
        0x06, 0x16, 0x46, 0x56, 0x0a, 0x1a, 0x4a, 0x5a,
        0x1e, 0x7c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb4, 0x07, 0x17;
    eeprom_instr           =
        0xbb, 0xff, 0xbb, 0xee, 0xbb, 0xcc, 0xb2, 0x0d,
        0xbc, 0x07, 0xb4, 0x07, 0xba, 0x0d, 0xbb, 0xbc,
        0x99, 0xe1, 0xbb, 0xac;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 20;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x27;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 64;
        page_size          = 4;
        num_pages          = 16;
        min_write_delay    = 4000;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxx--00aa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxx--00aa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxx--00aa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 4096;
        page_size          = 64;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 64;
        readsize           = 256;
        read_lo            = "0010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0000.0aaa--aaax.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x01;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.xxxi";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 64;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x60;
    ;
;

#------------------------------------------------------------
# ATmega16u4
#------------------------------------------------------------

part # m16u4
    desc                   = "ATmega16U4";
    id                     = "m16u4";
    variants               =
        "ATmega16U4-AU:   TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U4-AUR:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U4-MU:   QFN44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U4-MUR:  VQFN44, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U4RC-AU: TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U4RC-MU: QFN44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 57;
    n_interrupts           = 43;
    n_boot_sections        = 4;
    boot_section_size      = 512;
#   stk500_devcode         = 0xB2;
#   avr910_devcode         = 0x43;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x94 0x88;
    usbpid                 = 0x2ff4;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x52;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xfb;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--00oo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1280;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega32u4
#------------------------------------------------------------

part # m32u4
    desc                   = "ATmega32U4";
    id                     = "m32u4";
    variants               =
        "ATmega32U4-AU:    TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U4-AUR:   TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U4-MU:    QFN44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U4-MUR:   QFN44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U4RC-AU:  TQFP44, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U4RC-AUR: QFP44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U4RC-MU:  QFN44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U4RC-MUR: QFN44,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 65;
    n_interrupts           = 43;
    n_boot_sections        = 4;
    boot_section_size      = 512;
#   stk500_devcode         = 0xB2;
#   avr910_devcode         = 0x43;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x95 0x87;
    usbpid                 = 0x2ff4;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xaaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 128;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x52;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xfb;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--1111.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--xxxx.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2560;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90USB646
#------------------------------------------------------------

part # usb646
    desc                   = "AT90USB646";
    id                     = "usb646";
    variants               =
        "AT90USB646:     QFN64,  Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90USB646-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB646-AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB646-MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB646-MUR: QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 181;
    n_interrupts           = 38;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
#   stk500_devcode         = 0xB2;
#   avr910_devcode         = 0x43;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x96 0x82;
    usbpid                 = 0x2ff9;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 2048;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--xxxx.xaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.xaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.xaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0aaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x5e;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x9b;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf3;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90USB647
#------------------------------------------------------------
# identical to AT90USB646

part parent "usb646" # usb647
    desc                   = "AT90USB647";
    id                     = "usb647";
    variants               =
        "AT90USB647:     N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90USB647-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB647-AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB647-MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB647-MUR: QFN64,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 182;
;

#------------------------------------------------------------
# AT90USB1286
#------------------------------------------------------------

part # usb1286
    desc                   = "AT90USB1286";
    id                     = "usb1286";
    variants               =
        "AT90USB1286:     QFN64,  Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1286-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1286-AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1286-MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1286-MUR: QFN64,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 184;
    n_interrupts           = 38;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
#   stk500_devcode         = 0xB2;
#   avr910_devcode         = 0x43;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x97 0x82;
    usbpid                 = 0x2ffb;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    rampz                  = 0x3b;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 4096;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 8;
        readsize           = 256;
        read               = "1010.0000--xxxx.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--xxxx.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--00xx.aaaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x20000;
        page_size          = 256;
        num_pages          = 512;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 256;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--axxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x5e;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf3;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--xxxx.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90USB1287
#------------------------------------------------------------
# identical to AT90USB1286

part parent "usb1286" # usb1287
    desc                   = "AT90USB1287";
    id                     = "usb1287";
    variants               =
        "AT90USB1287:     N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1287-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1287-AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1287-MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB1287-MUR: VQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 185;
;

#------------------------------------------------------------
# AT90USB162
#------------------------------------------------------------

part # usb162
    desc                   = "AT90USB162";
    id                     = "usb162";
    variants               =
        "AT90USB162:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90USB162-16AU:  TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB162-16AUR: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB162-16MU:  QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB162-16MUR: QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 178;
    n_interrupts           = 29;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc6;
    signature              = 0x1e 0x94 0x82;
    usbpid                 = 0x2ffa;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        num_pages          = 128;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x5e;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf4;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AT90USB82
#------------------------------------------------------------

part # usb82
    desc                   = "AT90USB82";
    id                     = "usb82";
    variants               =
        "AT90USB82:       QFN32, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "AT90USB82-16MU:  QFN32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "AT90USB82-16MUR: QFN32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 174;
    n_interrupts           = 29;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc6;
    signature              = 0x1e 0x93 0x82;
    usbpid                 = 0x2ff7;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        num_pages          = 128;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 128;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x5e;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf4;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega32U2
#------------------------------------------------------------

part # m32u2
    desc                   = "ATmega32U2";
    id                     = "m32u2";
    variants               =
        "ATmega32U2-AU:  TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U2-AUR: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U2-MU:  QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega32U2-MUR: VQFN32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 64;
    n_interrupts           = 29;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc6;
    signature              = 0x1e 0x95 0x8a;
    usbpid                 = 0x2ff0;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        num_pages          = 256;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 128;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x5e;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf4;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega16U2
#------------------------------------------------------------

part # m16u2
    desc                   = "ATmega16U2";
    id                     = "m16u2";
    variants               =
        "ATmega16U2-AU:  TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U2-AUR: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U2-MU:  QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega16U2-MUR: QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 56;
    n_interrupts           = 29;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc6;
    signature              = 0x1e 0x94 0x89;
    usbpid                 = 0x2fef;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        num_pages          = 128;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x5e;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf4;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega8U2
#------------------------------------------------------------

part # m8u2
    desc                   = "ATmega8U2";
    id                     = "m8u2";
    variants               =
        "ATmega8U2-AU:  LQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8U2-AUR: TQFP32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8U2-MU:  QFN32,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega8U2-MUR: VQFN32, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 48;
    n_interrupts           = 29;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xc6;
    signature              = 0x1e 0x93 0x89;
    usbpid                 = 0x2fee;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        num_pages          = 128;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.aaaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.aaaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.aaaa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 8192;
        page_size          = 128;
        num_pages          = 64;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 6;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--xxxx.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x5e;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xd9;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xf4;
        bitmask            = 0x0f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--iiii.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega165P
#------------------------------------------------------------

part # m165p
    desc                   = "ATmega165P";
    id                     = "m165p";
    variants               =
        "ATmega165P:       N/A,    Fmax=16 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega165P-16AN:  TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165P-16ANR: TQFP64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega165P-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165P-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165P-16MN:  VQFN64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega165P-16MNR: VQFN64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega165P-16MU:  QFN64,  Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165P-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega165PV-8AN:  TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PV-8ANR: TQFP64, Fmax=8 MHz,  T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PV-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PV-8AUR: TQFP64, Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PV-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PV-8MUR: QFN64,  Fmax=8 MHz,  T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 97;
    n_interrupts           = 22;
    n_boot_sections        = 4;
    boot_section_size      = 256;
#   stk500_devcode         = 0x??;
#   avr910_devcode         = 0x??;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x94 0x07;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        num_pages          = 128;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.00xa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.00xa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.00xa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 128;
        num_pages          = 128;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--xxxa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.xxxx--xxaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.xxxx--xxaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--xxxa.aaaa--aaxx.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x0f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxx.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--0000.0000--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--xxxx.xxxx--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega165A
#------------------------------------------------------------

part parent "m165p" # m165a
    desc                   = "ATmega165A";
    id                     = "m165a";
    variants               =
        "ATmega165A:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega165A-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165A-AUR: TQFP64, Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega165A-MU:  MLF64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165A-MUR: TQFP64, Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 96;
    signature              = 0x1e 0x94 0x10;
;

#------------------------------------------------------------
# ATmega165
#------------------------------------------------------------

part parent "m165p" # m165
    desc                   = "ATmega165";
    id                     = "m165";
    variants               =
        "ATmega165:      N/A,     Fmax=16 MHz, T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATmega165-16AI: TQFP64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165-16AU: TQFP64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165-16MI: VFQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165-16MU: VFQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega165V-8AI: TQFP64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165V-8AU: TQFP64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165V-8MI: VFQFN64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165V-8MU: VFQFN64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 95;

    memory "eeprom"
        min_write_delay    = 9000;
        max_write_delay    = 9000;
    ;
;

#------------------------------------------------------------
# ATmega165PA
#------------------------------------------------------------

part parent "m165p" # m165pa
    desc                   = "ATmega165PA";
    id                     = "m165pa";
    variants               =
        "ATmega165PA:     N/A,    Fmax=16 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PA-AU:  TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PA-AUR: TQFP64, Fmax=16 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PA-MN:  TQFP64, Fmax=16 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PA-MNR: VQFN64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega165PA-MUR: VQFN64, Fmax=16 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 98;
;

#------------------------------------------------------------
# ATmega325
#------------------------------------------------------------

part # m325
    desc                   = "ATmega325";
    id                     = "m325";
    variants               =
        "ATmega325:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega325-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega325-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega325-16MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega325-16MUR: VQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega325V-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325V-8AUR: TQFP64, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega325V-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325V-8MUR: VQFN64, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 114;
    n_interrupts           = 22;
    n_boot_sections        = 4;
    boot_section_size      = 512;
#   stk500_devcode         = 0x??; # No STK500v1 support?
#   avr910_devcode         = 0x??; # Try the ATmega16 one
    avr910_devcode         = 0x74;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x95 0x05;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--0000.0000--0000.0000";
    pgm_enable             = "1010.1100--0101.0011--0000.0000--0000.0000";

    memory "eeprom"
        size               = 1024;
        page_size          = 4;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.00aa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.00aa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--0000.00aa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x8000;
        page_size          = 128;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--0aaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--aaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--aaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--0aaa.aaaa--aaaa.aaaa--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--1010.0000--0000.0000--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--0000.0000--oooo.oooo";
        write              = "1010.1100--1010.1000--0000.0000--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--0000.0000--oooo.oooo";
        write              = "1010.1100--1010.0100--0000.0000--1111.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1110.0000--0000.0000--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--0000.0000--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega325A
#------------------------------------------------------------

part parent "m325" # m325a
    desc                   = "ATmega325A";
    id                     = "m325a";
    variants               =
        "ATmega325A:     N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-AN:  TQFP64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-ANR: TQFP64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-AU:  TQFP64, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-AUR: TQFP64, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-MN:  VQFN64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-MNR: VQFN64, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-MU:  QFN64,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325A-MUR: VQFN64, Fmax=20 MHz, T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 115;
;

#------------------------------------------------------------
# ATmega325P
#------------------------------------------------------------

part parent "m325" # m325p
    desc                   = "ATmega325P";
    id                     = "m325p";
    variants               =
        "ATmega325P:        N/A,    Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega325P-20AU:   TQFP64, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega325P-20AUR:  TQFP64, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega325P-20MU:   MLF64,  Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega325PV-10AU:  TQFP64, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325PV-10AUR: TQFP64, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325PV-10MU:  MLF64,  Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325PV-10MUR: VQFN64, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 116;
    signature              = 0x1e 0x95 0x0d;
;

#------------------------------------------------------------
# ATmega325PA
#------------------------------------------------------------

part parent "m325" # m325pa
    desc                   = "ATmega325PA";
    id                     = "m325pa";
    variants               =
        "ATmega325PA:     N/A,    Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega325PA-AU:  TQFP64, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325PA-AUR: TQFP64, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega325PA-MU:  VQFN64, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega325PA-MUR: VQFN64, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 117;
    signature              = 0x1e 0x95 0x0d;
;

#------------------------------------------------------------
# ATmega645
#------------------------------------------------------------

part # m645
    desc                   = "ATmega645";
    id                     = "m645";
    variants               =
        "ATmega645:       N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega645-16AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega645-16AUR: TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega645-16MU:  MLF64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega645-16MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega645V-8AU:  TQFP64, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega645V-8AUR: TQFP64, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega645V-8MU:  MLF64,  Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega645V-8MUR: VQFN64, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
    mcuid                  = 132;
    n_interrupts           = 22;
    n_boot_sections        = 4;
    boot_section_size      = 1024;
#   stk500_devcode         = 0x??; # No STK500v1 support?
#   avr910_devcode         = 0x??; # Try the ATmega16 one
    avr910_devcode         = 0x74;
    chip_erase_delay       = 9000;
    pagel                  = 0xd7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x96 0x05;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--1000.0000--0000.0000--0000.0000";
    pgm_enable             = "1010.1100--0101.0011--0000.0000--0000.0000";

    memory "eeprom"
        size               = 2048;
        page_size          = 8;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--0000.0aaa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--0000.0aaa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.0aaa--iiii.iiii";
        writepage          = "1100.0010--0000.0aaa--aaaa.a000--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x10000;
        page_size          = 256;
        num_pages          = 256;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 128;
        readsize           = 256;
        read_lo            = "0010.0000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--aaaa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--0000.0000--aaaa.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--0000.0000--aaaa.aaaa--iiii.iiii";
        writepage          = "0100.1100--aaaa.aaaa--aaaa.aaaa--0000.0000";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.0000--0000.0000--oooo.oooo";
        write              = "1010.1100--1010.0000--0000.0000--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0x99;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.1000--0000.0000--oooo.oooo";
        write              = "1010.1100--1010.1000--0000.0000--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.0000--0000.1000--0000.0000--oooo.oooo";
        write              = "1010.1100--1010.0100--0000.0000--1111.1iii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        min_write_delay    = 9000;
        max_write_delay    = 9000;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1110.0000--0000.0000--11ii.iiii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--0000.0000--0000.00aa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--0000.0000--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATmega645A
#------------------------------------------------------------

part parent "m645" # m645a
    desc                   = "ATmega645A";
    id                     = "m645a";
    variants               =
        "ATmega645A:     N/A,    Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega645A-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega645A-AUR: TQFP64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega645A-MU:  VQFN64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega645A-MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 133;
;

#------------------------------------------------------------
# ATmega645P
#------------------------------------------------------------

part parent "m645" # m645p
    desc                   = "ATmega645P";
    id                     = "m645p";
    variants               =
        "ATmega645P:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega645P-AU:  TQFP64, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega645P-AUR: TQFP64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega645P-MU:  QFN64,  Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega645P-MUR: VQFN64, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 134;
    signature              = 0x1e 0x96 0x0d;
;

#------------------------------------------------------------
# ATmega3250
#------------------------------------------------------------

part parent "m325" # m3250
    desc                   = "ATmega3250";
    id                     = "m3250";
    variants               =
        "ATmega3250:       N/A,     Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega3250-16AU:  TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega3250-16AUR: TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega3250V-8AU:  TQFP100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3250V-8AUR: TQFP100, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 146;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x06;
;

#------------------------------------------------------------
# ATmega3250A
#------------------------------------------------------------

part parent "m325" # m3250a
    desc                   = "ATmega3250A";
    id                     = "m3250a";
    variants               =
        "ATmega3250A:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega3250A-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3250A-AUR: TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 147;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x06;
;

#------------------------------------------------------------
# ATmega3250P
#------------------------------------------------------------

part parent "m325" # m3250p
    desc                   = "ATmega3250P";
    id                     = "m3250p";
    variants               =
        "ATmega3250P:        TQFP100, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega3250P-20AU:   TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega3250P-20AUR:  TQFP100, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega3250PV-10AU:  TQFP100, Fmax=10 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3250PV-10AUR: TQFP100, Fmax=10 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 148;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x0e;
;

#------------------------------------------------------------
# ATmega3250PA
#------------------------------------------------------------

part parent "m325" # m3250pa
    desc                   = "ATmega3250PA";
    id                     = "m3250pa";
    variants               =
        "ATmega3250PA:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega3250PA-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3250PA-AUR: TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 149;
    n_interrupts           = 25;
    signature              = 0x1e 0x95 0x0e;
;

#------------------------------------------------------------
# ATmega6450
#------------------------------------------------------------

part parent "m645" # m6450
    desc                   = "ATmega6450";
    id                     = "m6450";
    variants               =
        "ATmega6450:       N/A,     Fmax=16 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega6450-16AU:  TQFP100, Fmax=16 MHz, T=[-40 C, 85 C], Vcc=[2.7 V, 5.5 V]",
        "ATmega6450-16AUR: TQFP100, Fmax=16 MHz, T=[N/A,    N/A], Vcc=[2.7 V, 5.5 V]",
        "ATmega6450V-8AU:  TQFP100, Fmax=8 MHz,  T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega6450V-8AUR: TQFP100, Fmax=8 MHz,  T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 154;
    n_interrupts           = 25;
    signature              = 0x1e 0x96 0x06;
;

#------------------------------------------------------------
# ATmega6450A
#------------------------------------------------------------

part parent "m645" # m6450a
    desc                   = "ATmega6450A";
    id                     = "m6450a";
    variants               =
        "ATmega6450A:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega6450A-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega6450A-AUR: TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 155;
    n_interrupts           = 25;
    signature              = 0x1e 0x96 0x06;
;

#------------------------------------------------------------
# ATmega6450P
#------------------------------------------------------------

part parent "m645" # m6450p
    desc                   = "ATmega6450P";
    id                     = "m6450p";
    variants               =
        "ATmega6450P:     N/A,     Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]",
        "ATmega6450P-AU:  TQFP100, Fmax=20 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega6450P-AUR: TQFP100, Fmax=20 MHz, T=[N/A,    N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 156;
    n_interrupts           = 25;
    signature              = 0x1e 0x96 0x0e;
;

#------------------------------------------------------------
# AVR XMEGA family common values
#------------------------------------------------------------

part # .xmega
    desc                   = "AVR XMEGA family common values";
    id                     = ".xmega";
    prog_modes             = PM_SPM | PM_PDI;
    n_boot_sections        = 1;
    mcu_base               = 0x0090;
    nvm_base               = 0x01c0;
    autobaud_sync          = 0x20;
    factory_fcpu           = 2000000;

    memory "fuse1"
        size               = 1;
        initval            = 0x00;
        offset             = 0x8f0021;
    ;

    memory "fuse2"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x63;
        offset             = 0x8f0022;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x1e;
        offset             = 0x8f0024;
    ;

    memory "fuse5"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
        offset             = 0x8f0025;
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        offset             = 0x8f0027;
    ;

    memory "prodsig"
        size               = 50;
        offset             = 0x8e0200;
        readsize           = 50;
    ;

    memory "sigrow"
        alias "prodsig";
    ;

    memory "signature"
        size               = 3;
        offset             = 0x1000090;
    ;

    memory "io"
        size               = 4096;
        readsize           = 1;
    ;

    memory "sram"
        offset             = 0x2000;
    ;
;

#------------------------------------------------------------
# AVR XMEGA-E family common values
#------------------------------------------------------------

# Fuse for fault detection action on Px0..5 (unique to XMEGA-E)

part parent ".xmega" # .xmega-e
    desc                   = "AVR XMEGA-E family common values";
    id                     = ".xmega-e";

    memory "fuse6"
        size               = 1;
        initval            = 0xff;
        offset             = 0x8f0026;
    ;
;

#------------------------------------------------------------
# AVR XMEGA-A family common values
#------------------------------------------------------------

# JTAG user ID (unique to XMEGA-A and XMEGA-B)

part parent ".xmega" # .xmega-a
    desc                   = "AVR XMEGA-A family common values";
    id                     = ".xmega-a";

    memory "fuse0"
        size               = 1;
        initval            = 0xff;
        offset             = 0x8f0020;
    ;

    memory "fuse4"
        bitmask            = 0x1f;
    ;
;

#------------------------------------------------------------
# ATxmega16A4U
#------------------------------------------------------------

part parent ".xmega-a" # x16a4u
    desc                   = "ATxmega16A4U";
    id                     = "x16a4u";
    variants               =
        "ATxmega16A4U-AN:  TQFP44,  Fmax=32 MHz, T=[0 C,   105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4U-ANR: N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega16A4U-AU:  TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4U-AUR: TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4U-CU:  BGA49,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4U-CUR: VFBGA49, Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4U-M7:  VQFN44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4U-MH:  QFN44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4U-MHR: VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 232;
    n_interrupts           = 127;
    boot_section_size      = 4096;
    signature              = 0x1e 0x94 0x41;
    usbpid                 = 0x2fe3;

    memory "eeprom"
        size               = 1024;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x5000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x4000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 4096;
        page_size          = 256;
        offset             = 0x803000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 4096;
        page_size          = 256;
        offset             = 0x804000;
        readsize           = 256;
    ;

    memory "fuse4"
        initval            = 0xfe;
    ;

    memory "prodsig"
        size               = 52;
        readsize           = 52;
    ;

    memory "usersig"
        size               = 256;
        page_size          = 256;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 2048;
    ;
;

#------------------------------------------------------------
# ATxmega16C4
#------------------------------------------------------------

part parent "x16a4u" # x16c4
    desc                   = "ATxmega16C4";
    id                     = "x16c4";
    variants               =
        "ATxmega16C4-AN:  TQFP44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16C4-AU:  TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16C4-AUR: TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16C4-CU:  VFBGA49, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16C4-CUR: VFBGA49, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16C4-M7:  VFBGA49, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16C4-MH:  VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16C4-MHR: VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 233;
    signature              = 0x1e 0x94 0x43;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;
;

#------------------------------------------------------------
# ATxmega16D4
#------------------------------------------------------------

part parent "x16a4u" # x16d4
    desc                   = "ATxmega16D4";
    id                     = "x16d4";
    variants               =
        "ATxmega16D4:     N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-AN:  TQFP44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-AU:  TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-AUR: TQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-CU:  BGA49,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-CUR: VFBGA49, Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-M7:  VFBGA49, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-MH:  VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16D4-MHR: VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 234;
    n_interrupts           = 91;
    signature              = 0x1e 0x94 0x42;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;
;

#------------------------------------------------------------
# ATxmega16A4
#------------------------------------------------------------

part parent "x16a4u" # x16a4
    desc                   = "ATxmega16A4";
    id                     = "x16a4";
    variants               =
        "ATxmega16A4:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4-AU:  TQFP44, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4-AUR: TQFP44, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4-CU:  BGA49,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4-CUR: BGA49,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4-MH:  QFN44,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4-MHR: QFN44,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16A4-MU:  VQFN44, Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 231;
    n_interrupts           = 94;

    memory "fuse2"
        bitmask            = 0x43;
    ;
;

#------------------------------------------------------------
# ATxmega32A4U
#------------------------------------------------------------

part parent ".xmega-a" # x32a4u
    desc                   = "ATxmega32A4U";
    id                     = "x32a4u";
    variants               =
        "ATxmega32A4U-AN:  TQFP44,  Fmax=32 MHz, T=[0 C,   105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4U-ANR: TQFP44,  Fmax=32 MHz, T=[0 C,   105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4U-AU:  TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4U-AUR: TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4U-CU:  BGA49,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4U-CUR: VFBGA49, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32A4U-M7:  VQFN44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4U-MH:  QFN44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4U-MHR: VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 239;
    n_interrupts           = 127;
    boot_section_size      = 4096;
    signature              = 0x1e 0x95 0x41;
    usbpid                 = 0x2fe4;

    memory "eeprom"
        size               = 1024;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x9000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x8000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 4096;
        page_size          = 256;
        offset             = 0x807000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 4096;
        page_size          = 256;
        offset             = 0x808000;
        readsize           = 256;
    ;

    memory "fuse4"
        initval            = 0xfe;
    ;

    memory "prodsig"
        size               = 52;
        readsize           = 52;
    ;

    memory "usersig"
        size               = 256;
        page_size          = 256;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 4096;
    ;
;

#------------------------------------------------------------
# ATxmega32C4
#------------------------------------------------------------

part parent "x32a4u" # x32c4
    desc                   = "ATxmega32C4";
    id                     = "x32c4";
    variants               =
        "ATxmega32C4-AN:  TQFP44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C4-AU:  TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C4-AUR: TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C4-CU:  VFBGA49, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C4-CUR: VFBGA49, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32C4-M7:  VFBGA49, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C4-MH:  VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C4-MHR: VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 240;
    signature              = 0x1e 0x95 0x44;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;
;

#------------------------------------------------------------
# ATxmega32D4
#------------------------------------------------------------

part parent "x32a4u" # x32d4
    desc                   = "ATxmega32D4";
    id                     = "x32d4";
    variants               =
        "ATxmega32D4:     N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-AN:  TQFP44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-ANR: N/A,     Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32D4-AU:  TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-AUR: TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-CU:  VFBGA49, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-CUR: VFBGA49, Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-M7:  VFBGA49, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-MH:  VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D4-MHR: VQFN44,  Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 241;
    n_interrupts           = 91;
    signature              = 0x1e 0x95 0x42;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;
;

#------------------------------------------------------------
# ATxmega32A4
#------------------------------------------------------------

part parent "x32a4u" # x32a4
    desc                   = "ATxmega32A4";
    id                     = "x32a4";
    variants               =
        "ATxmega32A4:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4-AU:  TQFP44, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4-AUR: TQFP44, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4-CU:  BGA49,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4-CUR: BGA49,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4-MH:  QFN44,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4-MHR: QFN44,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32A4-MU:  VQFN44, Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 238;
    n_interrupts           = 94;

    memory "fuse2"
        bitmask            = 0x43;
    ;
;

#------------------------------------------------------------
# ATxmega64A4U
#------------------------------------------------------------

part parent ".xmega-a" # x64a4u
    desc                   = "ATxmega64A4U";
    id                     = "x64a4u";
    variants               =
        "ATxmega64A4U-AN:  TQFP44,   Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A4U-AU:  TQFP44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A4U-AUR: TQFP44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A4U-CU:  VFBGA49,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A4U-CUR: VFBGA49,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A4U-M7:  VQFN44PW, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A4U-MH:  VQFN44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A4U-MHR: VQFN44,   Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 252;
    n_interrupts           = 127;
    boot_section_size      = 4096;
    signature              = 0x1e 0x96 0x46;
    usbpid                 = 0x2fe5;

    memory "eeprom"
        size               = 2048;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x11000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x10000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 4096;
        page_size          = 256;
        offset             = 0x80f000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 4096;
        page_size          = 256;
        offset             = 0x810000;
        readsize           = 256;
    ;

    memory "fuse4"
        initval            = 0xfe;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;

    memory "usersig"
        size               = 256;
        page_size          = 256;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 4096;
    ;
;

#------------------------------------------------------------
# ATxmega32C3
#------------------------------------------------------------

part parent "x32a4u" # x32c3
    desc                   = "ATxmega32C3";
    id                     = "x32c3";
    variants               =
        "ATxmega32C3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C3-ANR: N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32C3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C3-M7:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C3-MH:  VQFN64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32C3-MHR: VQFN64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 236;
    signature              = 0x1e 0x95 0x49;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;
;

#------------------------------------------------------------
# ATxmega32D3
#------------------------------------------------------------

part parent "x32a4u" # x32d3
    desc                   = "ATxmega32D3";
    id                     = "x32d3";
    variants               =
        "ATxmega32D3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D3-ANR: N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32D3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32D3-MHR: VQFN64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32D3-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 237;
    n_interrupts           = 114;
    signature              = 0x1e 0x95 0x4a;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;
;

#------------------------------------------------------------
# ATxmega64C3
#------------------------------------------------------------

part parent "x64a4u" # x64c3
    desc                   = "ATxmega64C3";
    id                     = "x64c3";
    variants               =
        "ATxmega64C3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64C3-ANR: N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega64C3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64C3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64C3-M7:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64C3-MH:  VQFN64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64C3-MHR: VQFN64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 249;
    signature              = 0x1e 0x96 0x49;
    usbpid                 = 0x2fd6;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;
;

#------------------------------------------------------------
# ATxmega64D3
#------------------------------------------------------------

part parent "x64a4u" # x64d3
    desc                   = "ATxmega64D3";
    id                     = "x64d3";
    variants               =
        "ATxmega64D3:     N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D3-ANR: N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega64D3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D3-MHR: VQFN64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D3-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 250;
    n_interrupts           = 114;
    signature              = 0x1e 0x96 0x4a;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega64D4
#------------------------------------------------------------

part parent "x64a4u" # x64d4
    desc                   = "ATxmega64D4";
    id                     = "x64d4";
    variants               =
        "ATxmega64D4-AN:  TQFP44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D4-AU:  QFP44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D4-AUR: TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D4-CU:  VFBGA49, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D4-CUR: VFBGA49, Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D4-M7:  VFBGA49, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D4-MH:  VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64D4-MHR: VQFN44,  Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 253;
    n_interrupts           = 91;
    signature              = 0x1e 0x96 0x47;

    memory "fuse0"         = NULL;

    memory "fuse4"
        initval            = 0xff;
        bitmask            = 0x1e;
    ;
;

#------------------------------------------------------------
# ATxmega64A1
#------------------------------------------------------------

part parent "x64a4u" # x64a1
    desc                   = "ATxmega64A1";
    id                     = "x64a1";
    variants               =
        "ATxmega64A1:      N/A,      Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1-AU:   TQFP100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1-AUR:  TQFP100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1-C7U:  VFBGA100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1-C7UR: VFBGA100, Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1-CU:   CBGA100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1-CUR:  BGA100,   Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_PDI | PM_XMEGAJTAG;
    mcuid                  = 243;
    n_interrupts           = 125;
    signature              = 0x1e 0x96 0x4e;

    memory "fuse2"
        bitmask            = 0x43;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega64A1U
#------------------------------------------------------------

part parent "x64a1" # x64a1u
    desc                   = "ATxmega64A1U";
    id                     = "x64a1u";
    variants               =
        "ATxmega64A1U-AN:   TQFP100,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1U-AU:   TQFP100,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1U-AUR:  TQFP100,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1U-C7U:  VFBGA100, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1U-C7UR: VFBGA100, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega64A1U-CU:   CBGA100,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A1U-CUR:  TFBGA100, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 244;
    n_interrupts           = 127;
    usbpid                 = 0x2fe8;

    memory "fuse2"
        bitmask            = 0x63;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;
;

#------------------------------------------------------------
# ATxmega64A3
#------------------------------------------------------------

part parent "x64a1" # x64a3
    desc                   = "ATxmega64A3";
    id                     = "x64a3";
    variants               =
        "ATxmega64A3:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3-MU:  QFN64,  Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 246;
    n_interrupts           = 122;
    signature              = 0x1e 0x96 0x42;
;

#------------------------------------------------------------
# ATxmega64A3U
#------------------------------------------------------------

part parent "x64a1" # x64a3u
    desc                   = "ATxmega64A3U";
    id                     = "x64a3u";
    variants               =
        "ATxmega64A3U-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3U-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3U-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3U-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3U-MHR: VQFN64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64A3U-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 247;
    n_interrupts           = 127;
    signature              = 0x1e 0x96 0x42;

    memory "fuse2"
        bitmask            = 0x63;
    ;
;

#------------------------------------------------------------
# ATxmega64A4
#------------------------------------------------------------

part parent "x64a1" # x64a4
    desc                   = "ATxmega64A4";
    id                     = "x64a4";
    variants               =
        "ATxmega64A4: N/A, Fmax=N/A, T=[N/A, N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 251;
    signature              = 0x1e 0x96 0x46;

    memory "fuse0"
        initval            = -1;
    ;

    memory "fuse1"
        initval            = -1;
    ;

    memory "fuse2"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse4"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse5"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "lock"
        initval            = -1;
    ;
;

#------------------------------------------------------------
# ATxmega64B1
#------------------------------------------------------------

part parent "x64a1" # x64b1
    desc                   = "ATxmega64B1";
    id                     = "x64b1";
    variants               =
        "ATxmega64B1-AU:  TQFP100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64B1-AUR: TQFP100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64B1-CU:  VFBGA100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64B1-CUR: TQFP100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 245;
    n_interrupts           = 81;
    signature              = 0x1e 0x96 0x52;
    usbpid                 = 0x2fe1;

    memory "fuse2"
        bitmask            = 0x63;
    ;

    memory "fuse4"
        initval            = 0xff;
    ;
;

#------------------------------------------------------------
# ATxmega64B3
#------------------------------------------------------------

part parent "x64a1" # x64b3
    desc                   = "ATxmega64B3";
    id                     = "x64b3";
    variants               =
        "ATxmega64B3-AU:  TQFP64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64B3-AUR: TQFP100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega64B3-MH:  QFN64,   Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 248;
    n_interrupts           = 54;
    signature              = 0x1e 0x96 0x51;
    usbpid                 = 0x2fdf;

    memory "fuse2"
        bitmask            = 0x63;
    ;

    memory "fuse4"
        initval            = 0xff;
    ;
;

#------------------------------------------------------------
# ATxmega128C3
#------------------------------------------------------------

part parent ".xmega" # x128c3
    desc                   = "ATxmega128C3";
    id                     = "x128c3";
    variants               =
        "ATxmega128C3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128C3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128C3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128C3-M7:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128C3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128C3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 261;
    n_interrupts           = 127;
    boot_section_size      = 8192;
    signature              = 0x1e 0x97 0x52;
    usbpid                 = 0x2fd7;

    memory "eeprom"
        size               = 2048;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x22000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 8192;
        page_size          = 512;
        offset             = 0x81e000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 8192;
        page_size          = 512;
        offset             = 0x820000;
        readsize           = 256;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;

    memory "usersig"
        size               = 512;
        page_size          = 512;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 8192;
    ;
;

#------------------------------------------------------------
# ATxmega128D3
#------------------------------------------------------------

part parent "x128c3" # x128d3
    desc                   = "ATxmega128D3";
    id                     = "x128d3";
    variants               =
        "ATxmega128D3:     N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D3-MHR: VQFN64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D3-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 262;
    n_interrupts           = 114;
    signature              = 0x1e 0x97 0x48;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega128D4
#------------------------------------------------------------

part parent "x128c3" # x128d4
    desc                   = "ATxmega128D4";
    id                     = "x128d4";
    variants               =
        "ATxmega128D4-AN:  TQFP44,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D4-AU:  TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D4-AUR: TQFP44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D4-CU:  VFBGA49, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D4-CUR: VFBGA49, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega128D4-M7:  VFBGA49, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D4-MH:  QFN44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128D4-MHR: VQFN44,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 265;
    n_interrupts           = 91;
    signature              = 0x1e 0x97 0x47;

    memory "flash"
        page_size          = 256;
    ;
;

#------------------------------------------------------------
# ATxmega128A1
#------------------------------------------------------------

part parent "x128c3" # x128a1
    desc                   = "ATxmega128A1";
    id                     = "x128a1";
    variants               =
        "ATxmega128A1:      N/A,      Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1-AU:   TQFP100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1-AUR:  TQFP100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1-C7U:  VFBGA100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1-C7UR: VFBGA100, Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1-CU:   CBGA100,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1-CUR:  BGA100,   Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_PDI | PM_XMEGAJTAG;
    mcuid                  = 254;
    n_interrupts           = 125;
    signature              = 0x1e 0x97 0x4c;

    memory "fuse0"
        size               = 1;
        initval            = 0xff;
        offset             = 0x8f0020;
    ;

    memory "fuse2"
        bitmask            = 0x43;
    ;

    memory "fuse4"
        initval            = 0xfe;
        bitmask            = 0x1f;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega128A1 revision D
#------------------------------------------------------------

part parent "x128a1" # x128a1d
    desc                   = "ATxmega128A1revD";
    id                     = "x128a1d";
    mcuid                  = 255;
    signature              = 0x1e 0x97 0x41;
;

#------------------------------------------------------------
# ATxmega128A1U
#------------------------------------------------------------

part parent "x128a1" # x128a1u
    desc                   = "ATxmega128A1U";
    id                     = "x128a1u";
    variants               =
        "ATxmega128A1U-AN:   TQFP100,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1U-ANR:  N/A,      Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega128A1U-AU:   TQFP100,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1U-AUR:  N/A,      Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1U-C7U:  VFBGA100, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1U-C7UR: VFBGA100, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega128A1U-CU:   CBGA100,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A1U-CUR:  CBGA100,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 256;
    n_interrupts           = 127;
    usbpid                 = 0x2fed;

    memory "fuse2"
        bitmask            = 0x63;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;
;

#------------------------------------------------------------
# ATxmega128A3
#------------------------------------------------------------

part parent "x128a1" # x128a3
    desc                   = "ATxmega128A3";
    id                     = "x128a3";
    variants               =
        "ATxmega128A3:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3-MU:  QFN64,  Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 258;
    n_interrupts           = 122;
    signature              = 0x1e 0x97 0x42;
;

#------------------------------------------------------------
# ATxmega128A3U
#------------------------------------------------------------

part parent "x128a1" # x128a3u
    desc                   = "ATxmega128A3U";
    id                     = "x128a3u";
    variants               =
        "ATxmega128A3U-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3U-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3U-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3U-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3U-MHR: QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A3U-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 259;
    n_interrupts           = 127;
    signature              = 0x1e 0x97 0x42;
    usbpid                 = 0x2fe6;

    memory "fuse2"
        bitmask            = 0x63;
    ;
;

#------------------------------------------------------------
# ATxmega128A4
#------------------------------------------------------------

part parent ".xmega" # x128a4
    desc                   = "ATxmega128A4";
    id                     = "x128a4";
    variants               =
        "ATxmega128A4: N/A, Fmax=N/A, T=[N/A, N/A], Vcc=[1.6 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_PDI | PM_XMEGAJTAG;
    mcuid                  = 263;
    signature              = 0x1e 0x97 0x46;

    memory "eeprom"
        size               = 2048;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x22000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 4096;
        page_size          = 512;
        offset             = 0x81f000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 8192;
        page_size          = 512;
        offset             = 0x820000;
        readsize           = 256;
    ;

    memory "fuse0"
        size               = 1;
        offset             = 0x8f0020;
    ;

    memory "fuse1"
        initval            = -1;
    ;

    memory "fuse2"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse4"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse5"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "lock"
        initval            = -1;
    ;

    memory "usersig"
        size               = 512;
        page_size          = 512;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 8192;
    ;
;

#------------------------------------------------------------
# ATxmega128A4U
#------------------------------------------------------------

part parent ".xmega-a" # x128a4u
    desc                   = "ATxmega128A4U";
    id                     = "x128a4u";
    variants               =
        "ATxmega128A4U-AN:  TQFP44,   Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A4U-AU:  TQFP44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A4U-AUR: TQFP44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A4U-CU:  BGA49,    Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A4U-M7:  VQFN44PW, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A4U-MH:  VQFN44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128A4U-MHR: VQFN44,   Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 264;
    n_interrupts           = 127;
    boot_section_size      = 8192;
    signature              = 0x1e 0x97 0x46;
    usbpid                 = 0x2fde;

    memory "eeprom"
        size               = 2048;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x22000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x20000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 4096;
        page_size          = 256;
        offset             = 0x81f000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 8192;
        page_size          = 256;
        offset             = 0x820000;
        readsize           = 256;
    ;

    memory "fuse4"
        initval            = 0xfe;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;

    memory "usersig"
        size               = 256;
        page_size          = 256;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 8192;
    ;
;

#------------------------------------------------------------
# ATxmega128B1
#------------------------------------------------------------

part parent ".xmega" # x128b1
    desc                   = "ATxmega128B1";
    id                     = "x128b1";
    variants               =
        "ATxmega128B1-AN:  TQFP100,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B1-AU:  TQFP100,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B1-AUR: TQFP100,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B1-CU:  VFBGA100, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B1-CUR: TFBGA100, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_PDI | PM_XMEGAJTAG;
    mcuid                  = 257;
    n_interrupts           = 81;
    boot_section_size      = 8192;
    signature              = 0x1e 0x97 0x4d;
    usbpid                 = 0x2fea;

    memory "eeprom"
        size               = 2048;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x22000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x20000;
        page_size          = 256;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 8192;
        page_size          = 256;
        offset             = 0x81e000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 8192;
        page_size          = 256;
        offset             = 0x820000;
        readsize           = 256;
    ;

    memory "fuse0"
        size               = 1;
        initval            = 0xff;
        offset             = 0x8f0020;
    ;

    memory "fuse4"
        bitmask            = 0x1f;
    ;

    memory "prodsig"
        size               = 52;
        readsize           = 52;
    ;

    memory "usersig"
        size               = 256;
        page_size          = 256;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 8192;
    ;
;

#------------------------------------------------------------
# ATxmega128B3
#------------------------------------------------------------

part parent "x128b1" # x128b3
    desc                   = "ATxmega128B3";
    id                     = "x128b3";
    variants               =
        "ATxmega128B3-AU:   TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B3-AUR:  TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B3-MCU:  VQFN64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B3-MCUR: VQFN64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B3-MH:   QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega128B3-MHR:  QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 260;
    n_interrupts           = 54;
    signature              = 0x1e 0x97 0x4b;
    usbpid                 = 0x2fe0;
;

#------------------------------------------------------------
# ATxmega192C3
#------------------------------------------------------------

part parent ".xmega" # x192c3
    desc                   = "ATxmega192C3";
    id                     = "x192c3";
    variants               =
        "ATxmega192C3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192C3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192C3-MH:  VQFN64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192C3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 269;
    n_interrupts           = 127;
    boot_section_size      = 8192;
    signature              = 0x1e 0x97 0x51;

#   usbpid                 = 0x2f??;

    memory "eeprom"
        size               = 2048;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x32000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x30000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 8192;
        page_size          = 512;
        offset             = 0x82e000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 8192;
        page_size          = 512;
        offset             = 0x830000;
        readsize           = 256;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;

    memory "usersig"
        size               = 512;
        page_size          = 512;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 0x4000;
    ;
;

#------------------------------------------------------------
# ATxmega192D3
#------------------------------------------------------------

part parent "x192c3" # x192d3
    desc                   = "ATxmega192D3";
    id                     = "x192d3";
    variants               =
        "ATxmega192D3:     N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192D3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192D3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192D3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192D3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192D3-MHR: VQFN64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192D3-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 270;
    n_interrupts           = 114;
    signature              = 0x1e 0x97 0x49;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega192A1
#------------------------------------------------------------

part parent "x192c3" # x192a1
    desc                   = "ATxmega192A1";
    id                     = "x192a1";
    variants               =
        "ATxmega192A1-AU: TQFP100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A1-CU: CBGA100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_PDI | PM_XMEGAJTAG;
    mcuid                  = 266;
    signature              = 0x1e 0x97 0x4e;

    memory "fuse0"
        size               = 1;
        offset             = 0x8f0020;
    ;

    memory "fuse1"
        initval            = -1;
    ;

    memory "fuse2"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse4"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse5"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "lock"
        initval            = -1;
    ;
;

#------------------------------------------------------------
# ATxmega192A3
#------------------------------------------------------------

part parent "x192c3" # x192a3
    desc                   = "ATxmega192A3";
    id                     = "x192a3";
    variants               =
        "ATxmega192A3:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3-MU:  QFN64,  Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_PDI | PM_XMEGAJTAG;
    mcuid                  = 267;
    n_interrupts           = 122;
    signature              = 0x1e 0x97 0x44;

    memory "fuse0"
        size               = 1;
        initval            = 0xff;
        offset             = 0x8f0020;
    ;

    memory "fuse2"
        bitmask            = 0x43;
    ;

    memory "fuse4"
        initval            = 0xfe;
        bitmask            = 0x1f;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega192A3U
#------------------------------------------------------------

part parent "x192a1" # x192a3u
    desc                   = "ATxmega192A3U";
    id                     = "x192a3u";
    variants               =
        "ATxmega192A3U-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3U-ANR: TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3U-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3U-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3U-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega192A3U-MHR: VQFN64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega192A3U-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 268;
    signature              = 0x1e 0x97 0x44;
    usbpid                 = 0x2fe7;

    memory "fuse0"
        initval            = 0xff;
    ;

    memory "fuse1"
        initval            = 0x00;
    ;

    memory "fuse2"
        initval            = 0xff;
        bitmask            = 0x63;
    ;

    memory "fuse4"
        initval            = 0xfe;
        bitmask            = 0x1f;
    ;

    memory "fuse5"
        initval            = 0xff;
        bitmask            = 0x3f;
    ;

    memory "lock"
        initval            = 0xff;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega256C3
#------------------------------------------------------------

part parent ".xmega" # x256c3
    desc                   = "ATxmega256C3";
    id                     = "x256c3";
    variants               =
        "ATxmega256C3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256C3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256C3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256C3-M7:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256C3-MH:  VQFN64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256C3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 276;
    n_interrupts           = 127;
    boot_section_size      = 8192;
    signature              = 0x1e 0x98 0x46;
    usbpid                 = 0x2fda;

    memory "eeprom"
        size               = 4096;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x42000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x40000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 8192;
        page_size          = 512;
        offset             = 0x83e000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 8192;
        page_size          = 512;
        offset             = 0x840000;
        readsize           = 256;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;

    memory "usersig"
        size               = 512;
        page_size          = 512;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 0x4000;
    ;
;

#------------------------------------------------------------
# ATxmega256D3
#------------------------------------------------------------

part parent "x256c3" # x256d3
    desc                   = "ATxmega256D3";
    id                     = "x256d3";
    variants               =
        "ATxmega256D3:     N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256D3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256D3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256D3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256D3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256D3-MHR: VQFN64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256D3-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 277;
    n_interrupts           = 114;
    signature              = 0x1e 0x98 0x44;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega256A1
#------------------------------------------------------------

part parent "x256c3" # x256a1
    desc                   = "ATxmega256A1";
    id                     = "x256a1";
    variants               =
        "ATxmega256A1-AU: TQFP100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A1-CU: CBGA100, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    prog_modes             = PM_SPM | PM_PDI | PM_XMEGAJTAG;
    mcuid                  = 271;

    memory "fuse0"
        size               = 1;
        offset             = 0x8f0020;
    ;

    memory "fuse1"
        initval            = -1;
    ;

    memory "fuse2"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse4"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse5"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "lock"
        initval            = -1;
    ;
;

#------------------------------------------------------------
# ATxmega256A3
#------------------------------------------------------------

part parent "x256a1" # x256a3
    desc                   = "ATxmega256A3";
    id                     = "x256a3";
    variants               =
        "ATxmega256A3:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3-AUR: TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3-MU:  QFN64,  Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 272;
    n_interrupts           = 122;
    signature              = 0x1e 0x98 0x42;

    memory "fuse0"
        initval            = 0xff;
    ;

    memory "fuse1"
        initval            = 0x00;
    ;

    memory "fuse2"
        initval            = 0xff;
        bitmask            = 0x43;
    ;

    memory "fuse4"
        initval            = 0xfe;
        bitmask            = 0x1f;
    ;

    memory "fuse5"
        initval            = 0xff;
        bitmask            = 0x3f;
    ;

    memory "lock"
        initval            = 0xff;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega256A3U
#------------------------------------------------------------

part parent "x256a1" # x256a3u
    desc                   = "ATxmega256A3U";
    id                     = "x256a3u";
    variants               =
        "ATxmega256A3U-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3U-ANR: N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega256A3U-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3U-AUR: TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3U-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3U-MHR: QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3U-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 275;
    signature              = 0x1e 0x98 0x42;
    usbpid                 = 0x2fec;

    memory "fuse0"
        initval            = 0xff;
    ;

    memory "fuse1"
        initval            = 0x00;
    ;

    memory "fuse2"
        initval            = 0xff;
        bitmask            = 0x63;
    ;

    memory "fuse4"
        initval            = 0xfe;
        bitmask            = 0x1f;
    ;

    memory "fuse5"
        initval            = 0xff;
        bitmask            = 0x3f;
    ;

    memory "lock"
        initval            = 0xff;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega256A3B
#------------------------------------------------------------

part parent "x256a1" # x256a3b
    desc                   = "ATxmega256A3B";
    id                     = "x256a3b";
    variants               =
        "ATxmega256A3B:     N/A,    Fmax=N/A,    T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3B-AU:  TQFP64, Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3B-MH:  QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3B-MHR: QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3B-MU:  QFN64,  Fmax=32 MHz, T=[N/A,    N/A], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 273;
    n_interrupts           = 122;
    signature              = 0x1e 0x98 0x43;

    memory "fuse0"
        initval            = 0xff;
    ;

    memory "fuse1"
        initval            = 0x00;
    ;

    memory "fuse2"
        initval            = 0xff;
        bitmask            = 0x43;
    ;

    memory "fuse4"
        initval            = 0xfe;
        bitmask            = 0x1f;
    ;

    memory "fuse5"
        initval            = 0xff;
        bitmask            = 0x3f;
    ;

    memory "lock"
        initval            = 0xff;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega256A3BU
#------------------------------------------------------------

part parent "x256a1" # x256a3bu
    desc                   = "ATxmega256A3BU";
    id                     = "x256a3bu";
    variants               =
        "ATxmega256A3BU-AU:  TQFP64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3BU-AUR: TQFP64, Fmax=N/A,    T=[N/A,    N/A], Vcc=[N/A,     N/A]",
        "ATxmega256A3BU-MH:  QFN64,  Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega256A3BU-MHR: VQFN64, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 274;
    signature              = 0x1e 0x98 0x43;
    usbpid                 = 0x2fe2;

    memory "fuse0"
        initval            = 0xff;
    ;

    memory "fuse1"
        initval            = 0x00;
    ;

    memory "fuse2"
        initval            = 0xff;
        bitmask            = 0x63;
    ;

    memory "fuse4"
        initval            = 0xfe;
        bitmask            = 0x1f;
    ;

    memory "fuse5"
        initval            = 0xff;
        bitmask            = 0x3f;
    ;

    memory "lock"
        initval            = 0xff;
    ;

    memory "prodsig"
        size               = 52;
        page_size          = 1;
        readsize           = 52;
    ;
;

#------------------------------------------------------------
# ATxmega384C3
#------------------------------------------------------------

part parent ".xmega" # x384c3
    desc                   = "ATxmega384C3";
    id                     = "x384c3";
    variants               =
        "ATxmega384C3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384C3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384C3-AUR: TQFP64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega384C3-M7:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384C3-MH:  QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384C3-MHR: VQFN64, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 278;
    n_interrupts           = 127;
    boot_section_size      = 8192;
    signature              = 0x1e 0x98 0x45;
    usbpid                 = 0x2fdb;

    memory "eeprom"
        size               = 4096;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x62000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x60000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 8192;
        page_size          = 512;
        offset             = 0x85e000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 8192;
        page_size          = 512;
        offset             = 0x860000;
        readsize           = 256;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;

    memory "usersig"
        size               = 512;
        page_size          = 512;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 0x8000;
    ;
;

#------------------------------------------------------------
# ATxmega384D3
#------------------------------------------------------------

part parent "x384c3" # x384d3
    desc                   = "ATxmega384D3";
    id                     = "x384d3";
    variants               =
        "ATxmega384D3-AN:  TQFP64, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384D3-AU:  TQFP64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384D3-MH:  VQFN64, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384D3-MHR: QFN64,  Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega384D3-MN:  QFN64,  Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 279;
    n_interrupts           = 114;
    signature              = 0x1e 0x98 0x47;
;

#------------------------------------------------------------
# ATxmega8E5
#------------------------------------------------------------

part parent ".xmega-e" # x8e5
    desc                   = "ATxmega8E5";
    id                     = "x8e5";
    variants               =
        "ATxmega8E5-AN:   TQFP32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-ANR:  N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega8E5-AU:   TQFP32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-AUR:  TQFP32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-M4N:  UQFN32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-M4U:  UQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-M4UR: UQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-MN:   VQFN32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-MNR:  N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega8E5-MU:   VQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega8E5-MUR:  VQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 230;
    n_interrupts           = 43;
    boot_section_size      = 2048;
    signature              = 0x1e 0x93 0x41;

    memory "eeprom"
        size               = 512;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x2800;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 8192;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 2048;
        page_size          = 128;
        offset             = 0x801800;
        readsize           = 256;
    ;

    memory "boot"
        size               = 2048;
        page_size          = 128;
        offset             = 0x802000;
        readsize           = 256;
    ;

    memory "fuse2"
        bitmask            = 0x43;
    ;

    memory "prodsig"
        size               = 54;
        readsize           = 54;
    ;

    memory "usersig"
        size               = 128;
        page_size          = 128;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 1024;
    ;
;

#------------------------------------------------------------
# ATxmega16E5
#------------------------------------------------------------

part parent ".xmega-e" # x16e5
    desc                   = "ATxmega16E5";
    id                     = "x16e5";
    variants               =
        "ATxmega16E5-AN:   TQFP32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-ANR:  TQFP32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-AU:   TQFP32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-AUR:  TQFP32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-M4N:  UQFN32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-M4U:  UQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-M4UR: UQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-MN:   VQFN32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-MNR:  N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega16E5-MU:   VQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega16E5-MUR:  VQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 235;
    n_interrupts           = 43;
    boot_section_size      = 4096;
    signature              = 0x1e 0x94 0x45;

    memory "eeprom"
        size               = 512;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x5000;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x4000;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 4096;
        page_size          = 128;
        offset             = 0x803000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 4096;
        page_size          = 128;
        offset             = 0x804000;
        readsize           = 256;
    ;

    memory "fuse2"
        bitmask            = 0x43;
    ;

    memory "prodsig"
        size               = 54;
        readsize           = 54;
    ;

    memory "usersig"
        size               = 128;
        page_size          = 128;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 2048;
    ;
;

#------------------------------------------------------------
# ATxmega32E5
#------------------------------------------------------------

part parent ".xmega-e" # x32e5
    desc                   = "ATxmega32E5";
    id                     = "x32e5";
    variants               =
        "ATxmega32E5-AN:   TQFP32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-ANR:  N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32E5-AU:   TQFP32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-AUR:  TQFP32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-M4N:  UQFN32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-M4U:  UQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-M4UR: UQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-MN:   VQFN32, Fmax=32 MHz, T=[-40 C, 105 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-MNR:  N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "ATxmega32E5-MU:   VQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]",
        "ATxmega32E5-MUR:  VQFN32, Fmax=32 MHz, T=[-40 C,  85 C], Vcc=[1.6 V, 3.6 V]";
    mcuid                  = 242;
    n_interrupts           = 43;
    boot_section_size      = 4096;
    signature              = 0x1e 0x95 0x4c;

    memory "eeprom"
        size               = 1024;
        page_size          = 32;
        offset             = 0x8c0000;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x9000;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "application"
        size               = 0x8000;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "apptable"
        size               = 4096;
        page_size          = 128;
        offset             = 0x807000;
        readsize           = 256;
    ;

    memory "boot"
        size               = 4096;
        page_size          = 128;
        offset             = 0x808000;
        readsize           = 256;
    ;

    memory "fuse2"
        bitmask            = 0x43;
    ;

    memory "prodsig"
        size               = 54;
        readsize           = 54;
    ;

    memory "usersig"
        size               = 128;
        page_size          = 128;
        offset             = 0x8e0400;
        readsize           = 256;
    ;

    memory "sram"
        size               = 4096;
    ;
;

#------------------------------------------------------------
# AVR32UC3A0512
#------------------------------------------------------------

part # uc3a0512
    desc                   = "AT32UC3A0512";
    id                     = "uc3a0512";
    variants               =
        "AT32UC3A0512-ALTR:    LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512-ALTRA:   LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512-ALTT:    LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512-ALTTA:   LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512-ALUR:    LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512-ALUT:    LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512-CTUR:    TFBGA144, Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512-CTUT:    TFBGA144, Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512AU-ALTRA: LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]",
        "AT32UC3A0512AU-ALUT:  LQFP144,  Fmax=66 MHz, T=[-40 C, 85 C], Vcc=[1.65 V, 3.6 V]";
    prog_modes             = PM_AVR32JTAG | PM_aWire;
    signature              = 0xed 0xc0 0x3f;

    memory "flash"
        paged              = yes;
        size               = 0x80000;    # could be set dynamicly
        page_size          = 512;           # bytes
        num_pages          = 1024;          # could be set dynamicly
        offset             = 0x80000000;
        readsize           = 512;           # bytes
    ;
;

#------------------------------------------------------------
# deprecated, use 'uc3a0512'
#------------------------------------------------------------

part parent "uc3a0512" # ucr2
    desc                   = "deprecated, use 'uc3a0512'";
    id                     = "ucr2";
;

#------------------------------------------------------------
# ATtiny1634
#------------------------------------------------------------

part # t1634
    desc                   = "ATtiny1634";
    id                     = "t1634";
    variants               =
        "ATtiny1634:     N/A,    Fmax=N/A,    T=[N/A,     N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634-MN:  WQFN20, Fmax=12 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634-MNR: WQFN20, Fmax=12 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634-MU:  QFN20,  Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634-MUR: QFN20,  Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634-SU:  SOIC20, Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634-SUR: SOIC20, Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    prog_modes             = PM_SPM | PM_ISP | PM_HVPP | PM_debugWIRE;
    mcuid                  = 40;
    n_interrupts           = 28;
    n_page_erase           = 4;
    stk500_devcode         = 0x86;
    chip_erase_delay       = 9000;
    pagel                  = 0xb3;
    bs2                    = 0xb1;
#   avr910_devcode         = 0x??;
    signature              = 0x1e 0x94 0x12;
    reset                  = io;
    timeout                = 200;
    stabdelay              = 100;
    cmdexedelay            = 25;
    synchloops             = 32;
    pollindex              = 3;
    pollvalue              = 0x53;
    predelay               = 1;
    postdelay              = 1;
    pollmethod             = 1;
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    flash_instr            =  0xb6, 0x01, 0x11;
    eeprom_instr           =
        0xbd, 0xf2, 0xbd, 0xe1, 0xbb, 0xcf, 0xb4, 0x00,
        0xbe, 0x01, 0xb6, 0x01, 0xbc, 0x00, 0xbb, 0xbf,
        0x99, 0xf9, 0xbb, 0xaf;
    hventerstabdelay       = 100;
    latchcycles            = 5;
    togglevtg              = 1;
    poweroffdelay          = 15;
    resetdelayms           = 1;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x2e;
    spmcr                  = 0x57;
    eecr                   = 0x3c;
    ocdrev                 = 1;
    factory_fcpu           = 1000000;
    chip_erase             = "1010.1100--100x.xxxx--xxxx.xxxx--xxxx.xxxx";
    pgm_enable             = "1010.1100--0101.0011--xxxx.xxxx--xxxx.xxxx";

    memory "eeprom"
        size               = 256;
        page_size          = 4;
        min_write_delay    = 3600;
        max_write_delay    = 3600;
        mode               = 0x41;
        delay              = 20;
        blocksize          = 4;
        readsize           = 256;
        read               = "1010.0000--000x.xxxa--aaaa.aaaa--oooo.oooo";
        write              = "1100.0000--000x.xxxa--aaaa.aaaa--iiii.iiii";
        loadpage_lo        = "1100.0001--0000.0000--0000.00aa--iiii.iiii";
        writepage          = "1100.0010--00xx.xxxa--aaaa.aa00--xxxx.xxxx";
    ;

    memory "flash"
        paged              = yes;
        size               = 0x4000;
        page_size          = 32;
        num_pages          = 512;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        mode               = 0x41;
        delay              = 10;
        blocksize          = 32;
        readsize           = 256;
        read_lo            = "0010.0000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        read_hi            = "0010.1000--00aa.aaaa--aaaa.aaaa--oooo.oooo";
        loadpage_lo        = "0100.0000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        loadpage_hi        = "0100.1000--000x.xxxx--xxxx.aaaa--iiii.iiii";
        writepage          = "0100.1100--00aa.aaaa--aaaa.xxxx--xxxx.xxxx";
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0x62;
        bitmask            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0000--xxxx.xxxx--iiii.iiii";
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xdf;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.1000--xxxx.xxxx--iiii.iiii";
    ;

    memory "efuse"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x1f;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.0000--0000.1000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--1010.0100--xxxx.xxxx--xxxi.iiii";
    ;

    memory "lock"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x03;
        min_write_delay    = 4500;
        max_write_delay    = 4500;
        read               = "0101.1000--0000.0000--xxxx.xxxx--oooo.oooo";
        write              = "1010.1100--111x.xxxx--xxxx.xxxx--1111.11ii";
    ;

    memory "signature"
        size               = 3;
        read               = "0011.0000--000x.xxxx--xxxx.xxaa--oooo.oooo";
    ;

    memory "calibration"
        size               = 1;
        read               = "0011.1000--000x.xxxx--0000.0000--oooo.oooo";
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# ATtiny1634R
#------------------------------------------------------------

part parent "t1634" # t1634r
    desc                   = "ATtiny1634R";
    id                     = "t1634r";
    variants               =
        "ATtiny1634R-MU:  QFN20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634R-MUR: WQFN20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634R-SU:  SOIC20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1634R-SUR: SOIC20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 41;
;

#------------------------------------------------------------
# Common values for reduced core tinys (4/5/9/10/20/40)
#------------------------------------------------------------

part # .reduced_core_tiny
    desc                   = "Common values for reduced core tinys";
    id                     = ".reduced_core_tiny";
    prog_modes             = PM_TPI;

    memory "fuse"
        size               = 1;
        page_size          = 16;
        initval            = 0xff;
        bitmask            = 0x07;
        offset             = 0x3f40;
        blocksize          = 4;
    ;

    memory "lockbits"
        size               = 1;
        page_size          = 16;
        initval            = 0xff;
        bitmask            = 0x03;
        offset             = 0x3f00;
    ;

    memory "signature"
        size               = 3;
        page_size          = 16;
        offset             = 0x3fc0;
    ;

    memory "calibration"
        size               = 1;
        page_size          = 16;
        offset             = 0x3f80;
    ;

    memory "sram"
        size               = 32;
        offset             = 0x40;
    ;
;

#------------------------------------------------------------
# ATtiny4
#------------------------------------------------------------

part parent ".reduced_core_tiny" # t4
    desc                   = "ATtiny4";
    id                     = "t4";
    variants               =
        "ATtiny4-MAHR: UDFN8,   Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4-TS8R: SOT23-6, Fmax=10 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny4-TSHR: SOT23-6, Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 0;
    n_interrupts           = 10;
    signature              = 0x1e 0x8f 0x0a;
    factory_fcpu           = 1000000;

    memory "flash"
        size               = 512;
        page_size          = 16;
        offset             = 0x4000;
        blocksize          = 128;
    ;

    memory "io"
        size               = 64;
    ;
;

#------------------------------------------------------------
# ATtiny5
#------------------------------------------------------------

part parent "t4" # t5
    desc                   = "ATtiny5";
    id                     = "t5";
    variants               =
        "ATtiny5-MAHR: USON8,   Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny5-TS8R: SOT23-6, Fmax=10 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny5-TSHR: SOT23-6, Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 1;
    n_interrupts           = 11;
    signature              = 0x1e 0x8f 0x09;
;

#------------------------------------------------------------
# ATtiny9
#------------------------------------------------------------

part parent ".reduced_core_tiny" # t9
    desc                   = "ATtiny9";
    id                     = "t9";
    variants               =
        "ATtiny9-MAHR: DFN8,    Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny9-TS8R: SOT23-6, Fmax=10 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny9-TSHR: SOT23-6, Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 2;
    n_interrupts           = 10;
    signature              = 0x1e 0x90 0x08;
    factory_fcpu           = 1000000;

    memory "flash"
        size               = 1024;
        page_size          = 16;
        offset             = 0x4000;
        blocksize          = 128;
    ;

    memory "io"
        size               = 64;
    ;
;

#------------------------------------------------------------
# ATtiny10
#------------------------------------------------------------

part parent "t9" # t10
    desc                   = "ATtiny10";
    id                     = "t10";
    variants               =
        "ATtiny10-MAHR: UDFN8,   Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny10-TS8R: SOT23-6, Fmax=10 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny10-TSHR: SOT23-6, Fmax=12 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 3;
    n_interrupts           = 11;
    signature              = 0x1e 0x90 0x03;
;

#------------------------------------------------------------
# ATtiny20
#------------------------------------------------------------

part parent ".reduced_core_tiny" # t20
    desc                   = "ATtiny20";
    id                     = "t20";
    variants               =
        "ATtiny20-CCU:  UFBGA15, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-CCUR: UFBGA15, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-MMH:  VQFN20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-MMHR: VQFN20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-SSU:  SOIC14,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-SSUR: SOIC14,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-UUR:  WLCSP12, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-XU:   TSSOP14, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny20-XUR:  TSSOP14, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 4;
    n_interrupts           = 17;
    signature              = 0x1e 0x91 0x0f;
    factory_fcpu           = 1000000;

    memory "flash"
        size               = 2048;
        page_size          = 16;
        n_word_writes      = 2;
        offset             = 0x4000;
        blocksize          = 128;
    ;

    memory "fuse"
        bitmask            = 0x77;
        n_word_writes      = 2;
    ;

    memory "io"
        size               = 64;
    ;

    memory "sram"
        size               = 128;
    ;
;

#------------------------------------------------------------
# ATtiny40
#------------------------------------------------------------

part parent ".reduced_core_tiny" # t40
    desc                   = "ATtiny40";
    id                     = "t40";
    variants               =
        "ATtiny40-MMH:  VQFN20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny40-MMHR: VQFN20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny40-SU:   SOIC20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny40-SUR:  SOIC20,  Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny40-XU:   TSSOP20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny40-XUR:  TSSOP20, Fmax=12 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 5;
    n_interrupts           = 18;
    signature              = 0x1e 0x92 0x0e;
    factory_fcpu           = 1000000;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        n_word_writes      = 4;
        offset             = 0x4000;
        blocksize          = 128;
    ;

    memory "fuse"
        bitmask            = 0x77;
        n_word_writes      = 4;
    ;

    memory "io"
        size               = 64;
    ;

    memory "sram"
        size               = 256;
    ;
;

#------------------------------------------------------------
# ATtiny102
#------------------------------------------------------------

part parent ".reduced_core_tiny" # t102
    desc                   = "ATtiny102";
    id                     = "t102";
    variants               =
        "ATtiny102-M7R:   UDFN8, Fmax=12 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny102-M8R:   UDFN8, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny102-SSFR:  SOIC8, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny102-SSNR:  SOIC8, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny102F-M7R:  UDFN8, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny102F-M8R:  UDFN8, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny102F-SSFR: SOIC8, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny102F-SSNR: SOIC8, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 6;
    n_interrupts           = 16;
    signature              = 0x1e 0x90 0x0c;
    factory_fcpu           = 1000000;

    memory "flash"
        size               = 1024;
        page_size          = 16;
        offset             = 0x4000;
        blocksize          = 128;
    ;

    memory "fuse"
        bitmask            = 0x0f;
    ;

    memory "prodsig"
        size               = 16;
        page_size          = 16;
        offset             = 0x3fc0;
    ;

    memory "sigrow"
        alias "prodsig";
    ;

    memory "io"
        size               = 64;
    ;
;

#------------------------------------------------------------
# ATtiny104
#------------------------------------------------------------

part parent ".reduced_core_tiny" # t104
    desc                   = "ATtiny104";
    id                     = "t104";
    variants               =
        "ATtiny104-SSFR:  SOIC14, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny104-SSNR:  SOIC14, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny104F-SSFR: SOIC14, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny104F-SSNR: SOIC14, Fmax=12 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 7;
    n_interrupts           = 16;
    signature              = 0x1e 0x90 0x0b;
    factory_fcpu           = 1000000;

    memory "flash"
        size               = 1024;
        page_size          = 16;
        offset             = 0x4000;
        blocksize          = 128;
    ;

    memory "fuse"
        bitmask            = 0x0f;
    ;

    memory "prodsig"
        size               = 16;
        page_size          = 16;
        offset             = 0x3fc0;
    ;

    memory "sigrow"
        alias "prodsig";
    ;

    memory "io"
        size               = 64;
    ;
;

#------------------------------------------------------------
# ATmega406
#------------------------------------------------------------

part # m406
    desc                   = "ATmega406";
    id                     = "m406";
    variants               =
        "ATmega406:      N/A,    Fmax=1 MHz, T=[N/A,    N/A], Vcc=[3.3 V, 3.3 V]",
        "ATmega406-1AAU: LQFP48, Fmax=1 MHz, T=[-30 C, 85 C], Vcc=[4 V,    25 V]";
    prog_modes             = PM_SPM | PM_HVPP | PM_JTAG;
    mcuid                  = 125;
    n_interrupts           = 23;
    n_boot_sections        = 4;
    boot_section_size      = 512;
    # STK500 parameters (parallel programming IO lines)
    pagel                  = 0xa7;
    bs2                    = 0xa0;
    signature              = 0x1e 0x95 0x07;
    reset                  = io;
    serial                 = no;
    # STK500v2 HV programming parameters, from XML
    pp_controlstack        =
        0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
        0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
        0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
        0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay       = 100;
    latchcycles            = 6;
    hvleavestabdelay       = 15;
    resetdelay             = 15;
    chiperasepolltimeout   = 10;
    programfusepolltimeout = 5;
    programlockpolltimeout = 5;
    idr                    = 0x31;
    spmcr                  = 0x57;
    eecr                   = 0x3f;
    ocdrev                 = 3;
    factory_fcpu           = 1000000;

    memory "eeprom"
        size               = 512;
        page_size          = 4;
        num_pages          = 128;
        blocksize          = 4;
        readsize           = 4;
    ;

    memory "flash"
        paged              = yes;
        size               = 0xa000;
        page_size          = 128;
        num_pages          = 320;
        blocksize          = 128;
        readsize           = 128;
    ;

    memory "lfuse"
        size               = 1;
        initval            = 0xcd;
    ;

    memory "hfuse"
        size               = 1;
        initval            = 0xfe;
        bitmask            = 0x03;
    ;

    memory "lockbits"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x3f;
    ;

    memory "signature"
        size               = 3;
    ;

    memory "io"
        size               = 224;
        offset             = 0x20;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x100;
    ;
;

#------------------------------------------------------------
# AVR8X family common values
#------------------------------------------------------------

part # .avr8x
    desc                   = "AVR8X family common values";
    id                     = ".avr8x";
    prog_modes             = PM_SPM | PM_UPDI;
    n_boot_sections        = 1;
    boot_section_size      = 256;
    nvm_base               = 0x1000;
    ocd_base               = 0x0f80;
    syscfg_base            = 0x0f00;
    factory_fcpu           = 20000000;

    memory "fuses"
        size               = 10;
        offset             = 0x1280;
        readsize           = 1;
    ;

    memory "fuse0"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1280;
        readsize           = 1;
    ;

    memory "wdtcfg"
        alias "fuse0";
    ;

    memory "fuse1"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1281;
        readsize           = 1;
    ;

    memory "bodcfg"
        alias "fuse1";
    ;

    memory "fuse2"
        size               = 1;
        initval            = 0x7e;
        bitmask            = 0x83;
        offset             = 0x1282;
        readsize           = 1;
    ;

    memory "osccfg"
        alias "fuse2";
    ;

    memory "fuse5"
        size               = 1;
        initval            = 0xf6;
        bitmask            = 0xcd;
        offset             = 0x1285;
        readsize           = 1;
    ;

    memory "syscfg0"
        alias "fuse5";
    ;

    memory "fuse6"
        size               = 1;
        initval            = 0xff;
        bitmask            = 0x07;
        offset             = 0x1286;
        readsize           = 1;
    ;

    memory "syscfg1"
        alias "fuse6";
    ;

    memory "fuse7"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1287;
        readsize           = 1;
    ;

    memory "append"
        alias "fuse7";
    ;

    memory "codesize"
        alias "fuse7";
    ;

    memory "fuse8"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1288;
        readsize           = 1;
    ;

    memory "bootend"
        alias "fuse8";
    ;

    memory "bootsize"
        alias "fuse8";
    ;

    memory "lock"
        size               = 1;
        offset             = 0x128a;
        readsize           = 1;
    ;

    memory "prodsig"
        size               = 64;
        page_size          = 64;
        offset             = 0x1100;
        readsize           = 64;
    ;

    memory "sigrow"
        alias "prodsig";
    ;

    memory "signature"
        size               = 3;
        offset             = 0x1100;
        readsize           = 3;
    ;

    memory "tempsense"
        size               = 2;
        offset             = 0x1120;
        readsize           = 1;
    ;

    memory "sernum"
        size               = 10;
        offset             = 0x1103;
        readsize           = 1;
    ;

    memory "osccal16"
        size               = 2;
        offset             = 0x1118;
        readsize           = 1;
    ;

    memory "osccal20"
        size               = 2;
        offset             = 0x111a;
        readsize           = 1;
    ;

    memory "osc16err"
        size               = 2;
        offset             = 0x1122;
        readsize           = 1;
    ;

    memory "osc20err"
        size               = 2;
        offset             = 0x1124;
        readsize           = 1;
    ;

    memory "io"
        size               = 4352;
        readsize           = 1;
    ;

    memory "sib"
        size               = 32;
        readsize           = 1;
    ;
;

#------------------------------------------------------------
# AVR8X tiny family common values
#------------------------------------------------------------

part parent ".avr8x" # .avr8x_tiny
    desc                   = "AVR8X tiny family common values";
    id                     = ".avr8x_tiny";
    family_id              = "tinyAVR";
    # Shared UPDI pin, HV on UPDI pin
    hvupdi_variant         = 0;

    memory "userrow"
        size               = 32;
        page_size          = 32;
        offset             = 0x1300;
        readsize           = 256;
    ;

    memory "usersig"
        alias "userrow";
    ;
;

#------------------------------------------------------------
# AVR8X mega family common values
#------------------------------------------------------------

part parent ".avr8x" # .avr8x_mega
    desc                   = "AVR8X mega family common values";
    id                     = ".avr8x_mega";
    family_id              = "megaAVR";
    # Dedicated UPDI pin, no HV
    hvupdi_variant         = 1;

    memory "fuse5"
        bitmask            = 0xc9;
    ;

    memory "userrow"
        size               = 64;
        page_size          = 64;
        offset             = 0x1300;
        readsize           = 256;
    ;

    memory "usersig"
        alias "userrow";
    ;
;

#------------------------------------------------------------
# ATtiny202
#------------------------------------------------------------

part parent ".avr8x_tiny" # t202
    desc                   = "ATtiny202";
    id                     = "t202";
    variants               =
        "ATtiny202-SSF:  SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny202-SSFR: SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny202-SSN:  SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny202-SSNR: SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 280;
    n_interrupts           = 26;
    signature              = 0x1e 0x91 0x23;

    memory "eeprom"
        size               = 64;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 2048;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x3f80;
    ;
;

#------------------------------------------------------------
# ATtiny204
#------------------------------------------------------------

part parent ".avr8x_tiny" # t204
    desc                   = "ATtiny204";
    id                     = "t204";
    variants               =
        "ATtiny204-SSF:  SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny204-SSFR: SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny204-SSN:  SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny204-SSNR: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 281;
    n_interrupts           = 26;
    signature              = 0x1e 0x91 0x22;

    memory "eeprom"
        size               = 64;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 2048;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x3f80;
    ;
;

#------------------------------------------------------------
# ATtiny402
#------------------------------------------------------------

part parent ".avr8x_tiny" # t402
    desc                   = "ATtiny402";
    id                     = "t402";
    variants               =
        "ATtiny402-SSF:  SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny402-SSFR: SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny402-SSN:  SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny402-SSNR: SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 284;
    n_interrupts           = 26;
    signature              = 0x1e 0x92 0x27;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x3f00;
    ;
;

#------------------------------------------------------------
# ATtiny404
#------------------------------------------------------------

part parent ".avr8x_tiny" # t404
    desc                   = "ATtiny404";
    id                     = "t404";
    variants               =
        "ATtiny404-SSF:  SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny404-SSFR: SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny404-SSN:  SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny404-SSNR: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 285;
    n_interrupts           = 26;
    signature              = 0x1e 0x92 0x26;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x3f00;
    ;
;

#------------------------------------------------------------
# ATtiny406
#------------------------------------------------------------

part parent ".avr8x_tiny" # t406
    desc                   = "ATtiny406";
    id                     = "t406";
    variants               =
        "ATtiny406-MFR: VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny406-MNR: VQFN20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny406-SF:  SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny406-SFR: SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny406-SN:  SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny406-SNR: SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 286;
    n_interrupts           = 26;
    signature              = 0x1e 0x92 0x25;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x3f00;
    ;
;

#------------------------------------------------------------
# ATtiny804
#------------------------------------------------------------

part parent ".avr8x_tiny" # t804
    desc                   = "ATtiny804";
    id                     = "t804";
    variants               =
        "ATtiny804-SSF:  SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny804-SSFR: SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny804-SSN:  SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny804-SSNR: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 295;
    n_interrupts           = 31;
    signature              = 0x1e 0x93 0x25;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny806
#------------------------------------------------------------

part parent ".avr8x_tiny" # t806
    desc                   = "ATtiny806";
    id                     = "t806";
    variants               =
        "ATtiny806-MF:  VQFN20,     Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny806-MFR: QFN20,      Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny806-MN:  VQFN20,     Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny806-MNR: QFN20,      Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny806-SF:  SOIC20,     Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny806-SFR: SOIC300-20, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny806-SN:  SOIC20,     Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny806-SNR: SOIC300-20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 296;
    n_interrupts           = 31;
    signature              = 0x1e 0x93 0x24;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny807
#------------------------------------------------------------

part parent ".avr8x_tiny" # t807
    desc                   = "ATtiny807";
    id                     = "t807";
    variants               =
        "ATtiny807-MF:  VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny807-MFR: VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny807-MN:  VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny807-MNR: VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny807-MRF: VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 297;
    n_interrupts           = 31;
    signature              = 0x1e 0x93 0x23;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny1604
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1604
    desc                   = "ATtiny1604";
    id                     = "t1604";
    variants               =
        "ATtiny1604-SSF:  SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1604-SSFR: SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1604-SSN:  SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1604-SSNR: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 304;
    n_interrupts           = 31;
    signature              = 0x1e 0x94 0x25;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATtiny1606
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1606
    desc                   = "ATtiny1606";
    id                     = "t1606";
    variants               =
        "ATtiny1606-MF:  VQFN20,     Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1606-MFR: VQFN20,     Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1606-MN:  VQFN20,     Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1606-MNR: VQFN20,     Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1606-SF:  SOIC20,     Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1606-SFR: SOIC300-20, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1606-SN:  SOIC20,     Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1606-SNR: SOIC300-20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 305;
    n_interrupts           = 31;
    signature              = 0x1e 0x94 0x24;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATtiny1607
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1607
    desc                   = "ATtiny1607";
    id                     = "t1607";
    variants               =
        "ATtiny1607-MF:  VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1607-MFR: VQFN24, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1607-MN:  VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1607-MNR: VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1607-MRF: VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 306;
    n_interrupts           = 31;
    signature              = 0x1e 0x94 0x23;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATtiny212
#------------------------------------------------------------

part parent ".avr8x_tiny" # t212
    desc                   = "ATtiny212";
    id                     = "t212";
    variants               =
        "ATtiny212-SSF:  SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny212-SSFR: SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny212-SSN:  SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny212-SSNR: SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 282;
    n_interrupts           = 26;
    signature              = 0x1e 0x91 0x21;

    memory "eeprom"
        size               = 64;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 2048;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x3f80;
    ;
;

#------------------------------------------------------------
# ATtiny214
#------------------------------------------------------------

part parent ".avr8x_tiny" # t214
    desc                   = "ATtiny214";
    id                     = "t214";
    variants               =
        "ATtiny214-SSF:  SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny214-SSFR: SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny214-SSN:  SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny214-SSNR: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 283;
    n_interrupts           = 26;
    signature              = 0x1e 0x91 0x20;

    memory "eeprom"
        size               = 64;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 2048;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 128;
        offset             = 0x3f80;
    ;
;

#------------------------------------------------------------
# ATtiny412
#------------------------------------------------------------

part parent ".avr8x_tiny" # t412
    desc                   = "ATtiny412";
    id                     = "t412";
    variants               =
        "ATtiny412-SSF:  SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny412-SSFR: SOIC8, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny412-SSN:  SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny412-SSNR: SOIC8, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 287;
    n_interrupts           = 26;
    signature              = 0x1e 0x92 0x23;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x3f00;
    ;
;

#------------------------------------------------------------
# ATtiny414
#------------------------------------------------------------

part parent ".avr8x_tiny" # t414
    desc                   = "ATtiny414";
    id                     = "t414";
    variants               =
        "ATtiny414-SSF:  SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny414-SSFR: SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny414-SSN:  SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny414-SSNR: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 288;
    n_interrupts           = 26;
    signature              = 0x1e 0x92 0x22;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x3f00;
    ;
;

#------------------------------------------------------------
# ATtiny416
#------------------------------------------------------------

part parent ".avr8x_tiny" # t416
    desc                   = "ATtiny416";
    id                     = "t416";
    variants               =
        "ATtiny416-MFR: VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny416-MNR: VQFN20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny416-SF:  SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny416-SFR: SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny416-SN:  SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny416-SNR: SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 289;
    n_interrupts           = 26;
    signature              = 0x1e 0x92 0x21;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x3f00;
    ;
;

#------------------------------------------------------------
# ATtiny416auto
#------------------------------------------------------------

part parent "t416" # t416auto
    desc                   = "ATtiny416auto";
    id                     = "t416auto";
    variants               =
        "ATtiny416-MBT: VQFN20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny416-MZT: VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]";
    mcuid                  = 290;
    signature              = 0x1e 0x92 0x28;
    factory_fcpu           = 16000000;

    memory "fuse2"
        initval            = 0x7d;
    ;
;

#------------------------------------------------------------
# ATtiny417
#------------------------------------------------------------

part parent ".avr8x_tiny" # t417
    desc                   = "ATtiny417";
    id                     = "t417";
    variants               =
        "ATtiny417-MF:  VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny417-MFR: QFN24,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny417-MN:  VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny417-MNR: QFN24,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 291;
    n_interrupts           = 26;
    signature              = 0x1e 0x92 0x20;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 256;
        offset             = 0x3f00;
    ;
;

#------------------------------------------------------------
# ATtiny814
#------------------------------------------------------------

part parent ".avr8x_tiny" # t814
    desc                   = "ATtiny814";
    id                     = "t814";
    variants               =
        "ATtiny814-SSF:    SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny814-SSFR:   SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny814-SSN:    SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny814-SSNR:   SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny814-SSNRES: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 298;
    n_interrupts           = 26;
    signature              = 0x1e 0x93 0x22;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny816
#------------------------------------------------------------

part parent ".avr8x_tiny" # t816
    desc                   = "ATtiny816";
    id                     = "t816";
    variants               =
        "ATtiny816-MF:    VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-MFR:   VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-MN:    VQFN20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-MNR:   VQFN20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-MNRES: VQFN20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-SF:    SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-SFR:   SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-SN:    SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny816-SNR:   SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 299;
    n_interrupts           = 26;
    signature              = 0x1e 0x93 0x21;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny817
#------------------------------------------------------------

part parent ".avr8x_tiny" # t817
    desc                   = "ATtiny817";
    id                     = "t817";
    variants               =
        "ATtiny817-MF:    VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny817-MFR:   VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny817-MN:    VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny817-MNR:   VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny817-MNRES: VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 300;
    n_interrupts           = 26;
    signature              = 0x1e 0x93 0x20;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny1614
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1614
    desc                   = "ATtiny1614";
    id                     = "t1614";
    variants               =
        "ATtiny1614-SSF:  SOIC14, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1614-SSFR: SOIC14, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1614-SSN:  SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1614-SSNR: SOIC14, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 307;
    n_interrupts           = 31;
    signature              = 0x1e 0x94 0x22;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATtiny1616
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1616
    desc                   = "ATtiny1616";
    id                     = "t1616";
    variants               =
        "ATtiny1616-MFR: QFN20,  Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1616-MNR: QFN20,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1616-SF:  SOIC20, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1616-SFR: SOIC20, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1616-SN:  SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1616-SNR: SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 308;
    n_interrupts           = 31;
    signature              = 0x1e 0x94 0x21;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATtiny1617
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1617
    desc                   = "ATtiny1617";
    id                     = "t1617";
    variants               =
        "ATtiny1617-MF:  VQFN24, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny1617-MFR: VQFN24, Fmax=16 MHz, T=[-40 C, 125 C], Vcc=[2.7 V, 5.5 V]",
        "ATtiny1617-MN:  QFN24,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1617-MNR: QFN24,  Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 309;
    n_interrupts           = 31;
    signature              = 0x1e 0x94 0x20;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATtiny3216
#------------------------------------------------------------

part parent ".avr8x_tiny" # t3216
    desc                   = "ATtiny3216";
    id                     = "t3216";
    variants               =
        "ATtiny3216-SF:  SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3216-SFR: SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3216-SN:  SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3216-SNR: SOIC20, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 314;
    n_interrupts           = 31;
    signature              = 0x1e 0x95 0x21;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 128;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse4"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1284;
        readsize           = 1;
    ;

    memory "tcd0cfg"
        alias "fuse4";
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "userrow"
        size               = 64;
        page_size          = 64;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATtiny3217
#------------------------------------------------------------

part parent "t3216" # t3217
    desc                   = "ATtiny3217";
    id                     = "t3217";
    variants               =
        "ATtiny3217-MF:  VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3217-MFR: VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3217-MN:  VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3217-MNR: VQFN24, Fmax=20 MHz, T=[-40 C, 105 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 315;
    signature              = 0x1e 0x95 0x22;
;

#------------------------------------------------------------
# ATtiny424
#------------------------------------------------------------

part parent ".avr8x_tiny" # t424
    desc                   = "ATtiny424";
    id                     = "t424";
    variants               =
        "ATtiny424:      SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-SSF:  SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-SSFR: SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-SSU:  SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-SSUR: SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-XF:   TSSOP14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-XFR:  TSSOP14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-XU:   TSSOP14, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny424-XUR:  TSSOP14, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 292;
    n_interrupts           = 30;
    signature              = 0x1e 0x92 0x2c;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny426
#------------------------------------------------------------

part parent ".avr8x_tiny" # t426
    desc                   = "ATtiny426";
    id                     = "t426";
    variants               =
        "ATtiny426:     VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-MF:  VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-MFR: VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-MU:  VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-MUR: VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-SF:  SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-SFR: SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-SU:  SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-SUR: SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-XF:  SSOP20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-XFR: SSOP20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-XU:  SSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny426-XUR: SSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 293;
    n_interrupts           = 30;
    signature              = 0x1e 0x92 0x2b;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny427
#------------------------------------------------------------

part parent ".avr8x_tiny" # t427
    desc                   = "ATtiny427";
    id                     = "t427";
    variants               =
        "ATtiny427:     VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny427-MF:  VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny427-MFR: VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny427-MU:  VQFN24, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny427-MUR: VQFN24, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 294;
    n_interrupts           = 30;
    signature              = 0x1e 0x92 0x2a;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 4096;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 512;
        offset             = 0x3e00;
    ;
;

#------------------------------------------------------------
# ATtiny824
#------------------------------------------------------------

part parent ".avr8x_tiny" # t824
    desc                   = "ATtiny824";
    id                     = "t824";
    variants               =
        "ATtiny824:      SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-SSF:  SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-SSFR: SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-SSU:  SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-SSUR: SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-XF:   TSSOP14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-XFR:  TSSOP14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-XU:   TSSOP14, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny824-XUR:  TSSOP14, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 301;
    n_interrupts           = 30;
    signature              = 0x1e 0x93 0x29;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATtiny826
#------------------------------------------------------------

part parent ".avr8x_tiny" # t826
    desc                   = "ATtiny826";
    id                     = "t826";
    variants               =
        "ATtiny826:     VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-MF:  VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-MFR: VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-MU:  VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-MUR: VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-SF:  SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-SFR: SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-SU:  SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-SUR: SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-XF:  SSOP20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-XFR: SSOP20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-XU:  SSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny826-XUR: SSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 302;
    n_interrupts           = 30;
    signature              = 0x1e 0x93 0x28;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATtiny827
#------------------------------------------------------------

part parent ".avr8x_tiny" # t827
    desc                   = "ATtiny827";
    id                     = "t827";
    variants               =
        "ATtiny827:     VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny827-MF:  VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny827-MFR: VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny827-MU:  VQFN24, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny827-MUR: VQFN24, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 303;
    n_interrupts           = 30;
    signature              = 0x1e 0x93 0x27;

    memory "eeprom"
        size               = 128;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATtiny1624
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1624
    desc                   = "ATtiny1624";
    id                     = "t1624";
    variants               =
        "ATtiny1624:      SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-SSF:  SOIC14,  Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-SSFR: SOIC14,  Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-SSU:  SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-SSUR: SOIC14,  Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-XF:   TSSOP14, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-XFR:  TSSOP14, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-XU:   TSSOP14, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1624-XUR:  TSSOP14, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 310;
    n_interrupts           = 30;
    signature              = 0x1e 0x94 0x2a;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATtiny1626
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1626
    desc                   = "ATtiny1626";
    id                     = "t1626";
    variants               =
        "ATtiny1626:     VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-MF:  VQFN20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-MFR: VQFN20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-MU:  VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-MUR: VQFN20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-SF:  SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-SFR: SOIC20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-SU:  SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-SUR: SOIC20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-XF:  SSOP20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-XFR: SSOP20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-XU:  SSOP20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1626-XUR: SSOP20, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 311;
    n_interrupts           = 30;
    signature              = 0x1e 0x94 0x29;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATtiny1627
#------------------------------------------------------------

part parent ".avr8x_tiny" # t1627
    desc                   = "ATtiny1627";
    id                     = "t1627";
    variants               =
        "ATtiny1627:     VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1627-MF:  VQFN24, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1627-MFR: VQFN24, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1627-MU:  VQFN24, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny1627-MUR: VQFN24, Fmax=20 MHz, T=[-40 C,   N/A], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 312;
    n_interrupts           = 30;
    signature              = 0x1e 0x94 0x28;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATtiny3224
#------------------------------------------------------------

part parent ".avr8x_tiny" # t3224
    desc                   = "ATtiny3224";
    id                     = "t3224";
    variants               =
        "ATtiny3224:      SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-SSF:  SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-SSFR: SOIC14,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-SSU:  SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-SSUR: SOIC14,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-XF:   TSSOP14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-XFR:  TSSOP14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-XU:   TSSOP14, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3224-XUR:  TSSOP14, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 316;
    n_interrupts           = 30;
    signature              = 0x1e 0x95 0x28;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 128;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 3072;
        offset             = 0x3400;
    ;
;

#------------------------------------------------------------
# ATtiny3226
#------------------------------------------------------------

part parent ".avr8x_tiny" # t3226
    desc                   = "ATtiny3226";
    id                     = "t3226";
    variants               =
        "ATtiny3226:     VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-MF:  VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-MFR: VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-MU:  VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-MUR: VQFN20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-SF:  SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-SFR: SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-SU:  SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-SUR: SOIC20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-XF:  SSOP20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-XFR: SSOP20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-XU:  SSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3226-XUR: SSOP20, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 317;
    n_interrupts           = 30;
    signature              = 0x1e 0x95 0x27;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 128;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 3072;
        offset             = 0x3400;
    ;
;

#------------------------------------------------------------
# ATtiny3227
#------------------------------------------------------------

part parent ".avr8x_tiny" # t3227
    desc                   = "ATtiny3227";
    id                     = "t3227";
    variants               =
        "ATtiny3227:     VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3227-MF:  VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3227-MFR: VQFN24, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3227-MU:  VQFN24, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATtiny3227-MUR: VQFN24, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 318;
    n_interrupts           = 30;
    signature              = 0x1e 0x95 0x26;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 128;
        offset             = 0x8000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xdd;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 3072;
        offset             = 0x3400;
    ;
;

#------------------------------------------------------------
# ATmega808
#------------------------------------------------------------

part parent ".avr8x_tiny" # m808
    desc                   = "ATmega808";
    id                     = "m808";
    variants               =
        "ATmega808-AF:  TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-AFR: TQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-AU:  TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-AUR: TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-MF:  VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-MFR: QFN32,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-MU:  VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-MUR: VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-XF:  SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-XFR: SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-XU:  SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega808-XUR: SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 319;
    n_interrupts           = 36;
    signature              = 0x1e 0x93 0x26;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xc9;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATmega809
#------------------------------------------------------------

part parent ".avr8x_tiny" # m809
    desc                   = "ATmega809";
    id                     = "m809";
    variants               =
        "ATmega809-AF:  TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega809-AFR: TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega809-AU:  TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega809-AUR: TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega809-MF:  VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega809-MFR: QFN48,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega809-MU:  VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega809-MUR: VQFN48, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 320;
    n_interrupts           = 40;
    signature              = 0x1e 0x93 0x2a;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xc9;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 1024;
        offset             = 0x3c00;
    ;
;

#------------------------------------------------------------
# ATmega1608
#------------------------------------------------------------

part parent ".avr8x_tiny" # m1608
    desc                   = "ATmega1608";
    id                     = "m1608";
    variants               =
        "ATmega1608-AF:  TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-AFR: TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-AU:  TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-AUR: TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-MF:  VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-MFR: VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-MU:  VQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-MUR: VQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-XF:  SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-XFR: SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-XU:  SSOP28, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1608-XUR: SSOP28, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 321;
    n_interrupts           = 36;
    signature              = 0x1e 0x94 0x27;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xc9;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATmega1609
#------------------------------------------------------------

part parent ".avr8x_tiny" # m1609
    desc                   = "ATmega1609";
    id                     = "m1609";
    variants               =
        "ATmega1609-AF:  TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1609-AFR: TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1609-AU:  TQFP48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1609-AUR: TQFP48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1609-MF:  VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1609-MFR: VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1609-MU:  VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega1609-MUR: VQFN48, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 322;
    n_interrupts           = 40;
    signature              = 0x1e 0x94 0x26;

    memory "eeprom"
        size               = 256;
        page_size          = 32;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "fuse5"
        bitmask            = 0xc9;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x3800;
    ;
;

#------------------------------------------------------------
# ATmega3208
#------------------------------------------------------------

part parent ".avr8x_mega" # m3208
    desc                   = "ATmega3208";
    id                     = "m3208";
    variants               =
        "ATmega3208-AF:  TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-AFR: TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-AU:  TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-AUR: TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-MF:  VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-MFR: VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-MU:  VQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-MUR: VQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-XF:  SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-XFR: SSOP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-XU:  SSOP28, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3208-XUR: SSOP28, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 323;
    n_interrupts           = 36;
    signature              = 0x1e 0x95 0x30;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 128;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "prodsig"
        size               = 128;
        page_size          = 128;
        readsize           = 128;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x3000;
    ;
;

#------------------------------------------------------------
# ATmega3209
#------------------------------------------------------------

part parent ".avr8x_mega" # m3209
    desc                   = "ATmega3209";
    id                     = "m3209";
    variants               =
        "ATmega3209-AF:  TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3209-AFR: TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3209-AU:  TQFP48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3209-AUR: TQFP48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3209-MF:  VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3209-MFR: VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3209-MU:  VQFN48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega3209-MUR: VQFN48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 324;
    n_interrupts           = 40;
    signature              = 0x1e 0x95 0x31;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 128;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "prodsig"
        size               = 128;
        page_size          = 128;
        readsize           = 128;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x3000;
    ;
;

#------------------------------------------------------------
# ATmega4808
#------------------------------------------------------------

part parent ".avr8x_mega" # m4808
    desc                   = "ATmega4808";
    id                     = "m4808";
    variants               =
        "ATmega4808-AF:  TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-AFR: TQFP32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-AU:  TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-AUR: TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-MF:  VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-MFR: VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-MU:  VQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-MUR: VQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-XF:  SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-XFR: SSOP28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-XU:  SSOP28, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4808-XUR: SSOP28, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]";
    mcuid                  = 325;
    n_interrupts           = 36;
    signature              = 0x1e 0x96 0x50;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0xc000;
        page_size          = 128;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "prodsig"
        size               = 128;
        page_size          = 128;
        readsize           = 128;
    ;

    memory "sram"
        size               = 6144;
        offset             = 0x2800;
    ;
;

#------------------------------------------------------------
# ATmega4809
#------------------------------------------------------------

part parent ".avr8x_mega" # m4809
    desc                   = "ATmega4809";
    id                     = "m4809";
    variants               =
        "ATmega4809-AF:  TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-AFR: TQFP48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-AU:  TQFP48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-AUR: TQFP48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-MF:  VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-MFR: VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-MU:  VQFN48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-MUR: VQFN48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "ATmega4809-PF:  PDIP40, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 326;
    n_interrupts           = 40;
    signature              = 0x1e 0x96 0x51;

    memory "eeprom"
        size               = 256;
        page_size          = 64;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0xc000;
        page_size          = 128;
        offset             = 0x4000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0xc5;
    ;

    memory "prodsig"
        size               = 128;
        page_size          = 128;
        readsize           = 128;
    ;

    memory "sram"
        size               = 6144;
        offset             = 0x2800;
    ;
;

#------------------------------------------------------------
# AVR-Dx family common values
#------------------------------------------------------------

part # .avrdx
    desc                   = "AVR-Dx family common values";
    id                     = ".avrdx";
    family_id              = "AVR    ";
    prog_modes             = PM_SPM | PM_UPDI;
    n_boot_sections        = 1;
    boot_section_size      = 512;
    # Dedicated UPDI pin, no HV
    hvupdi_variant         = 1;
    nvm_base               = 0x1000;
    ocd_base               = 0x0f80;
    syscfg_base            = 0x0f00;
    factory_fcpu           = 4000000;

    memory "fuses"
        size               = 16;
        offset             = 0x1050;
        readsize           = 1;
    ;

    memory "fuse0"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1050;
        readsize           = 1;
    ;

    memory "wdtcfg"
        alias "fuse0";
    ;

    memory "fuse1"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1051;
        readsize           = 1;
    ;

    memory "bodcfg"
        alias "fuse1";
    ;

    memory "fuse2"
        size               = 1;
        initval            = 0x00;
        bitmask            = 0x07;
        offset             = 0x1052;
        readsize           = 1;
    ;

    memory "osccfg"
        alias "fuse2";
    ;

    memory "fuse5"
        size               = 1;
        initval            = 0xc0;
        bitmask            = 0xed;
        offset             = 0x1055;
        readsize           = 1;
    ;

    memory "syscfg0"
        alias "fuse5";
    ;

    memory "fuse6"
        size               = 1;
        initval            = 0x08;
        bitmask            = 0x1f;
        offset             = 0x1056;
        readsize           = 1;
    ;

    memory "syscfg1"
        alias "fuse6";
    ;

    memory "fuse7"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1057;
        readsize           = 1;
    ;

    memory "codesize"
        alias "fuse7";
    ;

    memory "append"
        alias "fuse7";
    ;

    memory "fuse8"
        size               = 1;
        initval            = 0x00;
        offset             = 0x1058;
        readsize           = 1;
    ;

    memory "bootsize"
        alias "fuse8";
    ;

    memory "bootend"
        alias "fuse8";
    ;

    memory "lock"
        size               = 4;
        offset             = 0x1040;
        readsize           = 4;
    ;

    memory "prodsig"
        size               = 128;
        page_size          = 128;
        offset             = 0x1100;
        readsize           = 128;
    ;

    memory "sigrow"
        alias "prodsig";
    ;

    memory "signature"
        size               = 3;
        offset             = 0x1100;
        readsize           = 3;
    ;

    memory "tempsense"
        size               = 4;
        offset             = 0x1104;
        readsize           = 1;
    ;

    memory "sernum"
        size               = 16;
        offset             = 0x1110;
        readsize           = 1;
    ;

    memory "userrow"
        size               = 32;
        page_size          = 32;
        offset             = 0x1080;
        readsize           = 32;
    ;

    memory "usersig"
        alias "userrow";
    ;

    memory "io"
        size               = 4160;
        readsize           = 1;
    ;

    memory "sib"
        size               = 32;
        readsize           = 1;
    ;
;

#------------------------------------------------------------
# AVR32DA28
#------------------------------------------------------------

part parent ".avrdx" # avr32da28
    desc                   = "AVR32DA28";
    id                     = "avr32da28";
    variants               =
        "AVR32DA28:       SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28-E/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28-E/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28-E/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28T-E/SO: SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28T-E/SS: SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28T-I/SO: SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA28T-I/SS: SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 338;
    n_interrupts           = 41;
    signature              = 0x1e 0x95 0x34;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32DA32
#------------------------------------------------------------

part parent ".avrdx" # avr32da32
    desc                   = "AVR32DA32";
    id                     = "avr32da32";
    variants               =
        "AVR32DA32:        QFN32,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32-E/PT:   TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32-E/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32-I/PT:   TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32-I/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32T-E/PT:  TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32T-E/RXB: VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32T-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA32T-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 342;
    n_interrupts           = 44;
    signature              = 0x1e 0x95 0x33;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32DA48
#------------------------------------------------------------

part parent ".avrdx" # avr32da48
    desc                   = "AVR32DA48";
    id                     = "avr32da48";
    variants               =
        "AVR32DA48:        QFN48,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48-E/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48-E/PT:   TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48-I/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48-I/PT:   TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48T-E/6LX: VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48T-E/PT:  TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48T-I/6LX: VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DA48T-I/PT:  TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 346;
    n_interrupts           = 58;
    signature              = 0x1e 0x95 0x32;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR64DA28
#------------------------------------------------------------

part parent ".avrdx" # avr64da28
    desc                   = "AVR64DA28";
    id                     = "avr64da28";
    variants               =
        "AVR64DA28:       SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28-E/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28-E/SP:  SPDIP28, Fmax=N/A,    T=[N/A,     N/A], Vcc=[N/A,     N/A]",
        "AVR64DA28-E/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28T-E/SO: SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28T-E/SS: SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28T-I/SO: SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA28T-I/SS: SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 351;
    n_interrupts           = 41;
    signature              = 0x1e 0x96 0x15;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DA32
#------------------------------------------------------------

part parent ".avrdx" # avr64da32
    desc                   = "AVR64DA32";
    id                     = "avr64da32";
    variants               =
        "AVR64DA32:        QFN32,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32-E/PT:   TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32-E/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32-I/PT:   TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32-I/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32T-E/PT:  TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32T-E/RXB: VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32T-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA32T-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 355;
    n_interrupts           = 44;
    signature              = 0x1e 0x96 0x14;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DA48
#------------------------------------------------------------

part parent ".avrdx" # avr64da48
    desc                   = "AVR64DA48";
    id                     = "avr64da48";
    variants               =
        "AVR64DA48:        QFN48,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48-E/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48-E/PT:   TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48-I/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48-I/PT:   TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48T-E/6LX: VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48T-E/PT:  TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48T-I/6LX: VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA48T-I/PT:  TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 359;
    n_interrupts           = 58;
    signature              = 0x1e 0x96 0x13;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DA64
#------------------------------------------------------------

part parent ".avrdx" # avr64da64
    desc                   = "AVR64DA64";
    id                     = "avr64da64";
    variants               =
        "AVR64DA64:       QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64-E/MR:  QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64-E/PT:  TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64-I/MR:  QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64-I/PT:  TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64T-E/MR: QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64T-E/PT: TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64T-I/MR: QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DA64T-I/PT: TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 362;
    n_interrupts           = 64;
    signature              = 0x1e 0x96 0x12;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR128DA28
#------------------------------------------------------------

part parent ".avrdx" # avr128da28
    desc                   = "AVR128DA28";
    id                     = "avr128da28";
    variants               =
        "AVR128DA28:       SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28-E/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28-E/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28-E/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28T-E/SO: SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28T-E/SS: SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28T-I/SO: SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA28T-I/SS: SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 364;
    n_interrupts           = 41;
    signature              = 0x1e 0x97 0x0a;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR128DA32
#------------------------------------------------------------

part parent ".avrdx" # avr128da32
    desc                   = "AVR128DA32";
    id                     = "avr128da32";
    variants               =
        "AVR128DA32:        QFN32,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32-E/PT:   TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32-E/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32-I/PT:   TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32-I/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32T-E/PT:  TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32T-E/RXB: VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32T-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA32T-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 366;
    n_interrupts           = 44;
    signature              = 0x1e 0x97 0x09;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR128DA48
#------------------------------------------------------------

part parent ".avrdx" # avr128da48
    desc                   = "AVR128DA48";
    id                     = "avr128da48";
    variants               =
        "AVR128DA48:        QFN48,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48-E/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48-E/PT:   TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48-I/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48-I/PT:   TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48T-E/6LX: VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48T-E/PT:  TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48T-I/6LX: VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA48T-I/PT:  TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 368;
    n_interrupts           = 58;
    signature              = 0x1e 0x97 0x08;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR128DA64
#------------------------------------------------------------

part parent ".avrdx" # avr128da64
    desc                   = "AVR128DA64";
    id                     = "avr128da64";
    variants               =
        "AVR128DA64:       QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64-E/MR:  QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64-E/PT:  TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64-I/MR:  QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64-I/PT:  TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64T-E/MR: QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64T-E/PT: TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64T-I/MR: QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DA64T-I/PT: TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    family_id              = "    AVR";
    mcuid                  = 370;
    n_interrupts           = 64;
    signature              = 0x1e 0x97 0x07;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse6"
        initval            = 0x00;
        bitmask            = 0x07;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR32DB28
#------------------------------------------------------------

part parent ".avrdx" # avr32db28
    desc                   = "AVR32DB28";
    id                     = "avr32db28";
    variants               =
        "AVR32DB28:       SOIC28,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28-E/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28-E/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28-E/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28T-E/SO: SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28T-E/SS: SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28T-I/SO: SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB28T-I/SS: SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 339;
    n_interrupts           = 42;
    signature              = 0x1e 0x95 0x37;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32DB32
#------------------------------------------------------------

part parent ".avrdx" # avr32db32
    desc                   = "AVR32DB32";
    id                     = "avr32db32";
    variants               =
        "AVR32DB32:        QFN32,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32-E/PT:   TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32-E/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32-I/PT:   TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32-I/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32T-E/PT:  TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32T-E/RXB: VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32T-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB32T-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 343;
    n_interrupts           = 44;
    signature              = 0x1e 0x95 0x36;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32DB48
#------------------------------------------------------------

part parent ".avrdx" # avr32db48
    desc                   = "AVR32DB48";
    id                     = "avr32db48";
    variants               =
        "AVR32DB48:        QFN48,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48-E/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48-E/PT:   TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48-I/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48-I/PT:   TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48T-E/6LX: VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48T-E/PT:  TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48T-I/6LX: VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DB48T-I/PT:  TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 347;
    n_interrupts           = 61;
    signature              = 0x1e 0x95 0x35;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR64DB28
#------------------------------------------------------------

part parent ".avrdx" # avr64db28
    desc                   = "AVR64DB28";
    id                     = "avr64db28";
    variants               =
        "AVR64DB28:       SOIC28,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28-E/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28-E/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28-E/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28T-E/SO: SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28T-E/SS: SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28T-I/SO: SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB28T-I/SS: SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 352;
    n_interrupts           = 42;
    signature              = 0x1e 0x96 0x19;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DB32
#------------------------------------------------------------

part parent ".avrdx" # avr64db32
    desc                   = "AVR64DB32";
    id                     = "avr64db32";
    variants               =
        "AVR64DB32:        QFN32,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32-E/PT:   TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32-E/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32-I/PT:   TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32-I/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32T-E/PT:  TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32T-E/RXB: VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32T-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB32T-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 356;
    n_interrupts           = 44;
    signature              = 0x1e 0x96 0x18;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DB48
#------------------------------------------------------------

part parent ".avrdx" # avr64db48
    desc                   = "AVR64DB48";
    id                     = "avr64db48";
    variants               =
        "AVR64DB48:        QFN48,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48-E/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48-E/PT:   TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48-I/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48-I/PT:   TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48T-E/6LX: VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48T-E/PT:  TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48T-I/6LX: VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB48T-I/PT:  TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 360;
    n_interrupts           = 61;
    signature              = 0x1e 0x96 0x17;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DB64
#------------------------------------------------------------

part parent ".avrdx" # avr64db64
    desc                   = "AVR64DB64";
    id                     = "avr64db64";
    variants               =
        "AVR64DB64:       QFN64,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64-E/MR:  QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64-E/PT:  TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64-I/MR:  QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64-I/PT:  TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64T-E/MR: QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64T-E/PT: TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64T-I/MR: QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DB64T-I/PT: TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 363;
    n_interrupts           = 65;
    signature              = 0x1e 0x96 0x16;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR128DB28
#------------------------------------------------------------

part parent ".avrdx" # avr128db28
    desc                   = "AVR128DB28";
    id                     = "avr128db28";
    variants               =
        "AVR128DB28:       SOIC28,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28-E/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28-E/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28-E/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28T-E/SO: SOIC28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28T-E/SS: SSOP28,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28T-I/SO: SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB28T-I/SS: SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 365;
    n_interrupts           = 42;
    signature              = 0x1e 0x97 0x0e;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR128DB32
#------------------------------------------------------------

part parent ".avrdx" # avr128db32
    desc                   = "AVR128DB32";
    id                     = "avr128db32";
    variants               =
        "AVR128DB32:        QFN32,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32-E/PT:   TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32-E/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32-I/PT:   TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32-I/RXB:  VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32T-E/PT:  TQFP32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32T-E/RXB: VQFN32, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32T-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB32T-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 367;
    n_interrupts           = 44;
    signature              = 0x1e 0x97 0x0d;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR128DB48
#------------------------------------------------------------

part parent ".avrdx" # avr128db48
    desc                   = "AVR128DB48";
    id                     = "avr128db48";
    variants               =
        "AVR128DB48:        QFN48,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48-E/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48-E/PT:   TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48-I/6LX:  VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48-I/PT:   TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48T-E/6LX: VQFN48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48T-E/PT:  TQFP48, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48T-I/6LX: VQFN48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB48T-I/PT:  TQFP48, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 369;
    n_interrupts           = 61;
    signature              = 0x1e 0x97 0x0c;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR128DB64
#------------------------------------------------------------

part parent ".avrdx" # avr128db64
    desc                   = "AVR128DB64";
    id                     = "avr128db64";
    variants               =
        "AVR128DB64:       QFN64,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64-E/MR:  QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64-E/PT:  TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64-I/MR:  QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64-I/PT:  TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64T-E/MR: QFN64,  Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64T-E/PT: TQFP64, Fmax=24 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64T-I/MR: QFN64,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR128DB64T-I/PT: TQFP64, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 371;
    n_interrupts           = 65;
    signature              = 0x1e 0x97 0x0b;

    memory "eeprom"
        size               = 512;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x20000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 0x4000;
        offset             = 0x4000;
    ;
;

#------------------------------------------------------------
# AVR16DD14
#------------------------------------------------------------

part parent ".avrdx" # avr16dd14
    desc                   = "AVR16DD14";
    id                     = "avr16dd14";
    variants               =
        "AVR16DD14:      SOIC14, Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD14-I/SL: SOIC14, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 329;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x94 0x34;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR16DD20
#------------------------------------------------------------

part parent ".avrdx" # avr16dd20
    desc                   = "AVR16DD20";
    id                     = "avr16dd20";
    variants               =
        "AVR16DD20:       QFN20,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD20-I/REB: VQFN20, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD20-I/SO:  SOIC20, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 330;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x94 0x33;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR16DD28
#------------------------------------------------------------

part parent ".avrdx" # avr16dd28
    desc                   = "AVR16DD28";
    id                     = "avr16dd28";
    variants               =
        "AVR16DD28:       SOIC28,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD28-I/STX: N/A,     Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 331;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x94 0x32;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR16DD32
#------------------------------------------------------------

part parent ".avrdx" # avr16dd32
    desc                   = "AVR16DD32";
    id                     = "avr16dd32";
    variants               =
        "AVR16DD32:       QFN32,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD32-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16DD32-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 333;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x94 0x31;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR32DD14
#------------------------------------------------------------

part parent ".avrdx" # avr32dd14
    desc                   = "AVR32DD14";
    id                     = "avr32dd14";
    variants               =
        "AVR32DD14:      SOIC14, Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD14-I/SL: SOIC14, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 336;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x95 0x3b;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32DD20
#------------------------------------------------------------

part parent ".avrdx" # avr32dd20
    desc                   = "AVR32DD20";
    id                     = "avr32dd20";
    variants               =
        "AVR32DD20:       QFN20,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD20-I/REB: VQFN20, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD20-I/SO:  SOIC20, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 337;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x95 0x3a;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32DD28
#------------------------------------------------------------

part parent ".avrdx" # avr32dd28
    desc                   = "AVR32DD28";
    id                     = "avr32dd28";
    variants               =
        "AVR32DD28:       SOIC28,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD28-I/STX: N/A,     Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 340;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x95 0x39;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32DD32
#------------------------------------------------------------

part parent ".avrdx" # avr32dd32
    desc                   = "AVR32DD32";
    id                     = "avr32dd32";
    variants               =
        "AVR32DD32:       QFN32,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD32-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR32DD32-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 344;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x95 0x38;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR64DD14
#------------------------------------------------------------

part parent ".avrdx" # avr64dd14
    desc                   = "AVR64DD14";
    id                     = "avr64dd14";
    variants               =
        "AVR64DD14:      SOIC14, Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD14-I/SL: SOIC14, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 349;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x96 0x1d;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DD20
#------------------------------------------------------------

part parent ".avrdx" # avr64dd20
    desc                   = "AVR64DD20";
    id                     = "avr64dd20";
    variants               =
        "AVR64DD20:      QFN20,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD20-I/SO: SOIC20, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 350;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x96 0x1c;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DD28
#------------------------------------------------------------

part parent ".avrdx" # avr64dd28
    desc                   = "AVR64DD28";
    id                     = "avr64dd28";
    variants               =
        "AVR64DD28:       SOIC28,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD28-I/SO:  SOIC28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD28-I/SP:  SPDIP28, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD28-I/SS:  SSOP28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD28-I/STX: VQFN28,  Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 353;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x96 0x1b;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DD32
#------------------------------------------------------------

part parent ".avrdx" # avr64dd32
    desc                   = "AVR64DD32";
    id                     = "avr64dd32";
    variants               =
        "AVR64DD32:       QFN32,  Fmax=32 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD32-I/PT:  TQFP32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DD32-I/RXB: VQFN32, Fmax=24 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 357;
    n_interrupts           = 36;
    hvupdi_variant         = 2;
    signature              = 0x1e 0x96 0x1a;

    memory "eeprom"
        size               = 256;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 512;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 8192;
        offset             = 0x6000;
    ;
;

#------------------------------------------------------------
# AVR64DU28
#------------------------------------------------------------

part parent "avr64dd28" # avr64du28
    desc                   = "AVR64DU28";
    id                     = "avr64du28";
    variants               =
        "AVR64DU28-SSOP/SPDIP: DIP28, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64DU28-VQFN:       QFP28, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 384;
    n_interrupts           = 34;
    signature              = 0x1e 0x96 0x22;

    memory "fuse5"
        bitmask            = 0xfb;
    ;

    memory "fuse6"
        bitmask            = 0x0f;
    ;

    memory "fusea"
        size               = 2;
        initval            = 0x03;
        bitmask            = 0xfff3;
        offset             = 0x105a;
        readsize           = 1;
    ;

    memory "pdicfg"
        alias "fusea";
    ;

    memory "prodsig"
        offset             = 0x1080;
    ;

    memory "signature"
        offset             = 0x1080;
    ;

    memory "tempsense"
        offset             = 0x1084;
    ;

    memory "sernum"
        offset             = 0x1090;
    ;

    memory "bootrow"
        size               = 256;
        page_size          = 256;
        offset             = 0x1100;
        readsize           = 256;
    ;

    memory "userrow"
        size               = 512;
        page_size          = 512;
        offset             = 0x1200;
    ;
;

#------------------------------------------------------------
# AVR64DU32
#------------------------------------------------------------

part parent "avr64du28" # avr64du32
    desc                   = "AVR64DU32";
    id                     = "avr64du32";
    variants               =
        "AVR64DU32-VQFN/TQFP: QFP32, Fmax=32 MHz, T=[-40 C, 85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 385;
    signature              = 0x1e 0x96 0x21;
;

#------------------------------------------------------------
# AVR-Ex family common values
#------------------------------------------------------------

part parent ".avrdx" # .avrex
    desc                   = "AVR-Ex family common values";
    id                     = ".avrex";
    # Shared UPDI pin, HV on _RESET
    hvupdi_variant         = 2;
    factory_fcpu           = 20000000;

    memory "fuse2"
        bitmask            = 0x08;
    ;

    memory "fuse5"
        initval            = 0xd0;
        bitmask            = 0xf9;
    ;

    memory "fuse6"
        initval            = 0x07;
        bitmask            = 0x07;
    ;

    memory "userrow"
        size               = 64;
        page_size          = 64;
        readsize           = 64;
    ;
;

#------------------------------------------------------------
# AVR8EA28
#------------------------------------------------------------

part parent ".avrex" # avr8ea28
    desc                   = "AVR8EA28";
    id                     = "avr8ea28";
    mcuid                  = 327;
    signature              = 0x1e 0x93 0x2c;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse0"
        initval            = -1;
    ;

    memory "fuse1"
        initval            = -1;
    ;

    memory "fuse2"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse5"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse6"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse7"
        initval            = -1;
    ;

    memory "fuse8"
        initval            = -1;
    ;
;

#------------------------------------------------------------
# AVR8EA32
#------------------------------------------------------------

part parent ".avrex" # avr8ea32
    desc                   = "AVR8EA32";
    id                     = "avr8ea32";
    mcuid                  = 328;
    signature              = 0x1e 0x93 0x2b;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 8192;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fuse0"
        initval            = -1;
    ;

    memory "fuse1"
        initval            = -1;
    ;

    memory "fuse2"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse5"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse6"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "fuse7"
        initval            = -1;
    ;

    memory "fuse8"
        initval            = -1;
    ;
;

#------------------------------------------------------------
# AVR16EA28
#------------------------------------------------------------

part parent ".avrex" # avr16ea28
    desc                   = "AVR16EA28";
    id                     = "avr16ea28";
    variants               =
        "AVR16EA28: SOIC28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 332;
    n_interrupts           = 37;
    signature              = 0x1e 0x94 0x37;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR16EA32
#------------------------------------------------------------

part parent ".avrex" # avr16ea32
    desc                   = "AVR16EA32";
    id                     = "avr16ea32";
    variants               =
        "AVR16EA32: VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 334;
    n_interrupts           = 37;
    signature              = 0x1e 0x94 0x36;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR16EA48
#------------------------------------------------------------

part parent ".avrex" # avr16ea48
    desc                   = "AVR16EA48";
    id                     = "avr16ea48";
    variants               =
        "AVR16EA48: VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 335;
    n_interrupts           = 45;
    signature              = 0x1e 0x94 0x35;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR32EA28
#------------------------------------------------------------

part parent ".avrex" # avr32ea28
    desc                   = "AVR32EA28";
    id                     = "avr32ea28";
    variants               =
        "AVR32EA28: SOIC28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 341;
    n_interrupts           = 37;
    signature              = 0x1e 0x95 0x3e;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32EA32
#------------------------------------------------------------

part parent ".avrex" # avr32ea32
    desc                   = "AVR32EA32";
    id                     = "avr32ea32";
    variants               =
        "AVR32EA32: VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 345;
    n_interrupts           = 37;
    signature              = 0x1e 0x95 0x3d;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR32EA48
#------------------------------------------------------------

part parent ".avrex" # avr32ea48
    desc                   = "AVR32EA48";
    id                     = "avr32ea48";
    variants               =
        "AVR32EA48: VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 348;
    n_interrupts           = 45;
    signature              = 0x1e 0x95 0x3c;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x8000;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 4096;
        offset             = 0x7000;
    ;
;

#------------------------------------------------------------
# AVR64EA28
#------------------------------------------------------------

part parent ".avrex" # avr64ea28
    desc                   = "AVR64EA28";
    id                     = "avr64ea28";
    variants               =
        "AVR64EA28:      SOIC28,  Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64EA28-I/SP: SPDIP28, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64EA28-I/SS: SSOP28,  Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 354;
    n_interrupts           = 37;
    signature              = 0x1e 0x96 0x20;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 6144;
        offset             = 0x6800;
    ;
;

#------------------------------------------------------------
# AVR64EA32
#------------------------------------------------------------

part parent ".avrex" # avr64ea32
    desc                   = "AVR64EA32";
    id                     = "avr64ea32";
    variants               =
        "AVR64EA32:       VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64EA32-I/PT:  TQFP32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64EA32-I/RXB: VQFN32, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 358;
    n_interrupts           = 37;
    signature              = 0x1e 0x96 0x1f;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 6144;
        offset             = 0x6800;
    ;
;

#------------------------------------------------------------
# AVR64EA48
#------------------------------------------------------------

part parent ".avrex" # avr64ea48
    desc                   = "AVR64EA48";
    id                     = "avr64ea48";
    variants               =
        "AVR64EA48:       VQFN48, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64EA48-I/6LX: VQFN48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]",
        "AVR64EA48-I/PT:  TQFP48, Fmax=20 MHz, T=[-40 C,  85 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 361;
    n_interrupts           = 45;
    signature              = 0x1e 0x96 0x1e;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x10000;
        page_size          = 128;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "sram"
        size               = 6144;
        offset             = 0x6800;
    ;
;

#------------------------------------------------------------
# AVR16EB14
#------------------------------------------------------------

part parent ".avrex" # avr16eb14
    desc                   = "AVR16EB14";
    id                     = "avr16eb14";
    variants               =
        "AVR16EB14-SOIC/TSSOP: SOIC14, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 380;
    n_interrupts           = 31;
    signature              = 0x1e 0x94 0x49;

    memory "eeprom"
        size               = 512;
        page_size          = 8;
        offset             = 0x1400;
        readsize           = 256;
    ;

    memory "flash"
        size               = 0x4000;
        page_size          = 64;
        offset             = 0x800000;
        readsize           = 256;
    ;

    memory "fusea"
        size               = 2;
        initval            = 0x03;
        bitmask            = 0xfff3;
        offset             = 0x105a;
        readsize           = 1;
    ;

    memory "pdicfg"
        alias "fusea";
    ;

    memory "lock"
        initval            = 0x5cc5c55c;
    ;

    memory "prodsig"
        offset             = 0x1080;
    ;

    memory "signature"
        offset             = 0x1080;
    ;

    memory "tempsense"
        offset             = 0x1084;
    ;

    memory "sernum"
        offset             = 0x1090;
    ;

    memory "bootrow"
        size               = 64;
        page_size          = 64;
        offset             = 0x1100;
        readsize           = 256;
    ;

    memory "userrow"
        offset             = 0x1200;
    ;

    memory "sram"
        size               = 2048;
        offset             = 0x7800;
    ;
;

#------------------------------------------------------------
# AVR16EB20
#------------------------------------------------------------

part parent "avr16eb14" # avr16eb20
    desc                   = "AVR16EB20";
    id                     = "avr16eb20";
    variants               =
        "AVR16EB20-SSOP: SOIC20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16EB20-VQFN: VQFN20, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 381;
    signature              = 0x1e 0x94 0x40;
;

#------------------------------------------------------------
# AVR16EB28
#------------------------------------------------------------

part parent "avr16eb14" # avr16eb28
    desc                   = "AVR16EB28";
    id                     = "avr16eb28";
    variants               =
        "AVR16EB28-SSOP/SPDIP: SOIC28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]",
        "AVR16EB28-VQFN:       VQFN28, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 382;
    signature              = 0x1e 0x94 0x3f;
;

#------------------------------------------------------------
# AVR16EB32
#------------------------------------------------------------

part parent "avr16eb14" # avr16eb32
    desc                   = "AVR16EB32";
    id                     = "avr16eb32";
    variants               =
        "AVR16EB32-VQFN/TQFP: VQFN32, Fmax=20 MHz, T=[-40 C, 125 C], Vcc=[1.8 V, 5.5 V]";
    mcuid                  = 383;
    signature              = 0x1e 0x94 0x3e;
;

#------------------------------------------------------------
# Logic Green parts
#------------------------------------------------------------

part parent "m88" # lgt8f88p
    desc                   = "LGT8F88P";
    id                     = "lgt8f88p";
    mcuid                  = 227;
    signature              = 0x1e 0x93 0x0f;
    autobaud_sync          = 0x1c;

    memory "lfuse"
        initval            = -1;
    ;

    memory "hfuse"
        initval            = -1;
    ;

    memory "efuse"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "lock"
        initval            = -1;
        bitmask            = -1;
    ;
;

#------------------------------------------------------------
# LGT8F168P
#------------------------------------------------------------

part parent "m168" # lgt8f168p
    desc                   = "LGT8F168P";
    id                     = "lgt8f168p";
    mcuid                  = 228;
    signature              = 0x1e 0x94 0x0b;
    autobaud_sync          = 0x1c;

    memory "lfuse"
        initval            = -1;
    ;

    memory "hfuse"
        initval            = -1;
    ;

    memory "efuse"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "lock"
        initval            = -1;
        bitmask            = -1;
    ;
;

#------------------------------------------------------------
# LGT8F328P
#------------------------------------------------------------

part parent "m328" # lgt8f328p
    desc                   = "LGT8F328P";
    id                     = "lgt8f328p";
    mcuid                  = 229;
    signature              = 0x1e 0x95 0x0f;
    autobaud_sync          = 0x1c;

    memory "lfuse"
        initval            = -1;
    ;

    memory "hfuse"
        initval            = -1;
    ;

    memory "efuse"
        initval            = -1;
        bitmask            = -1;
    ;

    memory "lock"
        initval            = -1;
        bitmask            = -1;
    ;
;
