AtTiny85 with USB-socket driver install / uninstall - repeat

Hi everybody,
I have bought three little AtTiny modules that have an SMD AtTiny 85 a SMD 7805 voltage-regulator and some resistors and capacitors and two SMD-leds on it.

It habe a micro-USB-B socket.
If I connect the AtTiny85-board to my computer I hear this typical sound "USB device gets installed" and after some seconds the sound of "USB-device was unplugged"
though the AtTiny85 is still connected.

And this sequency of install sound / uninstall-sound repeats infinitely .

If I try to see what device gets installed in the device-manager the updating of the device-manager is too slow to follow-up the repeated seuqence of install / uninstall.

This happens with all three AtTiny85-boards
Does this mean they are all defect?
or do I have to install some special driver manually?

best regards Stefan

This is because the bootloader is only available for a short time.

When uploading for the 85 you will be presented with a message to attach the board.
It is at that time you connect it and the upload should go normally until completed.

Note you should use the BOARD MANAGER in the IDE to install the board cores for the 85.
There is a few you can chose from but I generally chose the DrAzzy ones OR use the ADDITIONAL URL in the IDE preferences to get them.

See Google for more info

@DrAzzy is the resident ATTINY expert

Maybe you have a Digispark ATtiny85 board?

Those are digispark clones./.

  1. Check if reset button (uif present) or briefly grounding their "reset" pin (PB5, whichever one they give highest number; Most clones leave reset enabled, that's a good thing for the future.

Anyweay, with the ATTiny85 w/Micronucles definition selected, compile, and hit upload, the firtst time it will just work. Once there is code on there you need to either plug and unplug it when the upload tool tells you to, or press reset at that timer (if reset isenabled - IME, it usually is enabled on clones, which makes it easier to update the bootloader. Likely the first time you upload you're going to br shockrf buy howe much less space the bootloader reports. The clone vendors are still using ancient incredibly bloated versions of the bootloader... .

Right now you have a bootloader but no app code. Sio bootlaoder is running briefly, decides it's not going to get anything uploaded, and then disconnects from USB and jumps to the application. But it's freshly bootloaded and there isn;t one, so it runs the bootloader, repeat until the user uploads something.

The board looks likes this

I have installed this additional board URL

http://drazzy.com/package_drazzy.com_index.json
Which then offers this boards to choose from

So which one should I choose?
best regards Stefan

Read please Connecting and Programming Your Digispark

I had this message once for connecting the board but nothing hapened.
Then I did something different with an Arduino Uno

Now - even after restarting the Arduino-IDE the IDE insists on using COM-port 5
Here is the compiler-messages

Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "ATtiny25/45/85 (No bootloader), Enabled, CPU (CPU frequency), ATtiny85, 8 MHz (internal), EEPROM retained, B.O.D. Disabled (saves power), Enabled"

F:\MyPortable-PRgs\arduino1.8.13\arduino-builder -dump-prefs -logger=machine -hardware F:\MyPortable-PRgs\arduino1.8.13\hardware -hardware F:\MyPortable-PRgs\arduino1.8.13\portable\packages -hardware F:\MyPortable-PRgs\arduino1.8.13\portable\sketchbook\hardware -tools F:\MyPortable-PRgs\arduino1.8.13\tools-builder -tools F:\MyPortable-PRgs\arduino1.8.13\hardware\tools\avr -tools F:\MyPortable-PRgs\arduino1.8.13\portable\packages -libraries F:\MyPortable-PRgs\arduino1.8.13\portable\sketchbook\libraries -fqbn=ATTinyCore:avr:attinyx5:LTO=enable,TimerClockSource=default,chip=85,clock=8internal,eesave=aenable,bod=disable,millis=enabled -ide-version=10813 -build-path C:\Users\dipl-\AppData\Local\Temp\arduino_build_99136 -warnings=all -build-cache C:\Users\dipl-\AppData\Local\Temp\arduino_cache_540927 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.micronucleus.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\ATTinyCore\tools\micronucleus\2.5-azd1b -prefs=runtime.tools.micronucleus-2.5-azd1b.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\ATTinyCore\tools\micronucleus\2.5-azd1b -verbose F:\MyPortable-PRgs\arduino1.8.13\portable\sketchbook\atTiny-Blinktest-001\atTiny-Blinktest-001.ino

F:\MyPortable-PRgs\arduino1.8.13\arduino-builder -compile -logger=machine -hardware F:\MyPortable-PRgs\arduino1.8.13\hardware -hardware F:\MyPortable-PRgs\arduino1.8.13\portable\packages -hardware F:\MyPortable-PRgs\arduino1.8.13\portable\sketchbook\hardware -tools F:\MyPortable-PRgs\arduino1.8.13\tools-builder -tools F:\MyPortable-PRgs\arduino1.8.13\hardware\tools\avr -tools F:\MyPortable-PRgs\arduino1.8.13\portable\packages -libraries F:\MyPortable-PRgs\arduino1.8.13\portable\sketchbook\libraries -fqbn=ATTinyCore:avr:attinyx5:LTO=enable,TimerClockSource=default,chip=85,clock=8internal,eesave=aenable,bod=disable,millis=enabled -ide-version=10813 -build-path C:\Users\dipl-\AppData\Local\Temp\arduino_build_99136 -warnings=all -build-cache C:\Users\dipl-\AppData\Local\Temp\arduino_cache_540927 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.micronucleus.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\ATTinyCore\tools\micronucleus\2.5-azd1b -prefs=runtime.tools.micronucleus-2.5-azd1b.path=F:\MyPortable-PRgs\arduino1.8.13\portable\packages\ATTinyCore\tools\micronucleus\2.5-azd1b -verbose F:\MyPortable-PRgs\arduino1.8.13\portable\sketchbook\atTiny-Blinktest-001\atTiny-Blinktest-001.ino

Using board 'attinyx5' from platform in folder: F:\MyPortable-PRgs\arduino1.8.13\portable\packages\ATTinyCore\hardware\avr\1.5.2

Using core 'tiny' from platform in folder: F:\MyPortable-PRgs\arduino1.8.13\portable\packages\ATTinyCore\hardware\avr\1.5.2

Detecting libraries used...

"F:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10813 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IF:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\ATTinyCore\\hardware\\avr\\1.5.2\\cores\\tiny" "-IF:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\ATTinyCore\\hardware\\avr\\1.5.2\\variants\\tinyX5" "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136\\sketch\\atTiny-Blinktest-001.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Generating function prototypes...

"F:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10813 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IF:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\ATTinyCore\\hardware\\avr\\1.5.2\\cores\\tiny" "-IF:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\ATTinyCore\\hardware\\avr\\1.5.2\\variants\\tinyX5" "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136\\sketch\\atTiny-Blinktest-001.ino.cpp" -o "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

"F:\\MyPortable-PRgs\\arduino1.8.13\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"F:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10813 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IF:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\ATTinyCore\\hardware\\avr\\1.5.2\\cores\\tiny" "-IF:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\ATTinyCore\\hardware\\avr\\1.5.2\\variants\\tinyX5" "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136\\sketch\\atTiny-Blinktest-001.ino.cpp" -o "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136\\sketch\\atTiny-Blinktest-001.ino.cpp.o"

Compiling libraries...

Compiling core...

Using precompiled core: C:\Users\dipl-\AppData\Local\Temp\arduino_cache_540927\core\core_237f55700ed2fe5518c25ed06c2a24d1.a

Linking everything together...

"F:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=attiny85 -o "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136/atTiny-Blinktest-001.ino.elf" "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136\\sketch\\atTiny-Blinktest-001.ino.cpp.o" "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136/..\\arduino_cache_540927\\core\\core_237f55700ed2fe5518c25ed06c2a24d1.a" "-LC:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136" -lm

"F:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136/atTiny-Blinktest-001.ino.elf" "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136/atTiny-Blinktest-001.ino.eep"

"F:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136/atTiny-Blinktest-001.ino.elf" "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136/atTiny-Blinktest-001.ino.hex"

"F:\\MyPortable-PRgs\\arduino1.8.13\\portable\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\dipl-\\AppData\\Local\\Temp\\arduino_build_99136/atTiny-Blinktest-001.ino.elf"

Sketch uses 664 bytes (8%) of program storage space. Maximum is 8192 bytes.

Global variables use 9 bytes (1%) of dynamic memory, leaving 503 bytes for local variables. Maximum is 512 bytes.

F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CF:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avrdude\6.3.0-arduino18/etc/avrdude.conf -v -pattiny85 -cstk500v2 -Pusb -Uflash:w:C:\Users\dipl-\AppData\Local\Temp\arduino_build_99136/atTiny-Blinktest-001.ino.hex:i 



avrdude: Version 6.3-20201216

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

An error occurred while uploading the sketch

         Copyright (c) 2007-2014 Joerg Wunsch



         System wide configuration file is "F:\MyPortable-PRgs\arduino1.8.13\portable\packages\arduino\tools\avrdude\6.3.0-arduino18/etc/avrdude.conf"



         Using Port                    : usb

         Using Programmer              : stk500v2

avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)


avrdude done.  Thank you.

and here is a screenshot of the status-line

It claims to have an ATtiny85 on COM5 which isn't present.
I'm using a "portable" installation
best regards Stefan

Digispark does not require a COM port at all, it works via USB.
First, install the drivers and set up the board manager. Choose your board.
The board must be disconnected first. Then
Hit the upload button. The bottom status box will now ask you to plug in your Digispark - at this point you need to plug it in

.

OK after installing the digistump board-URL
http://digistump.com/package_digistump_index.json

and installing the digistump Boards
I was able to upload the Blinkdemo

Thank you very much for guiding me to the right board-URL and board-package

What is a bit unconvenient is that You have to unplug/pliug the board each time you want to upload new code.
Does anybody know of a switch USB ON/OFF-device?

best regards Stefan

Digispark does not have a reset button like the Pro Mini or other boards. The only way to start the bootloader is to power up the board.

Maybe something like that MicroUSB Push On Off Power Switch Cable

The simplicity of the board does need you to plug/unplug.
AFAIK it uses the detect line on the USB so a simple power switch may not work for you.

Only used them in finished mode here.
Eg. final sketch before deployment for small neopixel projects etc.

The 85's are a little limited but excellent devices where a small footprint is needed.

ARGH ,missed a bunch in the middle of this thread,

Why did you switch to that instead of ATTiny85 (micronucleus/digispark) which will let you upload via USB like you serem to want to - did you not want to upload via USB?

I can see that I'd already responded to that effect earlier, but then you kept selecting the no bootrloader version? Why?

If you have the "no bootloader" definition selected, you're telling it that you have the programmer selected in tools -> programmer menu, and it's properly connected to it an ATTiny85, and if that programmer uses a COM port, it's on the port selected in tools -> port.

Did you try grounding the pin that is normally reset? On every clone ive used. reset is always left enabled. It's only the official ones that haven';t existed on the market for years that shipped with reset disabled.

For a Easy cure not to un-plug your AT85 is to use a Powered USB Hub with switches for each USB port. I find the port makes the programming more reliable also. Cuts down on wear and tear of your Computers ports also. A good protection for the CPU MB USB power supply and static protection.

Digispark Driver Update: I just tried to upload a ATTiny 85 sketch using the USB port on my Dell Laptop without the USB Powered hub. It WILL not work. For some reason the Laptop does not recognize the laptop's USB. it uploads the sketch just fine using the HUB. SO, if you are having problems then using a Powered Hub may be the answer. Attached is a sketch I wrote to use more memory than the simple Blink sketch as to check the AT85. Use it if you wish.TINY85_Blink_Blink_SOS.ino (6.4 KB)

This sort of thing is old news - VUSB (the bitbang USB implementation used by digispark et al) is not entirely compliant to the USB standard. It's close enough that it usually works, but not always: Particularly on USB 3.x ports (though some USB 2.x ports don't work, and the USB 3.x ports on my systems all work beautifully; Early USB 3.x of copurse was an absolute shitshow. I remember a desktop that could use USB 3 devices on USB 3 ports - anythign else would "the last device you connected has malfunctioned")/ Not even a mouse or keyboard! But they're way bnetter these days, heh. As noted though, since the digispark doesn't actually use USB. only pretends to, it's hard to hold that against the USB vendor. I have never understood why anyone would prefer prgrammionhg that way vs ISP, quite frankly))

I used the ATTINY 45/85 (OPTIBOOT) with success.