Arduino programmer cannot upload to bare atmega

Hello,
i known this is a common problem but the answers i've found hadn't worked.

I'm trying to upload a sketch to my atmega 328p, OS: yosemite 10.10.2, mounted on a breadboard and using the arduino UNO board without chip as programmer.

I've done this a lot of times before but i'm not able now to upload a sketch this way, although if the chip is mounted on the UNO board i have no problem when i try to do so with the ammeter on the breadboard it simply doesn't work.

The connections are only the supply ones and serial (RX/TX), i've tried with and without crystal and get same result:
"
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude:
"
Pressing reset just before IDE starts uploading hadn't either worked for me, the chip have the boot loader and works fine with any program, just can't upload anything to it if is on a breadboard.

Serial communication isn't also available on the breadboard.

More details:
-board: arduino UNO (i have 2 arduino UNO bards seleccted on the IDE board options, don't know why or if its right)
-port: /dev/tty.usbmode1421 (Arduino UNO)
-programmer: AVRISP MKII

tested on 3 different atmega328p chips, all worked when placed in UNO board but none in the breadboard, i've checked all the connections when mounted on the breadboard and all seem to be right, and, as i said, i've done this a lot o times before so i don't think is connection problem, maybe configuration problem.

Wire it like Nick Gammon's set up here.

Confirm that your USB to serial converter is spotted by your IDE. A quick way is to look in tools->port without it first then with. You are looking for a port that wasn't there before.

Wired like Nick (i was using that setup before) the second one, cause i don't need to burn the bootloader as is already burnt.

Serial interface is also detected by IDE, if i disconnect it i'm only able to see bluetooth serial ports, if i plug it i see /dev/tty.usbmode1421 (Arduino UNO)

I remember i was able to select two different option (cu and tty) but now only one (tty) is available.

Serial port works fine, loopback test works, uploads to the chip when this is on the dip socket on the arduino UNO board, the problem is when programming in the breadboard.

Xcode doesn't either compile, only when the chip is mounted on the UNO (same as arduino IDE), any serial monitor program work as well.

It's quite weird that works fine with every chip when on board and if i take it out stop working when it supposed to be wired the same as in the board...

I'll try ISP programming leaving aside the boot loader but even if this works i want to get serial uploading working.

Have you got bluetooth connected to the Atmega whilst trying to upload? If so that will be on serial and will interfere with the upload process. Disconnect it for the upload and then connect it afterwards.

Usercore:
It's quite weird that works fine with every chip when on [the Arduino UNO] board and if i take it out [and put it in the breadboard] stop working when it supposed to be wired the same as in the [Arduino UNO] board...

The only possible conclusion is that there is something wrong with the wiring of the breadboard. Since you mentioned "arduino UNO board without chip as programmer" you must be using the Arduino UNO as a USB-to-TTL Serial adapter. So you have Ground, Pin 0/RX, and Pin1/TX connected to your breadboard. What pins are they connected to? How do you do the Reset? Do you have the UNO's Reset pin connected to pin 1 of your breadboarded chip or do you have a reset button on your breadboard?

pins 7 & 20 to Vcc (21 is not necessary in this step but i have also tried).
pins 8 & 22 to gnd
reset pin via 10k pullup to Vcc and to reset pin on UNO, i think the pulp is not necessary as is provided by the programmer but tried both option (w & w/o) with same results.
tx to rx and rx to tx (rx from UNO to pin 3 and tx from UNO to pin 2).

Do you see any mistake in the connections?

I have to try with a different computer to make sure is not a driver problem.

The estrange thing is that i've been using this same config on a previous project without any fail, and the programmer use the same wiring and setup to upload the sketches to the atmega so i don't know why is not working....

"tx to rx and rx to tx (rx from UNO to pin 3 and tx from UNO to pin 2).
Do you see any mistake in the connections?"

Yes. TX and RX on the UNO are named from the point of view of the ATmega328p. The RX pin (in to the ATmega) is connected to the TX pin of the USB-to-Serial chip. The TX pin (out from ATmega) is connected to the RX pin of the USB-to-Serial chip. You want RX (UNO Pin 0) going to RXD (ATmega pin 2) and TX (UNO Pin 1) going to TXD (ATmega pin 3).

Well, when i say rx to tx and tx to rx i mean tx/rx pin of the programmer not the one labeled as rx or tx on the board.

Even switching pins doesn't work, i'm uploading a photo of the wiring so you can help me but i don't think the problem is about the wiring, but i can't figure what the problem is then.

It was the crystal (i don’t know how can it be damaged but it was), i think is possible to use the atmega even without the crystal (setting certain bits in a register that tell the atmega to use the internal clock) but i didn’t know it wasn’t possible to upload sketches without crystal (i think i should set the internal clock before uploading via serial or use ISP if i cannot configure it other way.

Well, now i can finally upload my programs without taking the chip out of the breadboard.

Thanks for the help!!