I am writing you because I have some problems to properly program a ATmega328P-pu with arduino code and ArduinoISP. I saw on the internet that there is a lot of problem with this microcontroller programming.
My Arduino board is an Arduino Uno Rev 3
In fact, I followed the tutorial on programming ATmega328P-pu:
I choose :
Board type : Arduino Duemilanove w/ ATmega328 (I use Arduino Uno too)
Serial Port : COM 3
Programmer : Arduino as ISP
In fact, burning bootloader seems to be ok.
However, when I want to upload blink sketch I get :
Upload Finished
avrdude: stk500_getsync(): not in sync: resp=0x00
In other hand , if I choose Board Type : Arduino BT W/ ATmega328
The sketch is correctly uploaded
However, the LED flashes every 10 seconds when it should flash every 1 second (delay(1000)).
Which board must I choose?
Is it a problem about bootloader?
Have you had a similar problem?
@benjamin66, I don't know, sounds like your fuses aren't getting set, if you are burning from the IDE they should be.
You could try Nick Gammon's bootload installer instead:
Microprocessors, then Program Bootloader
@canibalimao,
Do not connect the RESET pin on the CP2102, that is an input to the chip.
What you can do is add a jumper to bring the DTR signal thru a 0.1uF cap to the Reset pin on the Arduino board. Or press Reset on the board when the IDE shows "compiled xxx of 32xxx bytes". May need to have Verbose outputs checked under File:Preferences to see that. May take a couple of tries to get the timing right. The reset restarts the bootloader and makes it look for Serial data coming in to start the sketch download.
CrossRoads: @canibalimao,
Do not connect the RESET pin on the CP2102, that is an input to the chip.
What you can do is add a jumper to bring the DTR signal thru a 0.1uF cap to the Reset pin on the Arduino board. Or press Reset on the board when the IDE shows "compiled xxx of 32xxx bytes". May need to have Verbose outputs checked under File:Preferences to see that. May take a couple of tries to get the timing right. The reset restarts the bootloader and makes it look for Serial data coming in to start the sketch download.
I haven't connected the MCU to RESET pin. I soldered a jumper to DTR output and then connect that pin to pin1 on atmega. I believe that's not a problem with the USB converter...
I also tried to burn optiboot but the results are the same...
I am trying to follow Nick Gammon's topic however i don't understand during atmega_board_detector using where Board Detector Output should be displayed in this topic:
I'm not quite sure what you are saying, but the capacitor in series with the DTR line is a critical part of the Arduino design and present on all (current) boards.
It is there because when DTR becomes active (low), you want the MCU to be reset in order to start the bootloader, but not stay reset as it would in that state, do nothing at all.
When I first post my problem I haven't tested the DTR line with a capacitor. But it hanven't work even on my arduino board, so I assume that that time wasn't a problem with the reset. But now, using the CP2102 and the capacitor, it's working.
I didn't know that a simple capacitor could make such a big difference.
When I first post my problem I haven't tested the DTR line with a capacitor. But it hanven't work even on my arduino board, so I assume that that time wasn't a problem with the reset. But now, using the CP2102 and the capacitor, it's working.
I didn't know that a simple capacitor could make such a big difference.
A simple capacitor may seem to you as a non critical component, but it's how the cap is being used in a larger circuit that determines how critical it is to the function of a given specific circuit. This circuit (and capacitor) is critical if you wish to be able to automatically upload sketches from the arduino IDE. If you are OK with learning to time a manual reset switch correctly you can upload without a functioning arduino auto-reset circuit.
Lefty
When I first post my problem I haven't tested the DTR line with a capacitor. But it hanven't work even on my arduino board, so I assume that that time wasn't a problem with the reset. But now, using the CP2102 and the capacitor, it's working.
I didn't know that a simple capacitor could make such a big difference.
A simple capacitor may seem to you as a non critical component, but it's how the cap is being used in a larger circuit that determines how critical it is to the function of a given specific circuit. This circuit (and capacitor) is critical if you wish to be able to automatically upload sketches from the arduino IDE. If you are OK with learning to time a manual reset switch correctly you can upload without a functioning arduino auto-reset circuit.
Lefty
I know that capacitors can be a really usefull piece in a circuit, but I didn't know that it could be the case of this tinny tinny cap.
And by the way, the manual reset can be a really headache