Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By eriksl
#16775 Hi All,

Currently I am using ATmel ATmega328's for all sorts of things (no Arduino, btw). They're either connected to an ENC28J60 from Microchip (ethernet mac&phy) or ESP8266. I love the ATmel microcontrollers, especially the ATmega's, because they have rich hardware functionality, they're cheap, they're in DIP-package (so you can solder them yourself) and most of all, documentation is excellent.

I now have some ESP-201's that have most of the pins available and I wonder if I could use some of them on their own, without the ATmega328. This would only be possible for situations were little I/O is required, as it appears the ESP8266 doesn't have that much free pins and also hardware peripheral implementations seem to be limited compared to the ATmega328.

So I am trying to get an overview what's possible and what's not, compared to a "regular" microcontroller. I think I already have quite a bit of information, please extend!
User avatar
By trackerj
#16777
eriksl wrote:Hi All,

Currently I am using ATmel ATmega328's for all sorts of things (no Arduino, btw). They're either connected to an ENC28J60 from Microchip (ethernet mac&phy) or ESP8266. I love the ATmel microcontrollers, especially the ATmega's, because they have rich hardware functionality, they're cheap, they're in DIP-package (so you can solder them yourself) and most of all, documentation is excellent.

I now have some ESP-201's that have most of the pins available and I wonder if I could use some of them on their own, without the ATmega328. This would only be possible for situations were little I/O is required, as it appears the ESP8266 doesn't have that much free pins and also hardware peripheral implementations seem to be limited compared to the ATmega328.

So I am trying to get an overview what's possible and what's not, compared to a "regular" microcontroller. I think I already have quite a bit of information, please extend!



Hi Eriksl,

I think ESP8266 can replace and probably will replace soon ATmega168/328 MCU's in many hobbyist applications. It's not only the fact that it has integrated WIFI is also more powerful that ATmega328. It's true also that that for some specific applications ATMega will continue to rule.

Take a look at http://www.esp8266-projects.com/2015/02/esp8266-breadboard-time-cheap-and-dirty.html and around and you might find the informations and examples of usage you are looking for. I think it's a good start to meet ESP8266.

PS: I know that the banners on the esp8266-projects.com are annoying and I am doing my best to keep them under control. Hopefully soon some changes will make you all happier. I really hope you all will find there new and exclusive information. Thank you for understanding.
User avatar
By eriksl
#16784 My base is the information / schematics from this page: http://smarpl.com/content/esp8266-esp-2 ... mpressions, especially the pin<->gpio<->special function mappings and from here: https://github.com/esp8266/esp8266-wiki ... definition

pin gpio special function
6 - TOUT/ADC
7 - CHIP_EN
8 GPIO16 XPD
9 GPIO14 MTMS/HSPCICLK/CLK/U0DSR
10 GPIO12 MTDI/HSPIQ/MISO/U0DTR
12 GPIO13 MTCK/HSPID/MOSI/U0CTS
13 GPIO15 MTDO/HSPICS/U0RTS/boot select
14 GPIO2 boot select
15 GPIO0 SPICS2/boot select
16 GPIO4 CLK_XTAL
18 GPIO9 SPI_D2
19 GPIO10 SPI_D3
20 GPIO11 SPI_CMD
21 GPIO6 SPI_CLK
22 GPIO7 SPI_D0
23 GPIO8 SPI_D1
24 GPIO5 CLK_RTC
25 GPIO3 RX0/CLK_XTAL
26 GPIO1 TX0/CLK_RTC/SPICS1
32 - EXT_RSTB

From these, only the pins marked bold can be used (without special measures). They could be used as generic input, generic output or PWM.

PWM runs at custom frequency but is only 8 bits deep (compare: 10-12-16 bits at ATmega's). It can connect at least four pins though.

There are two SPI modules, one of them being used to address the flash memory (pins 18-23) using four data lines, the other (pins 9/10/12/13) can be used.

There is NO hardware I2C module. Whoever wants to use I2C must use software bit banging techniques. If you read carefully in the SDK specs, this is more or less admitted (same as irDA and I2C support). I think this is a real pity.

Please correct and extend!