When I program atmega328 PU on breadboard,vwhat programmer do I have to use and what arduino board type I have to choose? I am trying this with ftdi converter I have already done the connections and it's okay but there's an error when I'm trying to upload the code either with instant upload either with the programmer. Everything can help is acceptable and thanks in advance for your support.
There are quite a few questions here about breadboard computers. Try searching this site for "breadboard". I also have a page about making a breadboard Arduino which might help.
Normally I would set the Arduino type to Uno if the breadboard computer has a 16 MHz oscillator or crystal on it. If you are running at 8 MHz (possibly with the internal oscillator) I would set it to Lilypad.
If the chip doesn't have a bootloader on it then you need to install that first. I have a page about installing a bootloader which might help.
To install the bootloader you need to use an SPI interface as described on the above page. That requires running 6 wires from an existing (working) Arduino to your breadboard.
it's okay but there's an error when I'm trying to upload the code
It's OK? But there's an error? What error message?
I have a number of atmega328-PU-on-breadboards. I build them with a 16MHz crystal and load the Uno Optiboot loader if they don't already have a bootloader installed. I program them with an FTDI USB to TTL Serial 5V Adapter Cable 6 Pin 0.1 inch Pitch Female Socket Header UART IC FT232RL Chip (or the 3.3v version of the same cable, if I built for 3.3v). By using a 16 MHz crystal and a standard bootloader, I can select 'Uno' as the board type in the IDE and everything works.
On the board, I build a 6-pin header to accept the cable's 6-pin female header I use connect it for for uploading and/or viewing debug output on the board's serial port, but otherwise remove it and power the board through a more compact micro-USB connector. You could always make a more permanent connection between your board and the USB-FTDI cable if you find that more suitable.
what programmer do you choose ? Also can you share your pinout ?
My programmer is avrdude, run by the IDE. My boards program exactly like an Uno.
The CTS output (brown wire) is unused; the RTS output is wired connected to the reset pin through a 0.1uF capacitor, if you want the auto-reset feature. If you are using a different FTDI device, you will, of course, have to use it's particular pinout but it should provide the same signals and behavior.
This is the reset circuit I use on my board (crudely drawn but gets the point across):