Can pulling up pins cause ATMEGA328 to not upload correctly?

Despite previous successes, upon redesigning a few elements of my PCBA, uploading via the FTDI breakout no longer works.

The only difference that affects any of the pins used for uploading is the 5V pin, the remaining pins are connected in the same way: RX, TX, DTR (Reset), GND.

The difference is that now, when I plug in the FTDI breakout, pins 4,5, & 6 are pulled up to a HIGH logic state. And pin 2 is pulled down to a LOW logic state. (see schematic)

Does having any of the digital pins 4,5, or 6 pulled up to a high logic state mean that I won't be able to upload my sketch to the board over FTDI?

The error I get is: `avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x30

I'm bootloading and uploading sketches via the MiniCore library at 2MHz internal.
`

If not, it's been a while since I've used the Sparkfun FTDI breakout board, so it could be faulty, as I haven't been very kind to it.

NOTE: I have taken particular care to wire up RX & TX correctly / reversed. So this won't be the problem.

Thanks for your help.

It should not matter, so something else is wrong.
Try a loopback test with the FTDI board, at least you will know if it is working or not.
Post your entire schematic, maybe someone will see something that you are not.

1 Like

Are you certain the bootloader was loaded successfully?
Did you upload a sketch via ISP after burning the bootloader?

I'll try the loopback test soon. I think I have a board that should work. I have updated my post to show my whole schematic.

I'm not sure how to be 100% certain, but I get a success note when burning the bootloader via MiniCore.

I haven't tried uploading sketches using Uno as ISP, do you have any documentation on this I could follow? I can't find the right information.

The main thing is NOT to upload a sketch via ISP after burning the bootloader, that will remove the bootloader.

Attach the ISP programmer the same as when burning the bootloader, then in the IDE select Sketch > Upload Using Programmer.

1 Like

Do you have the jumper on header H2?

1 Like

Missing a diode in your auto-reset circuit?
Shouldn't D7-10 have pullup resistors as shown in their evaluation module (page 3)?

1 Like

The jumper is disconnected, and the power is delivered through the 5V FTDI breakout pin. This is to prevent reverse polarity connection to the power regulator during bootloading/upload.

Interesting, I haven't come across this diode before. It didn't seem to matter on the previous board, but is something I could look into.

In regards to the Shift Registers, you seem to be correct! Although, it has been working fine with pull-down.

Importantly, I have done a loop-back test, and have determined that the FTDI Breakout board is working correctly. So it isn't this, or my process.

I got another board, of the new design. When uploading via FTDI breakout, this board uploaded sketches fine. I believe it could have been that the internal clock on the previous chip wasn't of sufficient tolerance?

That is very possible. I had similar problems when using the 8MHz internal. If I slowed the upload bitrate to 9600 it worked OK

1 Like

I was running the internal clock at only 2MHz, which I thought would be okay. But, perhaps not. 'Uploading using programmer' with Arduino as ISP seemed to work okay though on the board which didn't like the FTDI breakout method.

The solution:

  • Particular ATMEGA328 chip may have been too low tolerance on the internal clock to upload over FTDI Breakout.
  • Uploading with an Arduino Uno, utilising the MiniCore library, Arduino as ISP, and uploading using 'Upload using programmer' worked.

If you are going to upload using an ISP programmer, you can set minicore for no bootloader, burn bootloader to set the fuses, then you can use the entire flash memory for code.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.