I have a ATmega328P-PU with Optiboot on the breadboard and a USB-TTL like the one from Sparkfun.
All i get is:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x41
DTR is connected with 100nF.
I used my Mega2560 and "Atmega fuse calculator" and the output is:
Atmega fuse calculator.
Written by Nick Gammon.
Version 1.10
Compiled on Dec 5 2015 at 08:20:21 with Arduino IDE 10606.
Attempting to enter programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768
LFuse = 0xFF
HFuse = 0xDE
EFuse = 0xFD
Lock byte = 0xFF
Clock calibration = 0x9A
External Reset Disable.................. [ ]
Debug Wire Enable....................... [ ]
Enable Serial (ICSP) Programming........ [X]
Watchdog Timer Always On................ [ ]
Preserve EEPROM through chip erase...... [ ]
Boot into bootloader.................... [X]
Divide clock by 8....................... [ ]
Clock output............................ [ ]
Bootloader size: 512 bytes.
Start-up time: SUT0: [ ] SUT1: [ ] (see datasheet)
Clock source: low-power crystal.
Brownout detection at: 2.7V.
Is this correct?
The ATmega came with the blink sketch preloaded and the LED is blinking.
If i try to upload a sketch the LED stops for a short time blinking so i guess reset works.
Driver on Win8.1 is VCP v2.12.10.
I'm lost
Yesterday i was playing around with drivers cause i thought maybe the problem is there
because i realized my Nano's also didn't work anymore.
After 3 month Windows 10 i went back to 8 and in the past there was a problem with
one of the Nano's and i had to use a different driver. But it seems like that now the
drivers are in the MS library cause i didn't had to use CH341SER or FTDI CDM and
the Nano's work.
I guess i need to write the seller. To me it seems like the USB-TTL is broken cause
i have more then one ATmega328P and it doesn't work on one of them.
Seems like my Nano's and 2560 Mega's need a brother called Uno so i can swap
chips for testing.
USB-TTL adapter is new and as it seems does not work and that is what i tried to figure out.
Circuit diagram for 3 connections (TX,RX,DTR)?
Which code? Where did i post code?
What i mainly wanted to know is if the fuses are correct.
MrGlasspoole:
USB-TTL adapter is new and as it seems does not work and that is what I tried to figure out.
OK, where did you get it from? Link to that site/ page so we have some idea what it actually is? Do you know how many different USB-TTL adapters there are floating about, some incorrectly labelled?
MrGlasspoole:
Circuit diagram for 3 connections (TX,RX,DTR)?
You said it was on a breadboard, so it has a circuit. And I do hope you do not actually mean only three connections.
MrGlasspoole:
Which code? Where did i post code?
You posted something that on second glance, looks like a diagnostic output. And it contains square brackets. Do you have any idea what BBScode does to such data?
MrGlasspoole:
What I mainly wanted to know is if the fuses are correct.
The fuses? How did you run the fuse calculator? You said it had Optiboot. If it did, the fuses would be burned to match, would they not? If you used the Mega 2560 as IDE, what happens when you program using it (as you do to burn the bootloader)?
I have seen some breadboard circuits illustrated with a spurious capacitor between reset and ground.
I uploaded the fuse calculator to my Mega 2560 and connected it to the 328 on the breadboard.
Paul__B:
You said it had Optiboot. If it did, the fuses would be burned to match, would they not?
I don't know if thats the case. I wrote the seller of the 328's that it is not working and he wrote me that he did not change the fuses but it's something i should check.
Paul__B:
If you used the Mega 2560 as IDE, what happens when you program using it (as you do to burn the bootloader)?
I did not burn them - they came with Optiboot on them.
So i can upload a sketch to the 328 on the breadboard through the Mega 2560?
That diagram is missing the important 100 nF bypass capacitors on each side of the chip, commonly mentioned here.
Also, a diode across the 10k reset pull-up is recommended.
MrGlasspoole:
Only difference is that I did not connect AREF.
Good. You are not supposed to. A bypass to ground is all that should be connected here.
MrGlasspoole:
As I wrote I'm using 100nF for DTR.
Correct. As long as no capacitor to ground.
MrGlasspoole:
I uploaded the fuse calculator to my Mega 2560 and connected it to the 328 on the breadboard.
I don't know if that's the case. I wrote the seller of the 328's that it is not working and he wrote me that he did not change the fuses but it's something i should check.
The "burn bootloader" function - presumably what he uses - should set them correctly.
MrGlasspoole:
I did not burn them - they came with Optiboot on them.
But you can perform the "burn bootloader" function yourself. If you download sketches using the Mega 2560 as ISP, you will have removed the bootloader and will need to replace it to download over the USB-TTL module.
MrGlasspoole:
So i can upload a sketch to the 328 on the breadboard through the Mega 2560?
Yes, same arrangement as Nick's fuse reader.
Do please correct the "quote" tags in your first post to "code" to make it legible. It really is important.
Yes i know its a cheap one but 5 more here and 5 more there and at the end you spend more than you want.
Paul__B:
That diagram is missing the important 100 nF bypass capacitors on each side of the chip
You mean decoupling on VCC and AVCC?
Sure i would do it on a PCB but in no minimum ATmega circuit you see them and all the breadbord tuts i saw don't have them.
Same with the diode on reset.
MrGlasspoole:
Yes I know its a cheap one but 5 more here and 5 more there and at the end you spend more than you want.
You pulling my leg, or you meant to say it's not a cheap one? Because it certainly is not.
MrGlasspoole:
You mean decoupling on VCC and AVCC?
Sure I would do it on a PCB but in no minimum ATmega circuit you see them and all the breadboard tuts I saw don't have them.
Which is to say (as Grumpy Mike would,) that all the breadboard tutes are actually rubbish.
MrGlasspoole:
For AREF I was reading this
So I did not connect it as some schematics do to 5V or ground.
Which capacitor to ground do you mean?
The AREF capacitor always goes to ground. But is only meaningful if you are using analogRead.
MrGlasspoole:
Loopback works and diode and 2 more decoupling capacitors make no difference.
Oh well. Not many problems left. Baudrate problem comes to mind - given that you are using a 16 MHz crystal, what board are you calling it in the IDE?