Go Down

Topic: Custom PCB with 5V, 16 MHz ATMega328P not uploading sketches (Read 1 time) previous topic - next topic

Check12

I have a custom proto-type PCB with the FDTI usb/uart and an ATMega328P QFP
I have the AVR ISP programmer and can upload and verify hex files from AVR studio. The ATMega is running at 5V, 16Mhz I can not get the chip to respond to a sketch upload. I get the 'programmer not responding error'. How can I confirm that the bootloader code is running? On the PC5 pin I get a 2 second pulse. I overlooked putting an LED on that pin, Oops. The arduino bootloader does not report any errors when I select the "Arduino Pro or Mini w/ATMega328" Is there a simple serial 'AT' like command to send to the bootloader to confirm it is listening? I have good Tx pulses going to the Rx pin of the micro-controller, but no Tx coming from it. I does not seem to be responding to UART commands.

Coding Badly


Check12

Yes, via RTS with 100 ohm resistor. I have not checked this though, I will check it now.

Thanks

westfw

Quote
via RTS with 100 ohm resistor.

I think you need a capacitor.  The reset normally occurs as a result of level changes of the relevant pin that happen when the serial port is open()ed by the host operating system rather than by special code to toggle the pin and cause a reset.  If you don't have a cap, the level is likely to keep the AVR chip continuously RESET rather than letting the bootloader run.

Check12

I found my problem, at least one of them. I took a CP2103 USB UART dev board and swapped out the FTDI chip Tx and Rx lines. Then I uploaded my arduino app code via the ISP. Using the CP2103 my app was responding to commands just fine but not with the FTDI chip. I was worried about the footprint pads, and I see now that my worry was justified, darnit! Oh well thats what proto-types are for I guess. I am assuming that if I take an existing arduino board and use its USB-UART to connect to my board that the sketches will load. Thats my next task.

Thanks for your help.

Check12

Ha, You were right about the cap, now that I have my USB-UART working right I see that I need it. I am confused about this, the arduino 2009 schemo shows connections to both RTS and the cap, Do I need both or just one?

Coding Badly

On a breadboard ... DTR plus capacitor minus RTS under Windows ... worked well.  I believe the RTS connection is for software / operating systems that do not fiddle with DTR.  It's a plan B.

westfw

Quote
the arduino 2009 schemo shows connections to both RTS and the cap, Do I need both or just one?

Just the cap.  The resistor is "not populated" on the duemilanove...

Check12

Thanks everybody,

My four proto-pcbs are now up and running. I had pads on the USB-UART chip that were too short and not great for hand soldering. Anybody know, is it worth it to get one of those $200.00 reflow ovens from Hong Kong?

The auto-reset was also not right, thanks so much for the clue!

Cheers,

James Williams
http://sound-logic.com

Go Up