samostatný čip ATMega328P

Odpovědět
Maxim
Příspěvky: 128
Registrován: 22 led 2019, 20:32
Reputation: 0

Re: samostatný čip ATMega328P

Příspěvek od Maxim » 23 zář 2020, 11:53

ArduXPP píše:
23 zář 2020, 11:35
Já jsem si všiml, že máš USBasp, přes něj přes piny ISP - Obrázek , jde nahrát. Pak je programátor USBasp a kdyby to nefungovalo, tak ještě USBasp slow. Samotný USBasp se neukazuje, jen se přes něj nahrává kod "nahrát přes programátor", ale musíš nahrát zavaděč, "vypálit zavaděč". Za předpokladu, že jsi dobře nahrál ovladač.
tak toto mi taky nefunguje, pokud jsem pochopil správně připojení (foto v příloze)
to nastavení čipu v IDE mám tedy správně, jo?
Přílohy
IMG_20200923_115107[1].jpg
IMG_20200923_115031[1].jpg

ArduXPP
Příspěvky: 361
Registrován: 14 pro 2017, 19:31
Reputation: 0
Kontaktovat uživatele:

Re: samostatný čip ATMega328P

Příspěvek od ArduXPP » 23 zář 2020, 12:04

Ne, takle by to šlo, kdybys měl krystal, ale já myslel, že máš arduino uno s vyndavacím čipem, a to nemáš. Takže ne. A já myslel přehrát přes USBasp, a ty v ukázce máš přes arduino uno.

Maxim
Příspěvky: 128
Registrován: 22 led 2019, 20:32
Reputation: 0

Re: samostatný čip ATMega328P

Příspěvek od Maxim » 23 zář 2020, 12:10

ArduXPP píše:
23 zář 2020, 12:04
Ne, takle by to šlo, kdybys měl krystal, ale já myslel, že máš arduino uno s vyndavacím čipem, a to nemáš. Takže ne. A já myslel přehrát přes USBasp, a ty v ukázce máš přes arduino uno.
mám i arduino uno s vyndavacím čipem... myslel jsem, že tu těchto pinů to nemá vliv, které použiju....

A já myslel přehrát přes USBasp, a ty v ukázce máš přes arduino uno.
tímto myslíš nastavení programátoru? tam jsem teď měl USBasp i to slow jsem zkoušel....
ale krystal nemám zatím...

ArduXPP
Příspěvky: 361
Registrován: 14 pro 2017, 19:31
Reputation: 0
Kontaktovat uživatele:

Re: samostatný čip ATMega328P

Příspěvek od ArduXPP » 23 zář 2020, 13:18

Ty si ze mě děláš srandu :) - Obrázek

Maxim
Příspěvky: 128
Registrován: 22 led 2019, 20:32
Reputation: 0

Re: samostatný čip ATMega328P

Příspěvek od Maxim » 23 zář 2020, 13:29

jo takhle... přes programátor vypalovat bootloader na čip v UNO pomocí těch pinů ISP... to ještě zkusím

Maxim
Příspěvky: 128
Registrován: 22 led 2019, 20:32
Reputation: 0

Re: samostatný čip ATMega328P

Příspěvek od Maxim » 23 zář 2020, 18:45

tak mi to taky nefunguje...
hledal jsem i na netu a třeba podle tohoto článku jsem to zkoušel...
https://www.hackster.io/techmirtz/ardui ... 328-d4fcc4
bohužel bez úspěchu, tak ještě to zkusím s tím krystalem nebo jestli na to někdo používá nějaký ten přípravek?

Maxim
Příspěvky: 128
Registrován: 22 led 2019, 20:32
Reputation: 0

Re: samostatný čip ATMega328P

Příspěvek od Maxim » 23 zář 2020, 19:45

tady je výpis při vypalování toho bootloaderu... konečně to něco smysluplného vypsalo...
ty fuse jsou asi špatně takto, že??


avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/avrdude.conf"

Using Port : COM6
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
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 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 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 = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0b11111101"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0b11111101:
avrdude: load data efuse data from input file 0b11111101:
avrdude: input file 0b11111101 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0b11010110"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0b11010110:
avrdude: load data hfuse data from input file 0b11010110:
avrdude: input file 0b11010110 contains 1 bytes
avrdude: reading on-chip hfuse data:


avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/avrdude.conf"

Using Port : COM6
Using Programmer : stk500v1
Overriding Baud Rate : 19200
Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xe2"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xe2:
avrdude: load data lfuse data from input file 0xe2:
avrdude: input file 0xe2 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done. Thank you.

AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
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 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 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 = 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: reading input file "C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART1_38400_8000000L_B5.hex"
avrdude: can't open input file C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART1_38400_8000000L_B5.hex: No such file or directory
avrdude: read from file 'C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART1_38400_8000000L_B5.hex' failed

avrdude done. Thank you.

Chyba při vypalování zavaděče.

ArduXPP
Příspěvky: 361
Registrován: 14 pro 2017, 19:31
Reputation: 0
Kontaktovat uživatele:

Re: samostatný čip ATMega328P

Příspěvek od ArduXPP » 23 zář 2020, 20:02

Máš to asi chybně nastavené, UART1 je pro ATmega328pb, ty tam musíš mít UART0. Já ti tam nevidím co vše jsi nastavil.

Maxim
Příspěvky: 128
Registrován: 22 led 2019, 20:32
Reputation: 0

Re: samostatný čip ATMega328P

Příspěvek od Maxim » 23 zář 2020, 20:12

přenastavil jsem to na UART0 a vypadá to, že to je ok


edit: funguje to.. program nahrát, díky moc za rady... byl to boj


avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/avrdude.conf"

Using Port : COM6
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
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 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 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 = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0b11111101"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0b11111101:
avrdude: load data efuse data from input file 0b11111101:
avrdude: input file 0b11111101 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0b11010110"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0b11010110:
avrdude: load data hfuse data from input file 0b11010110:
avrdude: input file 0b11010110 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xe2"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xe2:
avrdude: load data lfuse data from input file 0xe2:
avrdude: input file 0xe2 contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done. Thank you.


avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/avrdude.conf"

Using Port : COM6
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
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 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 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 = 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: reading input file "C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex"
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
avrdude: load data flash data from input file C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
avrdude: input file C:\Users\Vojta\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.6/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% -0.00s

avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: reading input file "0x0f"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0f:
avrdude: load data lock data from input file 0x0f:
avrdude: input file 0x0f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done. Thank you.

Hanz
Příspěvky: 262
Registrován: 25 dub 2019, 23:52
Reputation: 0

Re: samostatný čip ATMega328P

Příspěvek od Hanz » 24 zář 2020, 22:27

gratuluju Maximovi, no nedalo mi to trochu přispět ;)
naprogramovaný bootloader přes Arduino Uno do ATmega328 a nahrátý sketch blink s výpisem na seriový monitor
tady je moje video https://www.youtube.com/watch?v=SX6wY52M3I8
podle návodu :
https://www.pcrevue.sk/a/IoT-prakticky- ... -v-Arduine

Odpovědět

Kdo je online

Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 4 hosti