328p programming on breadboard

I saw two kinds of connections when programming 328p with arduino uno.
328p 1st pin to reset pin of arduino
328p Tx to 2nd pin
328p Rx to 3rd pin

328p D13 (SCK) to 13th of arduino
328p D12(MISO) to 12th
328p D11(MOSI) to 11th
328p D10 to reset

What is the difference after all while they can upload a program?

The first is using serial programming and is not complete. The reset pin should be connected to the DTR pin of the USB to serial converter through a 0.1uF ceramic capacitor to effect the autoreset required. Then the RX pin of the USB to serial converter to the TX pin of the 328 and the TX of the converter to the RX of the 328. Serial programming requires that the chip have a bootloader installed. You can upload user code using a serial port and the IDE. You cannot bootload with serial programming.

The second is ICSP (In Circuit Serial Programming and requires a dedicated programmer or another Arduino set up as an Arduino as ISP. You can upload programs this way and also load a bootloader.

If you are using the ICSP programming you will need a core. The core contains pin definitions and a lot more. I recommend the MiniCore core. It allows easy selection of many options for bootloading. Also, with MiniCore, if you are not using the crystal pins you can use those 2 pins as GPIO (pins 20 and 21).

Thanks for fast and explanatory reply.

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