AVR128DA28 on a Uno sized board

I have been developing a AVR128DA28 based board,
Trying to keep the pin layout the same as a normal Uno R3.

I will probably use @DrAzzy core for the board and adapt it to suit.
End goal will to have a "more" compatible Uno R4(being an AVR) option.
What is everyone's thoughts/suggestions for the project.

Here is the schematic.

1 Like

Looks pretty good to me.
I've worked on similar and had "issues" deciding whether I would rather have a crystal, or lose a digital pin.

I'm not sure I'd dedicate a whole 6pin connector to UPDI. "Many" of the UPDI programmers (homemade, PicKit4/5, SNAP) don't come with a 6pin programming cable by default, anyway.

That was just because I read the document which advises a 6-pin 100 mil or 50-mil connector.

I think I might add the crystal support as "cuttable" traces on the board like the power selector.

What would you recommend, a 3pin connector or add RX/TX to the header?

What would you recommend, a 3pin connector or add RX/TX to the header?

I use this pinout when I design boards, but I happen to sell programmers at Tindie that are compatible with this pinout (MicroUPDI and SerialUPDI).
However, with this pinout, you can still use the Atmel ICE, JTAGICE3, and the Power Debugger without any modifications or adapters.

The PICkit4 or MPLAB SNAP uses a 1x8 header instead of the typical 2x3 header. However, they can also be used as USB to serial adapters while still being UPDI programmers. So with a simple adapter board, you can use the PICkit4/SNAP with this 2x3 pin UPDI pinout, where you can program and debug using the UPDI pin, and send data back and forth using UART.

On my DA-based board (which has not been fabbed or tested), I added a UPDI pin just below the SPI connector.
That way it only adds one new pin to the board, and there is still access to VCC and GND.
image

(Oh, and I got rid of AREF. It's seldom used, awkwardly placed, and rather obsolete given the greater set of internal references on a AVR-DA.)

BTW, it seems that the ATmega4809 and AVR128DA48 are pin-compatible. So if you use those, you get a pretty flexible board...

1 Like

This is what Microchip says about the design of a UPDI header: Atmel-ICE however, they naturally want it to be compatible with their programmer.

1 Like

The reason I never use Uno-shaped boards is that, in order to maintain compatibility with shields and code written for them, they have to assign pin numbers in ways that made sense on a 328p but make very little sense on a AVR Dx or later. The pins are always scrambled up as they have to be to work with the shields. And shields are expensive as hell and I can't afford that kinda thing. (How do you calculate the price of a shield? Find simple breakout module that does the same thing, and note the price it's selling for. Move the decimal one place to the right, and that's the price for the shield eyeroll)

This wasn't entirely constructive, but I do think it underscores the fact there may be less overlap between people who want uno-shaped things and people who want DA's. I don't know. My disdain for shields may be another way in which I'm a whackjob.

2 Likes

I actually don't buy shields, and only have two I made for a screen.

Agreed, but they would only really be scrambled on direct port manipulation(I may try to hide this in software or I may not).

1 Like

Nice board, I see you have the external crystal.
I may just follow your board layout for pins 8 & 9(chip pins 12&13), and provide the space and hardware for the crystal plus to solderable pads.

I was thinking of having the UPDI pin like you have demonstrated, but ended up buying the 50-mil header :neutral_face:.

That is clever, however this board is meant to be like the Uno so it may be better and simpler to use westfw's design.

Plus it will have a UART to USB chip on it.

A slight problem...Isn't AREF used so shields can see the AREF voltage or so people can measure it etc.?

Well here is my PCB layout, has a few options included.
I still need to add text to the board yet.


Sorry, Westfw it still has the 6-pin header for UPDI.

The board looks a little messy to sadly. :unamused:

The crystal is THT, as it will be a user option having it.

The crystal pins are also brought out in two smd pads on the board.

You can have AREF and assign one of the crystal pins to pin 8 via the solder jumper and solder pads on the top right of the board.

What would you change if you were designing it? :slightly_smiling_face:

If you power the CH340N chip from your target voltage select switch you can get it to output 3.3V level signals if you flip. I did this with the SerialUPDI programmer. The V3 pin is the output of the CH340N's internal 3.3V regulator and doesn't need to be connected to anything other than a capacitor

1 Like

Thanks for the advice....I should move to the CH340N chip.

I disconnected v3 and left it standalone in the revised schematic.
Do I need the rest of the circuitry in your schematic?

P.S. where is your ESD protection, not that it is commonly placed on such boards.

I think the CH340E and CH340N are equal in functionality, so I don't think it's necessary to switch to the CH340E unless you favor its SOIC-8 package.

If you add the analog switch as well (you can use 74lvc1g3157 chips instead if you need something smaller) you can use the CH340N chip as a SerialUPDI programmer that can automatically switch between UPDI and UART mode. I also added a switch (SW3) to override this behavior. The latest version of Avrdude lets you force the state of the DTR/RTS pin, which again controls the UART/UPDI mode switch.

You probably don't need the 74lvc1g125 buffer but I added it to provide a high-impedance RX input and a low-impedance driver for the RX LED.

DxCore is still using Avrdude 6.3, which doesn't even support SerialUPDI programmers. However, Spence himself has said that he will update to the latest version of Avrdude soon.

I'd argue that having a combined UART/UPDI adapter is brilliant when very little extra hardware is required. And as long as the user can override the setting, there are only benefits IMO.

As for the ESD protection, the CH340N datasheet doesn't mention external ESD protection, so I'll assume that the D+ and D- pins have built-in protection. I have yet to see one fail. However, I'd have to make the SerialUPDI PCB larger in order to fit a double ESD diode.