Pages: [1]   Go Down
Author Topic: Custom PCB with 5V, 16 MHz ATMega328P not uploading sketches  (Read 1875 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Did you include the auto-reset circuit?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6806
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6806
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: