Ciao a tutti, mi chiamo Alex. Sono un appassionato di elettronica,campo in cui mi sono diplomato tardivamente, lavoro come tecnico informatico freelance.
Sono a chiederVi una dritta su come programmare dei ATMEGA328P-PU in modalità standalone con oscillatore interno 8Mhz.
Premetto che parecchi anni fa, quando sono venuto a conoscenza di questo fantastico controller mi sono innamorato...tanto da "sfornare" molte idee, anche programmando via ISP.
Dopo tanti anni, mi ci sono rimesso...ma ho perso parecchie "novità".
Parto dal presupposto che programmavo con un USBasp 6 Pin(penso sia un clone), che dovro; quasi sicuramente aggiornare, visto che avr me lo notifica nell'output .
Quindi sono tornato a programmare con un MEGA2560 come ISP, inoltre, dal forum(vi ringrazio ancora per questo) ho letto che ci sono nuovi sorgenti da applicare all IDE nella fattispecie MINICORE...
Quindi; installato MINICORE, impostato tutto il necessario per configurare il micro ricevente, ricontrollato le saldature e il cablaggio, condensatore su reset(RST-GND 10uf)e come ultima spiaggia impostati i fuse dal calcolatore su engbedded.com....niente.
Sono arrivato ad un punto che dall'output; che posto di seguito, si evince una corretta scrittura/rilettura, ma poi lo sketch BLINK non funge...tutto morto.
Warning: Board arduino:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
Lo sketch usa 1030 byte (3%) dello spazio disponibile per i programmi. Il massimo è 32768 byte.
Le variabili globali usano 9 byte (0%) di memoria dinamica, lasciando altri 2039 byte liberi per le variabili locali. Il massimo è 2048 byte.
C:\Users\alex\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\7.2-arduino.1/bin/avrdude -CC:\Users\alex\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1/avrdude.conf -v -patmega328p -cstk500v1 -PCOM3 -b19200 -Ueeprom:w:C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.eep:i -Uflash:w:C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.hex:i
avrdude: Version 7.2-arduino.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Users\alex\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.1\avrdude.conf
Using Port : COM3
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : possible i/o
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0x00 0x00
flash 65 10 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 1 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
avrdude: device signature = 0x1e950f (probably m328p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: processing -U eeprom:w:C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.eep:i
avrdude: reading input file C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.eep for eeprom
with 0 bytes in 0 sections within [0, -1]
using 0 pages and 0 pad bytes
avrdude: writing 0 bytes eeprom ...
Writing | ################################################## | 100% 0.00s
avrdude: 0 bytes of eeprom written
avrdude: verifying eeprom memory against C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.eep
Reading | ################################################## | 100% 0.00s
avrdude: 0 bytes of eeprom verified
avrdude: processing -U flash:w:C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.hex:i
avrdude: reading input file C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.hex for flash
with 1030 bytes in 1 section within [0, 0x405]
using 9 pages and 122 pad bytes
avrdude: writing 1030 bytes flash ...
Writing | ################################################## | 100% 1.36s
avrdude: 1030 bytes of flash written
avrdude: verifying flash memory against C:\Users\alex\AppData\Local\Temp\arduino_build_446377/Blink.ino.hex
Reading | ################################################## | 100% 0.71s
avrdude: 1030 bytes of flash verified
avrdude done. Thank you.
l'output di avr da cli:
C:\Users\alex\Downloads\avrdude-v7.3-windows-x64>avrdude -carduino_as_isp -Pcom3 -pm328p
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
avrdude done. Thank you.
C:\Users\alex\Downloads\avrdude-v7.3-windows-x64>avrdude -carduino_as_isp -Pcom3 -pm328p -U lfuse:w:0xe2:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
avrdude: processing -U lfuse:w:0xe2:m
avrdude: reading input file 0xe2 for lfuse
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lfuse ...
avrdude: 1 byte of lfuse written
avrdude: verifying lfuse memory against 0xe2
avrdude: 1 byte of lfuse verified
avrdude: processing -U hfuse:w:0xd9:m
avrdude: reading input file 0xd9 for hfuse
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte hfuse ...
avrdude: 1 byte of hfuse written
avrdude: verifying hfuse memory against 0xd9
avrdude: 1 byte of hfuse verified
avrdude: processing -U efuse:w:0xff:m
avrdude: reading input file 0xff for efuse
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte efuse ...
avrdude: 1 byte of efuse written
avrdude: verifying efuse memory against 0xff
avrdude: 1 byte of efuse verified
avrdude done. Thank you.
avr mi ringrazia in continuazione ma vorrei che il micro funzionasse... ![]()
Qualche idea che mi è sfuggita?



