ESP8266 and USBasp V2.0

Peter S picture Peter S · Jan 25, 2017 · Viewed 7k times · Source

Can I program the ESP8266 module via USBasp V2.0 and Arduino IDE, or do I need to get a different kind of programming stick?

Here're the pins of the USBasp:

enter image description here

The ESP8266 has the rolling pin setup:

enter image description here

My current setup: USBasp (left) --- ESP8266 (right)

  • Pin2 - VCC --- (3.3V) VCC
  • Pin4 - TXD --- Pin TX
  • Pin6 - RXD --- Pin RX

All remaining ESP8266 pins go to ground on the USBasp.

When connecting to my Mac and starting Arduino IDE, the USBasp board and the ESP8266 LEDs light up.

Problem:

The USBasp does not show up in the Port section. Whenever I'm trying to upload a sketch these errors show up:

error: espcomm_open failed error: espcomm_upload_mem failed

Questions:

  • Can I flash an ESP8266 with a USBasp V2.0
  • Is the setup correct?

Answer

XerXeX picture XerXeX · Jan 27, 2017

You need to switch rx an tx pins on one side. Then you need to pull CH_PD pin on the ESP to VCC and when you upload to the ESP you need to pull GPIO0 to GND before you apply power.

  • Pin2 - VCC --- (3.3V) VCC
  • Pin2 - VCC --- CH_PD
  • Pin4 - TXD --- Pin RX
  • Pin6 - RXD --- Pin TX
  • Pin8 - GND --- GPIO 0 (only when programming)

Leave ESP RESET pin floating

Then the last thing. It looks like the USBasp are 5v so you would need another power supply for the ESP witch is 3.3v.