Go Down

Topic: I can't upload any sketches on ATMega328 with Betmcu USB-232 converter (Read 1 time) previous topic - next topic

Hi everyone, I have a problem that needs someone help.
I bought some days ago two ATMega328-PU from an Ebay seller (GENUINE ATMEL ATmega 328 with one 16MHz Crystal and one 28 Pin DIL socket and two 22pf capacitors from tradeflair ) moved by high enthusiasm to start my first new project with Arduino.
To upload the AtMega I bought a USB to TTL Converter from BETEMCU with chipset CP2102: I installed the drivers from Silicon Labs (as recommended always from tradeflair). All OK. The COM port configured is the COM12 as I can see from the Arduino IDE 1.0.1; I chose the AtMega328 with bootloader for Duemilanove (as specify by tradeflair) and the COM12. I connected all the components (16 Mhz quartz on pins 9 and 10, the power supply from USB or ext as specify on the original electrical diagram of Arduino Duemilanove, Txd fron serial converter to pin 2 of AtMega328 and Rxd to pin 3

Attacment #1


but when I tried to upload a scketch as Blink led, there's an

error: avrdude stk500_getsync( ) : not in sync : resp=0X00

I tested to connect Rx and Tx as I found in an other ebay insertion (the serial converter is the one you can see in the photo):

attacment#2


In this way I could see the Rx on pin 2 ATMega328 formed by two trains of square wave of about 4 volts but the Tx signal stay on 5Volt fixed.
When I switch on the board the led on pin 13 blink on for 2 seconds and off for about 20seconds.

What I want to ask to someone who is able to help me is:
What I saw, means that the bootloader is been uploaded correctly by the seller?
The correct connection of the USART is the the first image or the second?
I haven't any other component connected to digital pins 0 and 1.
I tried to upload the bootloader with AVRIsp configured but the system send me the same error of not communication.
I tried with all two ATMega 328 I bought but nothing: the same results.
When I switch ON the board I saw that the quartz doesn't oscillate (the pins 9 and 10 stays low): is it correct during bootloader ? (Does the oscillator start after I uploaded the scketch?)
Thank you who will want to help me.
Bye.

Switch the Rx and Tx connections (Rx->Rx and Tx->Tx).  The "BAITE" board is silkscreened wrong.
http://www.spcomputing.com

Hi spcomputing, thank you for your reply. Surfing on the Web I've seen that the pins Rx and Tx on the USB-232 Converter are labeled as they must connect on the corresponding pins of the ATMega328, and I tried the modify.
But nothing to do.
What I can see is: on the Rx pin, testing with an oscillosope, there's a packet of sending data coming from the PC for two times after I launch the upload (after finished to compile the sketch). This two train of square wave are high about 3,5Volts; instead on the pin Tx of the ATMega there are 5 volts fixed (and then the IDE tell me that there isn't a sync on communications).
Another problem: on OSC pins 9 and 10 of ATMega328 during the bootloading there isn't any kind of oscillation at 16Mhz: is correct (because the chip during this phase is going with its internal oscillator?)?
Because if it isn't the two chips are burnt... correct?
I tested the USB-232 converter with a ping test and the Serial Monitor of IDE and it works well.
Thank you more

Try Nick's Atmega Fuse Calculator:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=11653

It is the same SPI hookup as the Arduino as ISP and it also has a 8MHz that comes out of D9 that you can plug into the Target XTAL1.  See where your fuse bits are set.

Adafruit has an improved ArduinoISP sketch that you can use with the same pin/D9 to XTAL1 to get your bootloader onto the Atmega using the Arduino IDE.
https://github.com/adafruit/ArduinoISP

After you are comfortably bootloaded, we'll check out the USB2UART again.
http://www.spcomputing.com

ilioSS

Hello, Mikelettrik,

I saw your post about the programming problem.
I am interested in the solution.
Your ping test is this the loop back test for the USB converter?
If you have some result please keep me infomed. I will do also.

succes to solve your problem.

Theo

ilioSS

Mikkletrik

I manage to have my USB converter and the mino pro working.
I connect as described by Crossroads.
Also I upgrade the USB driver.
Also I upgrade to UNO driver.

Theo

For ilioSS:
sorry but nowadays I haven't any good news about the possibilities to upload any sketch on my "built on my own" system. Yes the ping test it's to test if the USB-232 converter is working correctly (and mine is, because if you enable the Serial Monitor on IDE 1.0.1 and type on the keyboard, you can see what you write).
If you have a ATMega328 that work correctly could you test for me if, under bootloader conditions, the oscillator is working at 16Mhz? This if you have an oscilloscope..
Thanks

ilioSS

Hi, mikelettrik

As time go,s by it is already weeks ago I checked the forum.
Mean time I was succesful with my project.
But still it is not posible to load my pro-mini with the usb serial converter.(FTDI)
I bought a new usb serial converter with the chip similar as on the UNO. Therfore it start to work.( up-date the driver)
So still I must find out why the usb serial converter with the FTDI chip is not working.
As far as I under stand you will load a scetch from your PC direct in to a ATMEGA328 chip via usb serial.
I like to do that as well. Load a scetch in a bare chip.
So I will take a scope from my work and will test again the set-up.
As I was looking for the fault I saw some small solder in the SMD pins of the FTDI I removed with a needle but no succes.
Alouw me some time and I wil come back with the measurement.

regards,
Theo

Go Up