Have you ever wondered what an ESP8266 could if it was not bund by wifi?
A lot of people seek after this particular processor because it is a $2 processor that
somehow - I don't know how many unicorns they had to kill - but they were able to make it
talk Wifi.
Now, it's full-fledge microcontroller.
It's got tons of stuff peripherals and a core that's pretty zippy.
It can be overclocked to 160 out of the factory.
And that's pretty neat.
I ended up doing a project with it a while ago with ESPUSB, a little software USB stack
for it where I could write a bootloader.
The bootloader lives on there and if I could ever find anyone to write - to pick up the
mantle for this project and start implementing it more seriously then who knows, maybe the
next round of esp8266 dev boards might not have a little usb to serial bridge on them.
Any rate, what happened a few days ago is I saw this: the Hack A Day 1 kB challenge.
And, it really uuh it really got me interested.
It wasn't just because I just worked on this espusb thing, which is already too big and
it violates some of the rules, like using mask rom.
But, it really had me thinking: surely the ESP8266 can be more than just this one-trick
wifi pony.
So, I decided to see just how small could I get this thing to be.
To just make it wake up and make it start yippy-yapping to the various peripherals.
And, so thus, this project was born: ESP NOSDK, or rather NO SDK8266.
Sorry, I can't even remember the name of my own projects.
Where I decided to take the guts of the ESPUSB bootloader thing and shrink it as small as
possible.
So, if all I need is for this little board to wake up and talk at its native 52MHz main
processor core and just blink an LED.
Well, it takes 131 bytes.
But you can tell very quickly that it can do a lot more without much more overhead.
I can do things like set up the faster clocks here.
The normal clocks.
The ones that you're used to.
The 80 and 160 MHz, which is all the processor was ever designed to do.
And, uuh, those work totally fine.
Takes a little more space.
But, the crazy thing is once I was there - because these programs are so small.
Here, let me show you.
I can just go here and say reflash it.
BOOM.
1.9 seconds later and I've already put new code on this processor here.
I can edit my code.
So, this is using umm REGULAR.
The REGULAR mode, which does use ROM functions, which if you look at the 1kB challenge, you
aren't allowed to use the mask ROM without it counting against you.
This is REGULAR mode.
There is PICO mode which I'll show you in a minute.
But, I can change the code here.
"Hello, " I'm gonna say "World" exclamation points.
And I can run this program.
Reflash it recompile it and look at that.
In under 2 seconds I've taken my code, which I've changed and I'm testing it.
This is just amazing.
This is totally the way everything should always work.
None of this waiting for things to compile and flash and all of that.
You know what?
I think I'm going to call them DCMPs.
Development cycles per minute.
And with a system like this it's not hard to get up to 6 or 7 DCMPs, or DCPMs.
It's totally do-able that you can have that many development cycles per minute.
At any rate, this does have access to the I2S bus, even in PICO mode.
I told you I'd show you guys that.
So, PICO mode here is a mode where you can't really print things.
But, you.
You can, but, printing things would violate the hackaday rules because I use ROM functions
to print.
But, so for this here, I'm just going to blink the LED.
So right there it says 372.
That's how many bytes it takes to make this code run.
So, for PICO here, this code is only 372 bytes.
How crazy is that?
372 bytes to make this thing wake up and initialize the I2S engine.
It's the same subsystem.
It's just this pin you can control at a very high speed.
It's just a shift register and it has a clock.
And, I used it for my ESP8266 Ethernet adventure, and when I outputted to NTSC and some other
guy issuing it to control stepper motors and that peripheral is just an amazing peripheral.
And you can only run it at 80 MHz.
At least I thought you could only EVER run it at 80.
But because these development cycles are so fast, I was able to spend some time and just
experiment.
And, I found out by playing with the numbers that go into the PLL subsystem that go into
the clock generation system for the ESP - I could get that fast.
I could get it a LOT faster.
So, before this peripheral bus was limited to 80 MHz, now I got the peripheral bus to
go up to 173 MHz.
Now, to make things even crazier.
When I had that running at 173, you can turn on the processor over clocking AT 173.
So it's already 200% err over 200% faster or whatever or 2x the speed.
Then you can turn on this other bit and goes up to 346 MHz.
So, right now, the ESP is running at 346 MHz and it's blinking this little LED.
That's just insane.
This little guy here.
Ok, before I thought this was an amazing processor because of the whole wifi thing.
If you ditch wifi, this thing can run circles around $14, $15 microcontrollers.
This thing is just insane.
Like there's going to be so many more projects that are gonna start using this because it's
just so stupid powerful.
Now, granted, 346MHz is probably voiding the warranty pretty hard.
It's still something that really excited me.
So, this project right here is available on github.
You will need to get a copy of esp open sdk.
I have instruction right there on how to get it and how to build for it.
You'll need to modify the Makefile.
A couple lines here if you want a regular build with printf and everything or PICO build
which has just about nothing.
But, it can make extremely small executables.
By the way if you want to participate in the 1kB challenge, you're going to have to use
the PICO thing.
At any rate, I did a whole writeup here on github and this thing is going to be going
life.
There's a hackaday article you can see in the description.
That'll be going live with the video.
So, I hope you guys like this video and I hope you guys like this article, and I hope
you guys check this out and seriously consider using the ESP8266 for more than just wifi!
I hope you guys liked it and I can't wait to see what y'all do with this!
Thanks!