News for hackers. Stuff that matters.
Re:Emulator of Original Dell Charger Using ATTINY85 by bxparks on Thursday February 24, 2022 @11:09AM (#30456359)
The ATtiny85 is nice, with 8kB flash, 512 bytes RAM & EEPROM, 5-6 GPIO pins, they are just enough to do something interesting. But I don't use the ATtiny85 as much as I want to, because flashing requires a separate programmer hardware. It's enough friction to get in the way of rapid software iteration. I once made the mistake of inserting the ATtiny85 upside down into the programmer, and it promptly cooked it dead. Lesson learned.
Re:Emulator of Original Dell Charger Using ATTINY85 by MarioMan on Thursday February 24, 2022 @12:25PM (#30457551)
The Digispark[1] and its clones use the ATTINY85 and offer flashing over USB via the Micronucleus bootloader[2] using V-USB[3]. It comes at the cost of a significant chunk of flash storage, but the convenience is excellent. Plus, V-USB support means you can emulate all sorts of USB devices. I've used it to build a DIY NES controller adapter, but it's commonly used as a cheap Rubber Ducky[4]. For projects where USB interfacing makes sense, it can be a good fit.

1: http://digistump.com/products/1

2: https://github.com/micronucleus/micronucleus

3: https://www.obdev.at/products/vusb/index.html

4: https://shop.hak5.org/products/usb-rubber-ducky-deluxe

Re:Emulator of Original Dell Charger Using ATTINY85 by russdill on Thursday February 24, 2022 @11:43PM (#30463797)
In circuit programming is just such a huge step forward. You still need separate programming hardware, but you don't need to pop the chip out.

Beyond that, a few hundred bytes is usually enough for a simple bootloader. That tends to accelerate things even more. And writing bootloaders tends to be fun. I've done a tinyusb bootloader on an attiny45 with the user program sharing the v-usb stack in the bootloader and also a CEC bootloader. The CEC one of course took several minutes.

Re:Emulator of Original Dell Charger Using ATTINY85 by auxym on Thursday February 24, 2022 @11:22AM (#30456519)
All micros require separate hardware to flash it, no? Some is cheap (stlink), some are a few hundred dollars, but still.

Unless you have a USB bootloader programmed on the chip, but you still need the adapter to flash the bootloader in the first place.

Re:Emulator of Original Dell Charger Using ATTINY85 by jononor on Thursday February 24, 2022 @12:19PM (#30457459)
Not at all! Many devices can be flashed over USB, for example. Many STM32 devices come with a bootloader factory programmed in a read only area that implement USB DFU. Many user-provided software bootloaders can do the same on many other devices. Including the attiny85 using bit banging!

And of course with wireless enabled microcontrollers one can update over the air. Nordic NRF5x over Bluetooth for example, or ESP32 over WiFi.

Re:Emulator of Original Dell Charger Using ATTINY85 by duskwuff on Thursday February 24, 2022 @03:38PM (#30459957)
I think what the parent is getting at is that, because the ATtiny85 has so few pins, programming it usually requires it to be removed from the target circuit.
Re:Emulator of Original Dell Charger Using ATTINY85 by hwh on Thursday February 24, 2022 @11:31AM (#30456667)
An MCU is a chip in a package that just cannot interface with anything your consumer PC or notebook comes with. You'll need an adapter in any case.

That said, lots of current MCUs come with UART, I2C and/or USB bootloaders allowing to erase/program (if not disabled). This bootloader is typically included in factory ROM, not to be programmed by you or a third party.

Re:Emulator of Original Dell Charger Using ATTINY85 by sidewndr46 on Thursday February 24, 2022 @11:41AM (#30456819)
What? Why couldn't an MCU interface with my computer? It's not like it has special electrons or something in it. I regularly program atmega chips with a cable I made that plugs into the parallel port on the back of any computer that has one. If you have a couple GPIO pins on a motherboard, you can probably program almost any MCU with with it.

The only exception is if the motherboard GPIO was say 3.3v and you had a 1.8v only MCU, but level shifters aren't exactly expensive.

Re:Emulator of Original Dell Charger Using ATTINY85 by ticklemyelmo on Thursday February 24, 2022 @02:38PM (#30459214)
So do you jam the chip into the parallel port? Or do you...use an adapter?
Re:Emulator of Original Dell Charger Using ATTINY85 by selcuka on Thursday February 24, 2022 @06:47PM (#30461963)
I don't see the difference if it's just a parallel cable. Do you jam an STM32 into a USB port?
Re:Emulator of Original Dell Charger Using ATTINY85 by lmm on Thursday February 24, 2022 @11:35PM (#30463761)
> Do you jam an STM32 into a USB port?

I unplug my phone for a moment, or use one of several identical cables I have lying around. If this thing needs a dedicated cable then that seems just as annoying in practice as needing a dedicated "programmer" box.

Re:Emulator of Original Dell Charger Using ATTINY85 by danhor on Thursday February 24, 2022 @12:24PM (#30457528)
Another exception is the esp32-c3, which includes a jtag debugger inside the chip (not on board, inside the same die)
Re:Emulator of Original Dell Charger Using ATTINY85 by puzzlingcaptcha on Thursday February 24, 2022 @03:29PM (#30459849)
You can use Attiny412 with a simple USB-UART adapter for programming. Half the flash/SRAM but much more modern peripherals. $0.50 a piece, and unlike many other uCs recently tends to be in stock.