AVR32EB28/AVR16EB28

April 14, 2026 ยท View on GitHub

Pin Mapping / Pinout

![EB28 Pin Mapping](AVRxxEB28.svg "Arduino Pin Mapping for AVR EB28") Image not available - absent help we do not foresee being able to provide any sort of pinout diagram for this or future parts

Features and Peripherals

FeatureAVR16EB28AVR32EB28
Flash Memory1638432768
Flash Memory (with Optiboot)1587232256
SRAM20484096
EEPROM512512
User Row6464
Boot Row (w/e that is)6464
Max. Frequency (rated, MHz)2020
Clock SourcesINT, EXTINT, EXT
Packages AvailableSOIC, TSSOPSOIC, TSSOP
Total pins on package2828
I/O Pins (not reset/UPDI)2222
Fully async pins2424
UPDI as I/O PinYesYes
PWM capable I/O pins2222
Max simultaneous PWM outputs88
16-bit Type A Timers - pins eaNoneNone
16-bit Type B Timers, (pins)2: 22: 2
12-bit Type D pinsNoneNone
16-bit Type E pins w/WEX1: 4/2/4/1/3/31: 4/2/4/1/3/3
8-bit PWM via 24bit TCF1: 2/21: 2/2
USART (pin mappings)1: 61: 6
SPI (pin mappings)1: 51: 5
TWI/I2C (pin mappings)1: 31: 3
12-bit ADC input pins2020
Of those, neg. diff. inputsallall
10-bit DACNoneNone
Analog Comparator (AC)22
Zero-Cross Detectors (ZCD)00
Custom Logic Blocks (LUTs)44
Event System channels (out pins)6: 36: 3
On-chip opamps (OPAMP)--
MVIO, pinsNoNo
Flash Endurance1,000 cycle1,000 cycle
LED_BUILTIN (and optiboot led)PIN_PD6PIN_PD6
  • Bootloader availability pending.
  • VQFN is 4mm x 4mm 0.4mm pitch.

AVR EB28 - A new generation of... timers

The EB-series is looking like a proofing ground for a pair of new timers and the crazy clock controller they bring along, plus, finally, a migration path for users of the venerable ATtiny861 for BLDC motor control applications. These new timers have some really impressive features - though sadly most get buried by the arduino API. Some of the features may get a stock wrapper library. On the higher pincounts, the lack of a second USART looks rather backward.

The CLKCTRL has a very fancy PLL by AVR standards - what its maximum speed will be is not now known to be 80 MHz rated, but this is a hell of a step up from 2x/3x/(secret)4x of the Dx - 1/2/4/6 input prescale, 8 or 16x multiplication then optionally a prescale by 2. And it can be used as the system clock. There's also something called "Prescaler B" which is /1 or /4, and prescales the CPU clock.

Breaking News - The 8k parts have withdrawn participation from EA and EB series. As the 8k EAs failed to show, it became one of the mysteries. 8k parts gone from a family where they don't belong? That makes total business sense, the EA never should have had an 8k version announced. But it did seem to all fit together into a coherent picture on the EB-series to have those three sizes. It was almost a tiny3, except with the pinmapping of non-tiny. On the plus side, the Dx/Ex/m0 mappings are very reasonable, and make a lot of shortcuts possible. On the other hand, strictly speaking, the tiny2's pinouts do a much better job of exposing peripheral functions. I have designs that use a 424 - the 424 is just a material vessal for the 4 CCLs and the central TCA that controls them (it uses 424. Every pin is used, 4 analog inputs, 4 CCL outputs, 1 input, and a timer to count pulses). We've reached out to the representatives of the 8k parts for comment, but have received no response.

Fully async pins

All pins on the EBs are "fully async" and can respond to events shorter than 1 clock cycle, and can wake the chip on RISING or FALLING edges, not just LOW_LEVEL and CHANGE, whether or not the I/O clock is running. There are good and bad sides to this. The good are obvious, the bad is reduced noise rejection if you're able to respond to such brief signals.

USART mux options

There is ONLY ONE USART on these things but damn does it have a lot of mux options...

USART0swapTXRXXDIRXCK
DEFAULT0PA0PA1PA2PA3
ALT11PA4PA5PA6PA7
ALT22PA2PA3--
ALT33PD4PD5PD6PD7
ALT44PC1PC2PC3-
ALT66PF7PF6--

SPI0 mux options

Lots of mux options here!

SPI0swapMOSIMISOSCKSS
DEFAULT0PA4PA5PA6PA7
ALT33PA0PA1PC0PC1
ALT44PD4PD5PD6PD7
ALT55PC0PC1PC2PC3
ALT66PC1PC2PC3PF7

TWI0 mux options

MappingswapMaster or SlaveDual Mode Slave
DEFAULT0SDA/PA2 SCL/PA3SDA/PC2 SCL/PC3
ALT11SDA/PA2 SCL/PA3Not avail.
ALT22SDA/PC2 SCL/PC3Not avail.
ALT33SDA/PA0 SCL/PA1SDA/PC2 SCL/PC3

PWM Pins

The AVR EB-series parts have 8 hardware PWM pins exposed on the 20-pin parts (2xTCF, 4xTCE, 2xTCB).

TCB PWM pins

TCBnDefaultAlt1
TCB0PA2-
TCB1PA3-

TCE+WEX

The TCE has 4 channels, and works much like TCA does on other parts, though it has some features that may be exposed by a future library.

The high half of the pins are not currently supported but will be soon; there is no split mode!

Mux optionWO0WO1WO2WO3WO4WO5WO6WO7Constant (recommended)Numeric value
TCE0_PORTAPA0PA1PA2PA3PA4PA5PA6PA7PORTMUX_TCE0_PORTA_gc0x00
TCE0_PORTCPC0PC1PC2PC3----PORTMUX_TCE0_PORTC_gc0x02
TCE0_PORTDPD0PD1PD2PD3PD4PD5PD6PD7PORTMUX_TCE0_PORTD_gc0x04
TCE0_PORTFPF0PF1------PORTMUX_TCE0_PORTF_gc0x06
TCE0_PORTC2PA0PA1PC0PC1PC2PC3--PORTMUX_TCE0_PORTC2_gc0x08
TCE0_PORTA2PA2PA3PA4PA5PA6PA7--PORTMUX_TCE0_PORTA2_gs0x09

You could get 4 PWM pins from TCE on PC0-3, PA0/1 and PC0/1, or PD4-7. DxCore sets all EB-series parts to use the PORTC mux option at startup. Changing it to whichever set of pins you want is trivial! The pins are always there, and are less thick with other functions than either PORTD or PORTA.

This analogWrite() on TCE pins is aware of PORTMUX, and so all that is needed to change the mapping is to write your preferred value to PORTMUX.TCE0ROUTEA; On the EBs there is nothing else in that register, so you can just use a plain write to set it.

analogWrite(PIN_PC1,128); //PWM seen, assuming default wasn't changed.
delay(2000);
digitalWrite(PIN_PC1,LOW); // Turn it off
delay(2000);
PORTMUX.TCEROUTEA = PORTMUX_TCE0_PORTA_gc
analogWrite(PIN_PC1,128);  // No PWM, pin is treated as if you called it on a normal digital pin.

TCF

TCF is a 24-bit asynchronous timer (can be clocked from the PLL, and the clock system we get is as baller as you can hope for with 16/20 fuse-selected base oscillator and no external crystal), running at up to 80 MHz. HOWEVER it's full glory is only applicable to pulses-at-a-frequency, frequency generation, and fixed duty cycle output. For proper PWM, it has to pull the same trick that TCB does, and it's 24-bit CMP register turns into a period register and two compare registers. But, you do get two PWM channels and an independent prescaler, at least.

Mux optionWO0WO1
DefaultPA0PA1
ALT1PA6PA7
ALT2--

TCF is PORTMUX aware

See the TCE/TCF/WEX reference for more information about PWM on the EB-series.

LED_BUILTIN

Thank god - we have a PA7 here!

To match other parts, PIN_PA7 shall be the pin that the core "expects" to be connected to an LED. If you want to have a different pin be recognized by the application (this does not change the bootloader - you would still need to do a custom build of that too), this can be overridden if a custom board definition is created by passing -DLED_BUILTIN=(some other pin) as part of build_extra_flags, building via the CLI, or by equivalent means provided by other third party development environments.

Official Documentation

When all else fails, read the real documentation. They keep moving the .pdf files around, so now I just link to the prduct page, from whence the datasheet, errata, and "technical briefs".

At a minimum, everyone using a modern AVR should plan on having a PDF viewer open with the datasheet, and a text editor with a good search function and the ioavr______.h file open so that when you're trying to use a constant, but the compiler says it isn't declared/defined, you can search the io header for a key phrase in the constant and figure out how it was spelled/formatted or copy/paste it to your sketch. (see the IO headers for more information and links to them. You'll want to be familiar with the most recent copy of the errata for the parts, also from the product page. Be sure to get the latest version of both documents: "Datasheet Clarifications" are removed from the errata + clarification document once the datasheet has been updated. Thus, if you're using an old version of the datasheet and a new version of the errata, you could be missing datasheet clarifications that have now been clarified in the datasheet proper.

Particularly on the latest parts - like this one - it may suffice to review the chart in sheets linked from the Errata guide. It certainly would be enough to give tou an idea that you need to look at the errata.

The "Technical Briefs" are somewhat inconsistent in their value, but some are quite good.