Help using PIC?

You can buy an ATMega328P WITH BOOTLOADER as an easy way to program an Arduino chip for use in another circuit. I have seen the chip with bootloader for $3.00US - $6.00US. IF your Arduino board has the DIP type processor in a socket it is real easy to remove the chip (make sure you note how the original was inserted) and plug the new one in the same way. Make sure power is off when you swap them. You can then program the new chip and then swap them back.

OR - you can use the ArduinoISP sketch and put your AYMega328P in a breadboard with power, some bypass caps and a crystal/resonator or on your own board and hook it up properly to your Arduino and program the chip directly. It might be easier to program your chip that way because it might be easier and lighter to solder it into your HAP payload.