I remove the Attiny from Digispark board, and now trying to program the "bootloader", but getting err all time with Arduino IDE.NormanDunbar wrote: Tue Jun 03, 2025 6:52 am You can get the code off the chip fairly easily using AVRDude. Unless of course, the lock bits are configured, in which case no. The code that comes off will be a binary version of the C or C++ code that the source was written in, plus it will have been optimised for size by the compiler.
So, in case that now I program the HEX file with Avrdude, will it overwrite the EEPROM (so the "fuses") with the code into the HEX file?
It must, also I placed 220 Ohm resistor for protecting the IC (limit current). Actually 200 should be enough.NormanDunbar wrote: Tue Jun 03, 2025 6:52 am Somewhere on these forums is a post from me ages ago, discussing this noise generator and a version I wrote in assembly. Somewhere! I remember thinking that the speaker needed a resistor to limit current and blowing the chip.
I'm gonna post a video from 2 days ago playing with it (into DigiSpark board).
IMO, unless the HEX fuses the clock signal or something important for generating the sound (not only to use USB connection) the fuses doesn't do any relevant. In fact as you will see, the OSC shows the square with 256Khz aprox, exactly what expected to create the sound. Isn't it?
With bootloeader working, actually nothing special, but here we have a better sound with the resistor and capacitor
https://youtube.com/shorts/22SM0ZojidU
Without resistor to get the original signal by the schema (not a good idea, it must have a resistor to protect IC)
https://youtube.com/shorts/SHHEK0sO62M?feature=share
Testing 2 speakers
https://youtube.com/shorts/SOSniH_h5XE?feature=share
Trying to program from Linux with Arduino as ISP... getting error when burning "bootloader"
Code: Select all
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/home/popopo/.arduino15/packages/ATTinyCore/hardware/avr/1.5.2/avrdude.conf"
User configuration file is "/home/popopo/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : stk500v1
Overriding Baud Rate : 19200
Setting bit clk period : 5.0
AVR Part : ATtiny85
Chip Erase delay : 400000 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 12 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 12 32 0 yes 8192 64 128 30000 30000 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Failed chip erase: uploading error: exit status 1