WARNING This document is based largely on speculation and the very limited public information about these parts.
![EB14 Pin Mapping](AVRxxEB14.svg "Arduino Pin Mapping for AVR EB14")
Image not available - absent help we do not foresee being able to provide any sort of pinout diagram for this or future parts
Feature | AVR16EB14 | AVR32EB14 |
---|---|---|
Flash Memory | 16384 | 32768 |
Flash Memory (with Optiboot) | 15872 | 32256 |
SRAM | 2048 | 4096 |
EEPROM | 512 | 512 |
User Row | 64 | 64 |
Boot Row (w/e that is) | 64 | 64 |
Max. Frequency (rated, MHz) | 20 | 20 |
Clock Sources | INT, EXT | INT, EXT |
Packages Available | SOIC, TSSOP | SOIC, TSSOP |
Total pins on package | 14 | 14 |
I/O Pins (not reset/UPDI) | 10 | 10 |
Fully async pins | 12 | 12 |
UPDI as I/O Pin | Yes | Yes |
PWM capable I/O pins | 6 | 6 |
Max simultaneous PWM outputs | 4 | 4 |
16-bit Type A Timers - pins ea | None | None |
16-bit Type B Timers, (pins) | 2: 0 | 2: 0 |
12-bit Type D pins | None | None |
16-bit Type E pins w/WEX | 1: 1/1/2/0/3 | 1: 1/1/2/0/3 |
8-bit PWM via 24bit TCF | 1: 2/2 | 1: 2/2 |
USART (pin mappings) | 1: 3/1 | 1: 3/1 |
SPI (pin mappings) | 1: 4 | 1: 4 |
TWI/I2C (pin mappings) | 1: 2 | 1: 2 |
12-bit ADC input pins | 8 | 8 |
Of those, neg. diff. inputs | all | all |
10-bit DAC | None | None |
Analog Comparator (AC) | 2 | 2 |
Zero-Cross Detectors (ZCD) | 0 | 0 |
Custom Logic Blocks (LUTs) | 4 | 4 |
Event System channels (out pins) | 6: 3 | 6: 3 |
On-chip opamps (OPAMP) | - | - |
MVIO, pins | No | No |
Flash Endurance | 1k | 1k |
LED_BUILTIN (and optiboot led) | PIN_PD6 | PIN_PD6 |
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. The 14-pin parts are cramped for pins pretty badly (but that's okay, because the series ranges up to 32 pins), even having gotten their PC0 back.
The CLKCTRL has a very fancy PLL by AVR standards - what its maximum speed will be is not yet known, 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 a clock not yet publicly disclosed.
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: Triggering from signals less than 1 clock long also means triggering from noise less than 1 clock long.
There is ONLY ONE USART on these damned things!
USART0: | swap | TX | RX | XDIR | XCK |
---|---|---|---|---|---|
DEFAULT | 0 | PA0 | PA1 | - | - |
ALT3 | 3 | PD4 | PD5 | PD6 | PD7 |
ALT4 | 4 | PC1 | PC2 | PC3 | - |
ALT5 | 6 | PF7 | PF6 | - | - |
SPI0 has FOUR mux options at just 14 pins!
SPI0 | swap | MOSI | MISO | SCK | SS |
---|---|---|---|---|---|
ALT4 | 3 | PA0 | PA1 | PC0 | PC1 |
ALT4 | 4 | PD4 | PD5 | PD6 | PD7 |
ALT5 | 5 | PC0 | PC1 | PC2 | PC3 |
ALT6 | 6 | PC1 | PC2 | PC3 | PF7 |
Note that this means that you want Wire.swap(2, or 3, but not 0 or 1). While swap level 0 is "implemented" in hardware it is not useful - you can do everything you could with swap 0 using swap 2 or swap3 3 and then some - and with binary size smaller than or equal to what can be achieved with swap 0. None of the pins used by swap 1 exist at all.
Mapping | swap | Master or Slave | Dual Mode Slave |
---|---|---|---|
ALT2 | 2 | SDA/PC2 SCL/PC3 | Not avail. |
ALT3 | 3 | SDA/PA0 SCL/PA1 | SDA/PC2 SCL/PC3 |
We know very little about these, but a surprising amount can be inferred.
No TCB output on pins is available here. None of the output pins exist.
The headers reveal a 4-channel, 16-bit timer with enough extra features to sink a battleship. However, split mode is not one of them: Half of the outputs can only be inverted channels. It can do some insane stuff though; it looks like there's a mode to denominate the compare values in quarters or eighths of a tick ("HIRES", pronounced hi-res, not hires)... and of course, there's WEX, which is too different from what we know to work backwards from the header to the behavior.
Mux option | WO0 | WO1 | WO2 | WO3 | WO4 | WO5 | WO6 | WO7 |
---|---|---|---|---|---|---|---|---|
TCE0_PORTA | PA0 | - | - | - | - | - | - | |
TCE0_PORTC | PC0 | PC2 | - | - | - | - | ||
TCE0_PORTD | - | - | - | - | PD4 | PD6 | ||
- | - | - | - | - | - | - | - | |
TCE0_PORTC2 | PA0 | PC0 | PC2 | - | - | |||
- | - | - | - | - | - | - | - |
TCE is planned to get PORTMUX awareness, default port will be PORTC2, as it gives you 3 PWM channels and the others give you 1 or 2 independent channels.... How to implement it will be rather tricky, though...... Note that we now have a 4-bit mux option register, and there are two whacko pinouts. I guess if the pin is even, and PORTMUX is equal tp the port, that's a for sure - but then there's PORTC2 and PORTA2. (and we don't get to use the table, because an array can only hold one value per index. We already have a mondo problemo with TCF and TCB0/1). Update: I think we are supposed to think of WO0 and WO1 as high and low side outputs, but it's also got a mechanism inside the WEX that will swap the output pins.
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 (no I don't know what it's fixed at. Update: WTF, 50%. Isn't that called frequency generation?). 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 option | WO0 | WO1 |
---|---|---|
Default | PA0 | PA1 |
- | - | |
- | - |
TCF will be portmux aware on other pincounts, but on 14-pin parts we'll skip that as there is only one mux option.
Note that maximizing the number of PWM pins does not get you many pwm pins here: There are two combos that get the maximum - TCE on PORTC2 (3 channels) and TCF on PA0/1 (1 channel, other pin goes to TCE), or TCF on PA0/1, and TCE on PORTD. Both get you 4 channels total!
It is not possible to match other parts; PIN_PA7
does not exist here. However unlike the quandry we found ourselves in on the DD, there is an opviously correct choice: PIN_PD6
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".
- AVR32EB14 product page not available
- AVR16EB14 product page not available
- AVR8EB14 product page not available
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. I also keep the AVR instruction set manual open in the PDF viewer as well as the silicon errata and datasheet clarification. Datasheet clarifications are a bigger deal than an erratum, usually. An erratum says "Okay, this doesn't work, but it will some day, maybe" while a datasheet clarification says "This would be an errata, but we're not even going to pretend that we'll fix it some day". But watch out - datasheet clarifications vanish from the list once the datasheet has been updated!
The "Technical Briefs" are somewhat inconsistent in their value, but some are quite good.
*
AVR pin drivers are are about as beefy as it gets on a microcontroller, especially on the modern AVRs: 50mA "absolute max" rating, 20mA clamp diode current, and the AVR DA-series datasheet has an output current graph where the X axis goes from 0mA to 100mA (sink) and -0mA to -50 mA (source) (raises some questions about that chart vis-a-vis the 50mA "absolute max" no?) If the pins were any stronger, if another IC thought the AVR was in power down sleep mode, and cracked a rude joke to a third device over the I2C bus they all shared, the offended AVR could could tear it's pins off the circuit board, march over to the offending chip, and beat the silicon out of it. So it's probably good that they're not any stronger ;-)
**
As you may have noticed, old parts are common in Arduino circles. More than anything else, I think the reason is that the hobby has a preponderance of retired engineers who have not been keeping up with the pace of recent progress. These need not be (and rarely are) old geezers with soldering irons. Hell, if they were a high achiever in the workplace and got promoted to management quickly, by the time they retired, their practical knowledge could already be 3 decades old. These people talk to other hobbyists on forums. In fact, the former managers, having spent the majority of their careers talking, may like the talking about building stuff better than the actual building stuff part. I don't know of any statistics on this, but I'll bet among "former electronics industry workers" who are involved with hobby electronics, there is a positive correlation between how far up the corporate ladder someone got while working, and the effort they go through to write tutorials and guides and other stuff trying to help "on-board" newbies to the hobby.
More pessimistically, I fear (though I wouldn't place a bet either way) that there is a negative correlation between that same workplace achievement during their career, and the usefulness and accuracy of such guides. There are a lot of really lousy Arduino guides, often written by people who supposedly spent their career in the industry as an engineer. That we're surrounded by electronics that mostly work suggests that the guide author who claims to have spent his career in industry while demonstrating he doesn't know how to design electronics did not spent most of that career doing design work and hadn't for decades. In which case, what else could he have been doing in the industry? He was a manager!
On the third hand, not all electronics were designed by competent people. I've taken apart a lot of electronics - and you ah, you see a very wide range of skill levels in evidence. Brilliant tricks, and godawful hacks. I've seen the simplest circuit boards imaginable listing Rev K or something like that. rows of SOT23 parts rotated 120 degrees cause they designed the board for the wrong pinout. I've seen computer motherboards with no less than a half dozen E. C. O's ("Engineering Change Order" - orders from engineering to production once the product is partly assembled to go fix the boards (which have already been loaded) - this usually manifests as thin wires routed around the surface of the board and soldered to pins on various parts). That was not a budget computer - it was worth it to E. C. O. the boards (a very expensive process, all manual) because the boards must have cost a fortune to make - it was incredibly thick, implying that it had a very large number of internal layers, and it was as big as the side of a house), and it was made in the early 2000's. Even if they hadn't soldered a few hundred dollars of components onto it by the time they realized the problem, the board itself may have been expensive enough to justify.