#avr Logs

Feb 14 2020

#avr Calendar

06:27 AM Thrashbarg_ is now known as Thrashbarg
09:28 AM McDonaldsWiFi is now known as PublicWiFi
09:52 AM Raazeer: Hey all.
09:54 AM Raazeer: So, I have a problem. I'm trying to flash an atmega328, but whatever I do, I always get "Invalid device signature"
09:54 AM Raazeer: I've tried different programmers, different chips, different wiring, different commands...
09:55 AM Raazeer: What can I do to debug this issue?
10:35 AM Fuchikoma: How is the uC connected to the programming computer?
10:35 AM Fuchikoma: Also, is it an Arduino?
10:57 AM Raazeer: Fuchikoma, I tried an usbasp and an arduino configured as isp, both plugged into an usb2.0 port on my computer. The chip itself is not an arduino. I did however stick it into an arduino uno board to program it.
10:59 AM Raazeer: right now I'm in the process of cobbling together a breadboard programming circuit, although that is grasping at straws when the known good uno board would not do the trick.
11:02 AM Raazeer: that might be trickier than I thought, because I don't have the right quarz.
11:12 AM Fuchikoma: So you were able to put it into an Uno board and program it?
11:29 AM LeoNerd: Make sure to distinguish atmega328 from atmega328P
11:29 AM LeoNerd: They are different
11:44 AM Fuchikoma: That's a legit point too; different device signatures heh
12:23 PM polprog: Raazeer: what is the reportes signature?
12:30 PM Raazeer: polprog, the only one I've seen so far is plain 0
12:31 PM polprog: that means you have your wiring wrong or loose
12:34 PM Raazeer: polprog, Ok, if that's the only explanation, I'll try wiring it up again.
12:35 PM Raazeer: polprog, I've found very many different wiring diagrams online, can you give me one that is definitely correct, preferably for the usbasp
12:36 PM polprog: hmm
12:36 PM polprog: give me a sec
12:38 PM polprog: basically this is the usbasp pinout: https://www.avrfreaks.net/sites/default/files/f4.jpg
12:39 PM polprog: and this is the m328 pinout
12:39 PM polprog: https://starter-kit.nettigo.pl/wp-content/uploads/2018/04/Atmega328-pinout.png
12:39 PM polprog: m328 being the shorthand for atmega328, because thats the avrdude parameter name
12:40 PM polprog: and the corresponding pins on the usbasp go to the corresponding pins on the micro
12:40 PM polprog: so reset to reset, sck to sck, mosi to mosi, miso to miso, one of the grounds to ground and if you are *not* powering the micro externally then 5V from the programmer to 5V on the micro
12:42 PM Fuchikoma: also verify that your chip is the m328 and not m328p
12:42 PM LeoNerd: All AVR signatures are 3 bytes whose first byte is 1B
12:42 PM Raazeer: polprog, ok thanks. looks similar to what I used, but maybe the devil's in the detail.
12:42 PM LeoNerd: Second byte I believe relates to the memory size of the chip
12:42 PM Raazeer: Fuchikoma, it's actually an m328p, but I checked, I got that right in the avrdude command.
12:42 PM polprog: maybe its a bad connection somehwere, that is pretty cumbersome to diagnose
12:43 PM Fuchikoma: kk
12:43 PM Fuchikoma: That kind of mistake is so derpy and easy to make I'm glad LeoNerd mentioned it heh
12:43 PM Raazeer: polprog, I'll set it up, measure it all end to end, and if that doesn't do the trick, then I'll probably whidlarize the whole thing and start over.
12:43 PM polprog: haha
12:44 PM Raazeer: thanks a lot for the time being, I'll probably be back with more noob problems later :)
01:04 PM fengshaun_ is now known as fengshaun
02:15 PM mouseghost is now known as spambot
02:15 PM spambot is now known as mouseghost
07:06 PM aborazmeh_ is now known as aborazmeh
07:06 PM mkroman_ is now known as mkroman
11:52 PM day__ is now known as day