On 21.02.23 19:19, Konrad Rosenbaum wrote:
> On 21/02/2023 11:59, [email protected] wrote:
> > Apropos the last two words above, I've had a bit of a google for a
> > windoze-free path to the programmed ATmega328 needed for an UPDI
> > interface, but haven't figured that out yet.
>
> Could you please clarify: is your goal to use an AtMega328 AS an
UPDI
> progger to program a DIFFERENT chip?

Yes, as stated. The UPDI programmer design I found needed an ATmega
for
USB to serial conversion and whatever. Seeing the simplicity of your
approach, I'll skip that greater labour.

Matt's solution seems similar, also on a custom PCB.

...

> If you need a cheap progger to program a true UPDI chip (eg.
0-series
> AtMegas, various modern AtTinies), simply do this:
>
> 1) Get a cheap USB-serial-TTL dongle from your online electronics
discounter
> of choice. The TTL part is important. (There are plenty of CP210x,
> FTsomething, and CH340 based designs out there. And they are really
cheap.)
>
> 2) Connect a 1kΩ resistor to the Tx pin of the dongle.
>
> 3) Connect the other side of the resistor and the Rx pin directly to
the
> UPDI pin of the target chip.
>
> 4) Use GND and Vcc(*) out directly to power the chip while
programming it.
>
> 5) Tell AVRdude to use a "serialupdi" progger (because that's what
you just
> hacked together).
>> (*) Many of those cheap dongles have a 5V and a 3.3V output, make
sure you
> use the same level as the Tx pin (it outputs high while idle, so
simply use
> a multimeter and compare). The chips are usually quite okay with
being
> powered with either voltage while being programmed.
>
> This "hack" is surprisingly reliable. I've been using it for quite a
while
> now and it never failed to program my chips. I even made myself a
> "professional" looking PCB that incorporates all of that using a
CH340N and
> a few simple SMD components.

Many thanks for cutting the Gordian knot. I've used the STK500 for
nigh on
quarter of a century, on a variety of ISP AVRs (mega & tiny), but UPDI
is new
territory, so an overly complex guide is not immediately spotted .

...

> The good news is: you can install arduino from its official download
> on Linux without contaminating other environments, it just sits in a
> separate directory and is quite happy there without installing stuff
> elsewhere. So cleaning it up is just deleting this arduino directory
> (and perhaps the "sketch" directory) from your home directory.

Hmmm ... dodged for the moment, but will doubtless crop up in the
future. After over 30 years of using the gnu toolchain on AVRs,
PowerPC,
NEC V850, etc., I'm not amenable to mucking up an established workflow
by cluttering my mind with a dinky IDE. (And if it has a GUI, forget
it. ;-)AIUI, arduino source is gcc/g++ compatible, so it's probably
just a
case of dropping it onto a concrete floor so the cruft falls off.

Thanks again. Things are so much easier once the fox is flushed out
into
the open.

Erik

-- 
*nix _is_ the IDE. (All you need is ctags and git or cvs.)

Reply via email to