I would like to replace my arduino with a atmega328p, so I bought some atmega328p's. As the chips came without bootloader, I had also ordered an AVR ISP shield ( https://www.diymore.cc/products/avr-isp-shield-burning-burn-bootloader-programmer-for-arduino-uno-r3?_pos=4&_sid=3050708e9&_ss=r).
I plugged the shield on my UNO R3 and uploaded the opensmart_isp on it. This went OK as I can see the heartbeat running on the shield.
But when I now try to send the code (I want to skip the bootloader as there is no need to reload other code to the 328p once the chip is mounted) I receive an error. I've also tried sending a bootloader, neither were successful. I've always received a: Yikes! invalid device signature.
My setting are:
Board: arduino Uno
Port: com 10 (which is correct)
Programmer: arduino as ISP
After trying with a second 328p and having the same result, I've activated the uploading details (from the preferences) and found out that the device signature is 0x000000. I've also noticed that the target voltage is 0.0v. Which probably means that the christal isn't getting power, so no clock, so no programming...
Do I have a broken shield or am I doing something wrong?
Is there someone who has experienced the same problem?
Can you help me?
Thanks
@pebke
Have you tried using the ArduinoISP in place of opensmart_isp ?
I had a psychic girlfriend but she left me before we met.
@pebke Since I have no idea what you are doing, this is a bit of a guess.
Everything is fine until a 'read' is issued and the result of that is not what was expected.
I suspect you have missed a step.
Have you checked Bill's video on the subject? at
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@will Yes, I've tried them both and they have both the hearbeat led blinking once uploaded.
@zander Yes, I've seen that video from Bill. It was this video that gave me the idea to start working with the 328p directly. As Bill mentioned that it wasn't a good idea to remove and put back the DIP's all the time I thought it would be easier to buy a AVR ISP with a ZIF socket. The card looked quite the same as Bill's breadboard (crystal, etc...). Now in the video, Bill starts with a 328p containing the boot part, which I don't have on mine, so that's why I tried to load the bootloader or the program directly.
The problem is that the oscillator is off, so it's like there isn't any contact between the programmer and the chip. But when I remove the chip I don't get a device signature of 0x000000 which obvious is the case when having a 328p in the ZIF.
@pebke Try this video. You do NOT need the shield, and you use the regular Arduino IDE. Also check out Ralph Bacon, he has 2 videos. I have not watched them recently but his stuff is generally good.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
@zander thanks, I'll check this out and I'll try it without the shield.
Hi everybody, thanks for all your suggestions, I got it finally working.
@Zander, things were working using the breadboard, what confirmed that I was doing the things right and the problem was with the shield. After some more debugging, I got confirmation that there were problems with the shield and a part of the circuit on the shield wasn't working. I've patched and now it's up and running.
So I now can either burn the bootloader or my program directly (without the bootloader) on any 328p.
Programming the 328p with the ZIF is such an easy process; I can recommend it to anyone who needs to program multiple chips.
@pebke Glad you got it working, now we know another way to do it at the extra cost of a shield but simpler?
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
It's so much easier with that ZIF and you don't need to build the circuit on the breadboard every time, I can recommend it to everybody and it costs less than 9$ at Amazon (in China you can even get it for half the price).
@pebke Maybe I am getting forgetful, but the version I am aware of has no 'circuit' unless you are changing clock freq.
As far as breadboard, for something like this if I was going to be doing a lot of them I would use the soldered breadboard and do it once.
Like I said this is another approach, but not the only one.
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
Hi everybody, thanks for all your suggestions, I got it finally working.
Good news !
I got confirmation that there were problems with the shield and a part of the circuit on the shield wasn't working. I've patched and now it's up and running.
Can you please tell us what the problem was and how you fixed it ?
I had a psychic girlfriend but she left me before we met.
I rewired the paths MISO and MOSI from the 6 pin connector to the ZIF (pins 17 and 18).
@pebke Ok, probably a normal breadboard issue. I think you are using one of these https://amz.run/7A6Q
Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting
I rewired the paths MISO and MOSI from the 6 pin connector to the ZIF (pins 17 and 18).
Thank you.
I had a psychic girlfriend but she left me before we met.