Using arduino UNO as ISP to program esp8266

I have an esp8266 (esp 12). It has multiple GPIO pins. The project that I want to make requires wifi and gpio. Since esp8266 already has gpio, I want to make it my main micro controller for everything(i.e. no atmega in the project anymore)

I do not have a USB to serial. I just have an arduino uno and the wifi module.
How do I burn my code into the module using arduino Uno as isp ?

ISP is only used for programming AVR chips, the ESP8266 is not an AVR, and cannot be programmed via ISP. The ESP8266 is programmed over serial.

If the ESP8266 was a 5v device, you could use the Uno as a serial adapter by connecting reset on the uno to ground, and use tx and rx as your serial. But you can't do this, because the Uno is 5v and the ESP8266 is 3.3v and the pins aren't 5v tolerant, and you will damage the ESP8266.

Use a USB serial adapter. They cost about $1~3 shipped, or $4-10 that if you need them in a hurry (ie, not 1-8 week china shipping).

I often use these, simply because they're dirt cheap (not necessarily from that vendor - there are a few selling these at the same price point I think. )

Cant I drop the voltage from 5v to 3.3 using resistors ? if yes, could you show me a diagram of the circuit ?Also, Note that I do not want to just send serial commands to the chip. I want to program it so that I can use its GPIO .

I don't know these things so well, thats why I'm mentioning it explicitly. Sorry if its redundant

Serial is used to program the chip, not just to use it as a wifi adapter.

Actually, yeah, I forgot about that - you could use a resistor divider to lower the voltage. A 2:1 resistor divider from RX of the Uno (which is TX of the serial adapter) should work.

RX (Uno) ----1k ---- 2.2k---Gnd

And connect the RX of the ESP8266 to the middle of the two resistors.

TX of ESP8266 goes to TX on the Uno board (which is RX of the serial adapter)

Also, Note that I do not want to just send serial commands to the chip. I want to program it so that I can use its GPIO .

Well, to make a script on this thing I'd recommend flashing NodeMCU firmware on it, to control the GPIO.

I have set my circuit as mentioned. Could anybody tell me how to upload a test sketch on the esp8266 ?

You can see the connections here:

and of cource you need to install this:

When you program the chip you pull GPIOo low.

I have put my reset pin to low, as mentioned. In the arduino IDE, which programmer should I choose ?

I have put my reset pin to low,

Which reset pin, On the Arduino then OK

The reset pin on the esp8266 should be held high as shown in the schematic.
When programming you just pull the GPIO0 low as I said.

In the IDE you choose the right ESP version, no need to choose programmer (if you are using IDE 1.6.5) in lower versions you choose esptool (AFAIR)

But I have to choose some programmer ,don’t I ?Which one should that be ?

This is the chip that I have.

I have chosen the esp12 board(not esp8266 generic) , is that okay ?

But I have to choose some programmer ,don't I ?

Not if you are using IDE 1.6.5 (as I said)

Else choose esptool

I don't see esptool. But by default some be programmer is chosen. I think it is avrispII. Will that be OK?

I don't see esptool. But by default sin be programmer is chosen. I think it is avrispII. Will that be OK?

Nope - it sounds to me like you may not have ESP8266 support installed?

Which Arduino version are you using ?

I am using arduino 1.6.5 (Mac OS X 10.10.5)

I have done this much so far::::::

Installing with Boards Manager

Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).

Install Arduino 1.6.5 from the Arduino website.
Start Arduino and open Preferences window.
Enter into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).

So, you are using 1.6.5

In that case (as i have said two times before) you don't need to choose a programmer, in fact the programmer - menu is not used at all.

Just choose the board you wish to use

So it means whatever is chosen , it doesn't matter?

I will try the circuit out in some time and update the results

I tried the circuit as mentioned. I get this error :
warning: espcomm_sync failed
error: espcomm_open failed

Also, the led doesn't glow in the wifi module
whats wrong ?

i did everything mentioned above
while uploading the sketch i am getting errors
these are the errors

warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

plz help me out

I havent tried program the ESP via Arduino. I used a very low cost Serial adapter to program the ESP. Here is a small post I wrote about my experiments Program ESP8266 with Arduino IDE | Sony Arouje

Keep in my ESP is really power hungry, Uno may not able to provide enough power (3.3v) to ESP, I used an external module to power my ESP.