Communicating to an MCU _not_ using the AT Command Set?
Posted: Sun Nov 01, 2015 11:15 am
Hi,
I found the ESP8266 and thought it perfect for a sort of 'web enabled motor controller' project I have been wanting to do.
After playing with NodeMCU and finally getting Sming going, I found that there are some problems with the hardware PWM system that I don't think I can circumvent. (90% duty max, random flicker, etc).
So, I decided the best thing to do would be to pop a true real time capable system next to the ESP and assign the tasks based on where they are appropriate. (Web server on ESP, PWM on Arduino, etc).
My question:
What is the best way to do inter-MCU communication? I want the ESP to run a web server with sming, take input from a browser, etc, so the AT command set is not what I'm looking for.
I obviously could use serial UART, but then programming/debugging the chip will be a problem. I've read that there is a second hardware UART, however I don't see any code (in Sming for instance) on how to bind to the second UART.
Is SPI appropriate? It seems like the other obvious choice. Can SPI on the ESP do real time, or will the networking workload cause delays?
I'm trying to avoid things that rely on software timing on the ESP, since the TCP/IP stack and wifi, etc, take up so much time and they will make my motor operation jittery.
A few extra details, my required bandwidth should be pretty low, probably a 10 byte telegram every 100ms or so bidirectionally.
Thanks!
I found the ESP8266 and thought it perfect for a sort of 'web enabled motor controller' project I have been wanting to do.
After playing with NodeMCU and finally getting Sming going, I found that there are some problems with the hardware PWM system that I don't think I can circumvent. (90% duty max, random flicker, etc).
So, I decided the best thing to do would be to pop a true real time capable system next to the ESP and assign the tasks based on where they are appropriate. (Web server on ESP, PWM on Arduino, etc).
My question:
What is the best way to do inter-MCU communication? I want the ESP to run a web server with sming, take input from a browser, etc, so the AT command set is not what I'm looking for.
I obviously could use serial UART, but then programming/debugging the chip will be a problem. I've read that there is a second hardware UART, however I don't see any code (in Sming for instance) on how to bind to the second UART.
Is SPI appropriate? It seems like the other obvious choice. Can SPI on the ESP do real time, or will the networking workload cause delays?
I'm trying to avoid things that rely on software timing on the ESP, since the TCP/IP stack and wifi, etc, take up so much time and they will make my motor operation jittery.
A few extra details, my required bandwidth should be pretty low, probably a 10 byte telegram every 100ms or so bidirectionally.
Thanks!