Hello, I am trying to make a prototype for a product, and I am currently using the Arduino to program. I am not very experienced with microcontrollers so forgive me if I ask an easy question. And if I state something that is incorrect or if you have other suggestions, please let me know.
I am designing a PCB that incorporates the ATmega328P to run my programs on a standalone board. I need to make this board as compact and cheap as possible.
Is it possible to receive an ATmega328P already burned with a program? I am trying to avoid having to put multiple ATMegas in and out of my arduino board as I know that it will cause damage. I am also trying to avoid using an FTDI converter because I will only have to use it once and it will be a waste of space on my PCB.
Sure: Welcome to MicrochipDirect
May be costly though, and the minimum order may be kind of big. You're most likely better off programming the controllers yourself.
You could use spring-loaded pins. Surely you can make space for some bare pads somewhere on your board. 6 pins for an SPI port that will allow you to program the bootloader and your sketch.
Concerning the waste of space: you mention putting ATmega's in and out of your Arduino board. This implies you're using DIP package ATMega's. You can save quite a bit of space by using an SMD variant. Some of the space saved this way you can use for the SPI port.
You could use ICSP to load the code. Either on the board or on the chip before it is put in the board. You will need a programmer to do this but they are relatively inexpensive.
Making a PCB without some sort of facility for reprogramming the chip would be a big mistake, IMO. It doesn't need to be big, or "standard." Test pads scattered across the board will do. You need access to the SPI signals (MOSI, MISO, SCK) and RESET.
Are you planning on using the DIP package? You can fit the same chip AND a standard ISP footprint (need not be populated with pins) in the same space as a DIP.
It does not have to be on your PCB; just a header to connect the correct pins and an external FTDI adapter (that has the DTR pin broken out). Look how it's done with a SparkFun Pro Mini.
You're problem comes with the programming; to use the FTDI adapter the chip needs to be programmed with the bootloader. You can buy 328P DIP versions with the optiboot bootloader pre-programmed. This will probably be the easiest option for you.
To burn the bootloader yourself, you will need a programmer (or Arduino that can be used as a programmer). In which case you can just as well use it to burn your program directly (see replies by @rsmls and @westfw). Be aware that you still need to set the fuses correctly (something that burning the bootloader does but there are other ways).