walraven92:
I am using Arduino board UNO (ATMEGA328P) with Arduino IDE.
Good. You will need the "Arduino as ISP" sketch to use it as the programmer.
walraven92:
The thing is I have to put them on my own PCB board. In order to keep the costs low, I am not using the USB chips to program the ATMEGA328P.
Now that depends on whether you will be purchasing chips with the bootloader already loaded, or completely fresh, un-programmed chips. If you do not want USB functionality, then it certainly makes no sense to include the USB-to-TTL functionality.
walraven92:
- What is my options to program the ATMEGA328P on my board? What path should I take? I meant JTAG or anything else.
Again, this depends on whether you will be purchasing chips with the bootloader already loaded, or completely fresh, un-programmed chips. If you have the bootloader on the chips, then you only need connections for ground, +5V, TX, RX and Reset so that you can connect a USB-to-TTL module which includes the DTR or RTS functionality, with a 100 nF capacitor between DTR on the USB-to-TTL and Reset on your board.
If the chips will not have the bootloader, then you need to provide on your PCB, the ICSP pinout as on the UNO board itself. You should do so in precisely the same form as the UNO for compatibility - it is foolish to do it any other way.
However, you do not need to fit a header to the ICSP position. For programming, you use a connector with pogo pins fitted which is held compressed to the array of PCB plated-through holes when programming.
Note that in either case, the reset pin requires a 10k pull-up resistor to +5 V and only if you are using the USB-to-TTL module and 100 nF capacitor adapter, then a diode across this resistor.
walraven92:
2. I also want to program 100 of these PCB (ATMEGA328P) at the same time. If its possible then please let me know how?
Yes, you just need 100 of the adapters and PC ports, or UNOs (or Nanos) as ISP on PC ports.
I think you actually want this adapter that Nick Gammon describes - and his references will clarify the general programming process. Crossroads offers a ready-made and more sophisticated version of this.
Obviously, you cannot program 100 at once - some people have suggested you can parallel a few boards during programming but it is not advisable. The Automated programmers I have cited make it easy to do it rapidly and of course, it is really no slower to program one at a time that it would to absurdly connect each of the 100 to a huge programming device - I presume you did not really expect that in the first place.
walraven92:
3. Does Arduino generates any binary file that I can use to program the ATMEGA328P on my PCB using Atmel programmer?
Yes, the IDE does, but I thought you did not have an Atmel programmer anyway?