bitrux:
Also please avoid suggesting any ftdi type devices until there is no way left.
I'm going to do it anyway. These are widely available, cheap, and a very useful tool for anyone doing things such as you are doing. Perhaps you want to be able to get started with what you have on hand, but if you can afford it, I very much recommend that you order an FT232 or CH340 USB to serial adapter module now for your future needs. Last I checked, they were around $1 USD with free shipping from China on eBay. Buy a couple!
I do recommend you get one which uses the standard "FTDI header" pinout:
- DTR or RTS
- RX
- TX
- VCC
- CTS
- GND
That will allow you to plug the adapter right in to an Arduino Pro Mini, or many other boards that use this standard pinout. If you get an adapter with a non-standard pinout, you would need to use a mess of jumper wires to adapt it to the standard pinout. Some adapters don't even break out the DTR or RTS pin, without which you will need to manually reset the microcontroller at just the right time on every upload.
bitrux:
I have not yet been able to figure out how I can upload a sketch to the atmega328 on breadboard using Uno board as a bridge between arduino and PC.
You need to make the folllowing connections:
You can also power your chip from the Uno's 5V pin if you like.
You might think that the connections should be RX-TX, TX-RX, but this is not so. The reason is that the Uno's pins are marked according to the ATmega328P microcontroller's pins. But you aren't communicating between your chips and the ATmega328P. You are communicating between your chips and the USB to serial adapter on the Uno. That chip is connected to the Uno's ATmega328P with a RX-TX, TX-RX connection, so the Uno pin marked "RX" is connected to the USB to serial adapter's TX pin, and vice versa with the other pin.
Since you won't have the auto reset capability, you'll need to manually reset your chip just as the upload process starts. Note that this happens after the compilation finishes, so you can't reset when you click the "Upload" button in the IDE. You need to wait until you see the message in the IDE's console pane something like this:
Sketch uses 444 bytes (1%) of program storage space. Maximum is 30720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
Then reset your chip.