These days, I designed a pcb by using ATMEGA 328P(16mHz chip). When I loaded the Nick's bootloader, it was very strange that the 16mhz bootloader cannot work properly but 8 MHz could.
The whole story is:
First, I loaded the Nick's bootloader in an arduino nano and used it as programmer. Then in the serial monitor, I selected "16mHz" and burned the bootloader into my chip in pcb. However, when the burning finished, the program shows "no error found" but there is no LED blink (I added a LED in pin 13) on my board. So I tried to load basic "blink" code in example to see if the bootloader is burned correctly. Each time I click "upload", I got a "no response time out" through Arduino IDE.
((avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe6))
However, when I selected "8mHz" bootloader in Nick's bootloader, I got a "success" and LED fast blinking (500ms cycle I think?). And the "blink" code is no problem uploading although the blinking cycle is doubled.
I know the bootloader is fine since lots of people are using it. It must be my settings. I'm very new to the Arduino and hope learn something from this forum. This issue made me frustrated and I really hope someone can help me out.
These days, I designed a pcb by using ATMEGA 328P(16mHz chip). When I loaded the Nick's bootloader, it was very strange that the 16mhz bootloader cannot work properly but 8 MHz could. I know the bootloader is fine since lots of people are using it.
The whole story is:
First, I loaded the Nick's bootloader in an arduino nano and used it as programmer. Then in the serial monitor, I selected "16mHz" and burned the bootloader into my chip in pcb. However, when the burning finished, the program shows "no error found" but there is no LED blink (I added a LED in pin 13) on my board. So I tried to load basic "blink" code in example to see if the bootloader is burned correctly. Each time I click "upload", I got a "no response time out" through Arduino IDE.
((avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe6))
However, when I selected "8mHz" bootloader in Nick's bootloader, I got a "success" and LED fast blinking (500ms cycle I think?). And the "blink" code is no problem uploading although the blinking cycle is doubled.
I know the bootloader is fine since lots of people are using it. It must be my settings. I'm very new to the Arduino and hope learn something from this forum. This issue made me frustrated and I really hope someone can help me out.
Doesn't seem like you are getting the fuses set up and are running on the internal 8 MHz oscillator.
Do you have a 16 MHz crystal in your PCB? Please post your schematic.
Thanks for the reply. Sorry for the misleading. I use ATMEGA 328 (Arduino Nano) for learning Arduino. I thought the 16 mHz is pretty normal for this ATMEGA 328 chip. So I designed this PCB with 16 mhz crystal (I attached ebay link below).
Oh, and also, do you think it is because I use a 3.7v lipo for power?
m_k_akash:
I think there is some problem with the fuse settings. Using avrdude try to reconfigure it to use the external oscillator.
Hi m_k_akash
Thanks for your reply. I just followed the tutorial on Youtube about how to use Nick's bootloader for 8 mHz and 16mHz. That guy didn't make any change when upload the code so I didn't. But thank you, I will check the fuse settings right now and do some google searches to see how to set them up. Will get back soon!
Thank you so much, very appreciated for your help!!!
CrossRoads:
Doesn't seem like you are getting the fuses set up and are running on the internal 8 MHz oscillator.
Do you have a 16 MHz crystal in your PCB? Please post your schematic.
Hi CrossRoad,
Thanks for your reply. Yes, I have an external crystal with the ATMEGA 328 chip. But right now I'm thinking about maybe I used the wrong crystal.
This one is much different than the one I usually use, I just find this one is the only one available in the lab so I grabbed it without checking the datasheet. Also I posted the schematic in attachment.
And speaking of the crystal, I just realized, I use 3.7v lipo instead of the original 5V as power supply!! I will check the crystal and get back soon.
I'll check the crystal and at mean time, any thought is appreciated!!
Right now I'm using the usb as power supply so the power should be 5V. Unfortunately, the problem still there. I'll check the datasheet and get back soon
The bootloader runs AFAIK with the internal 8MHz RC oscillator, independent from external components. A 16MHz bootloader will only work on 5V systems with a 16MHz resonator/quartz, while the 8MHz versions runs everywhere.
Have you tried the "burn bootloader" option in the Arduino IDE ?
...R
PS ... I run all my standalone Atmega chips with the internal 8MHz clock so I don't have experience with running them at 16MHz. I like having a minimum of external components.
Got it. Sorry for duplicating the topic. I'm pretty new to the forum and just find out the right place for this topic after I made the first post. So I copy it one more time. If this makes someone uncomfortable, I'm truly sorry about that.