Go Down

Topic: Barebones board upload help needed (Read 639 times) previous topic - next topic

scottyjr

I made a barebones board using a Atmega 328P that I installed the bootloader on using the instructions on Nick Gammon's site. I tried this Atmega on an Arduino Uno and loaded an example sketch; it worked fine. With the Atmega back on the barebones board I'm having trouble loading a sketch; getting the error 'avrdude: stk500_getsync(): not in sync: resp=0x00'. I'm using an ftdi breakout board like thishttp://www.trossenrobotics.com/p/FTDI-Basic-Breakout-5V.aspx?feed=Froogle&gclid=CL-NupmvqrUCFUXf4Aod_B4AEQ. I have used this breakout successfully in a project that uses an Atmega 328 that I also loaded the bootloader on.

When the USB cable is plugged into my computer, Windows recognizes it as USB Serial Port(COM18) and the transmit and receive leds on the breakout briefly blink. When the upload is attempted, the the TX led on the FTDI breakout blinks 2 or 3 times. I've tried selecting various boards in the IDE and I've also tried adding 1k pullup resistors to the RX and TX pins of the Atmega and I've tried various methods of pressing the reset button on the barebones board. I've also tried switching the TX and RX pins on the barebones board. All the things I've tried were suggested by posters on various forums having the same problem.

Below are images of the barebones board and the schematic.

Any ideas of what else to try? Thanks - Scotty




retrolefty

Have you performed the basic loop-back test? This will prove out the USB serial comm path. Jumper arduino pins 0 and 1 (rec/tx) and wire a jumper from ground to reset pin. Open IDE, open serial monitor, anything you type in the transmit window and hit send should 'echo back' on the monitors receive window.

Lefty

Runaway Pancake

Just for the record
>> Tools
  >> Serial Port
    >> COM 18

? ?
"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

CrossRoads

Your layout does not appear to have anything connected to pins 5 & 6 where Rx & Tx are.
Is there a 2nd side to your board that is not shown?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

scottyjr

Hey Lefty. Did the loopback test. The characters received were the characters sent. However, I did not need to depress the reset for that to work.

Forgive me guys for neglecting to include the top layer of the board which is really only two jumper wires. One from pin 5(RX) of the FTDI to pin 3 of the Atmega and the other from pin 4(TX) of the FTDI to pin 2 of the Atmega.

And yes, the serial port selected in the IDE is COM18

- Scotty

retrolefty


Hey Lefty. Did the loopback test. The characters received were the characters sent. However, I did not need to depress the reset for that to work.

Applying the reset to the chip is just percaution in case the chip has a sketch running that might be using serial com and screw up the results of the test.

So that proves the USB serial link works. So that leave two other possibilities.

Something wrong with the DTR auto-reset signal or wiring. You can test that by doing a well timed manual reset when you try and upload. Press and hold reset down, then hit upload on the IDE and when you see the compiled sketch size printed on the IDE release the reset switch.

Another possibility is that you have the tx/rec signals from the USB serial converter and the 328p rec and tx pins crossed.

Lefty


Forgive me guys for neglecting to include the top layer of the board which is really only two jumper wires. One from pin 5(RX) of the FTDI to pin 3 of the Atmega and the other from pin 4(TX) of the FTDI to pin 2 of the Atmega.

And yes, the serial port selected in the IDE is COM18

- Scotty

scottyjr

This isn't making sense. Gotta be something stupid. Lefty, I did try the reset method with the TX/RX one way then the other. I removed the 1k pullups resistors on the TR & RX pins and tried all that stuff again. I inserted a known good Atmega 328 and still get the same message. Have to think of something else to try. Thanks All, for your input. - Scotty

scottyjr

And indeed it was something stupid. How come none of you guys told me I neglected to install the resonator? Sorry to waste your time. - Scotty

retrolefty


And indeed it was something stupid. How come none of you guys told me I neglected to install the resonator? Sorry to waste your time. - Scotty


Never a waste of time hearing of ultimate success. Did you really expect us to ask if you did something really dumb like forget to wire up the crystal? You would have been offended had you not, and probably wouldn't have admitted it if you did after being asked.  :D

Have fun with your barebones.

Lefty

Go Up