I can get most of my electronics and software working fine and have tons of projects completed successfully by now, but I seem to be doing something fundamentally wrong when it comes to communicating with my pc with custom circuitry and I'm completely stuck and need help troubleshooting.
I have made a custom arduino clone on a solderable breadboard and just added a FT232RL serial to usb breakout board to it. I've plugged it RX to pin 2 (of the atmega), TX to pin 3, VCC to the regulated 5v, and ground to ground. Plugged the usb in to the PC, the PC detects it, I set the COM port.... But can't get the uploader to sync.
I put the atmega into a premade arduino clone, uploads fine.
Tried using both 3.3V and 5V and resetting at various intervals, still won't sync.
I had the exact same issue with a plain arduino on a breadboard using this setup. Absolutely refuses to sync.
A while back i also bought a bunch of plain atmegas, connected them using my arduino's and some added circuitry required for burning a bootloader, they seemingly successfully burned the bootloader, and yup, sure enough they too will never sync on upload.
As soon as I do any sort modification, it won't sync. Any ideas? What am I missing?
It NEVER works with custom stuff, only with my premade arduino uno boards.
My only idea at the moment (this is only me hypothesising, please don't get hung up on this if you have other ideas as this might be a red herring) is that there might be a grounding/static electricity issue that the premade boards have a precaution against. The wall sockets in this country are for the most part not grounded, which leads to static electricity issues. My PC case often is static, and I believe that also flows through to my usb ports. Is there anything I can add to my custom circuits to negate this?
Graylord:
I had the exact same issue with a plain arduino on a breadboard using this setup. Absolutely refuses to sync.
Unlike your pre-made Arduino clone, the breadboard circuit in that tutorial doesn't have an auto-reset circuit. The microcontroller must be reset at just the right time to activate the bootloader so you can upload. On a regular Arduino board that is done automatically by the auto-reset circuit. When you don't have an auto-reset circuit you need to manually reset the board just as the upload starts (after the compilation finishes. The auto-reset circuit is simply connecting the DTR pin on your FT232RL to the reset pin on the microcontroller via a 0.1 uF ceramic capacitor. A better breadboard tutorial is this one:
Fantastic! I will try that the first thing in the morning and get back to you, thanks!
I noticed another difference, the decoupling caps are hooked up in a different manner than a suggestion I followed. On my setup I have a decoupler from the input pins to the regulated 5v, and from the ground pins to the ground. I noticed that the setup you linked to put a single cap between ground and 5v pins directly. Simply put, their ground pins are hooked up to 5v through a cap and vice versa, mine are not.
Is my setup inferior and not optimally removing noise, or is that just a method to halve the amount of caps needed?
Alright! So I think we're a step in the right direction.
The arduino now resets when uploading through the DTR pin. (I also added the addional decouplers just in case while the board was unmounted)
Sadly I am I still not getting the programmer to sync. What would you suggest would be the next step to check?
EDIT: IT WORKS! I've probably gone through the setup at least a dozen times, but never realized you have to invert the RX and TX pins until the guide you posted earlier mentioned it. Man, something so simple, but so easy to miss because we just assume what the text says so often.