I've been trying to get my ESP-01 module to work wit Zbasic. I had it working with a terminal program using the AT commands with no problem.
After a few tries I used the manual method and downloaded the "Hello World example. It showed the dots and said downloading, then said it was complete with no errors. The program didn't seem to run and the blue LED flickered a few times but nothing on the output.
I pressed the reset button and some garbage was seen on the output but still no worky. Now the module has both the red and blue LED on solid and I can't connect.
Any ideas?
Tom W
Zbasic ESP8266 problem
Re: Zbasic ESP8266 problem
Just to review, the manual reset protocol requires these steps (assuming that the serial port is properly connected):twesthoff wrote:I pressed the reset button and some garbage was seen on the output but still no worky.
- o Ground GPIO0.
o Momentarily ground RST. The device will start up in "monitor" mode. Some unintelligible output may be displayed during device startup.
o Press F5 on the ZBasic IDE
o One or more dots may be displayed while the IDE attempts to establish the communication protocol with the device. Once the connection is established, a series of dots will be displayed as your program is downloaded.
o While the downloading is occurring, remove the ground from GPIO0.
o When the download is finished, the device may start up, running your downloaded program. If not, momentarily ground RST to reset the device.
- Don Kinzer
Zbasic ESP8266 problem
Don,
Yes, I did what you say below, and got an affirmative message that the download succeeded. The program did not run automatically, so after about a minute or two, I pressed the reset button (GPIO not grounded). I had my scope connected to GPIO2 and I didn't see the voltage change.
Sometimes a lot of garbage is displayed on the screen, sometimes not. I tried setting the output baud to several values to see if it helped. It may be that the device started using the default baud that I read somewhere was about 78000. Maybe you could add that to the list in the IDE?
The modules are relatively cheap, so I'm not out much if it is toast. It just seemed odd that it would stop working after the first successful attempt at downloading a Zbasic application. A few minutes previous I used it with a terminal program (TerraTerm) at 9600 baud with the command AT+CWLAP and it worked fine.
Since this was the first time trying with Zbasic I wanted to make sure I hadn't done something in error.
I will try a different module tomorrow. I have some that are different numbers: ESP-03, ESP-09, and ESP-12
Tom W
Yes, I did what you say below, and got an affirmative message that the download succeeded. The program did not run automatically, so after about a minute or two, I pressed the reset button (GPIO not grounded). I had my scope connected to GPIO2 and I didn't see the voltage change.
Sometimes a lot of garbage is displayed on the screen, sometimes not. I tried setting the output baud to several values to see if it helped. It may be that the device started using the default baud that I read somewhere was about 78000. Maybe you could add that to the list in the IDE?
The modules are relatively cheap, so I'm not out much if it is toast. It just seemed odd that it would stop working after the first successful attempt at downloading a Zbasic application. A few minutes previous I used it with a terminal program (TerraTerm) at 9600 baud with the command AT+CWLAP and it worked fine.
Since this was the first time trying with Zbasic I wanted to make sure I hadn't done something in error.
I will try a different module tomorrow. I have some that are different numbers: ESP-03, ESP-09, and ESP-12
Tom W
Re: Zbasic ESP8266 problem
I had been using an ESP-12 so I switched to an ESP-01 and observed the same issue that you described. Connecting a 10K pullup to the CH-PD pin fixed it. Apparently, the ESP-01 doesn't have the required pullup on CH-PD.twesthoff wrote:I pressed the reset button (GPIO not grounded). I had my scope connected to GPIO2 and I didn't see the voltage change.
A note on the manual reset protocol: it isn't necessary to keep the GPIO0 pin grounded until after the download is commenced. All that is necessary is to ground GPIO0 while the chip is reset. The ground on GPIO0 can be removed at any time after that. Note, however, that if the download completes before the GPIO0 ground is removed the app will not run until the device is reset with GPIO0 not grounded.
- Don Kinzer
I did have a 10K pullup on CH-PD. It is soldered to the pads on the board. I found it was necessary to get the "AT" firmware that came on the ESP-01 to work.
I removed the ground on GPIO0 shortly after the download started and before the download finished.
Now when I reset the ESP-01 both the red and blue led light and stay on. The same happens with or without GPIO0 grounded. I also tried a pullup on GPIO0, same results. The led's stay on even when the reset button is pushed.
I'll try another module.
I removed the ground on GPIO0 shortly after the download started and before the download finished.
Now when I reset the ESP-01 both the red and blue led light and stay on. The same happens with or without GPIO0 grounded. I also tried a pullup on GPIO0, same results. The led's stay on even when the reset button is pushed.
I'll try another module.
For the download baud rate, you can set it to any speed you'd like. The device does auto baud detection during the procedure that establishes communication prior to downloading. Generally speaking, a faster download speed is better as it reduces the time required. I have successfully downloaded at 460.8K baud. I have heard others say that they've had success at 921.6K baud but the serial port on my main computer doesn't go that fast. I would suggest incrementally increasing the download speed until it doesn't work and then back up a step.twesthoff wrote:When working with the ESP8266, what should the two serial port settings be set to?
As for the execution baud rate, you can use any speed you'd like but the console speed compiled into the application must match the setting in the IDE. The default console speed is 115.2K baud and you can change it with the Option ConsoleSpeed directive.
- Don Kinzer
Zbasic ESP8266 problem
Update - I had an ESP-03 module and got it working. I then successfully downloaded s few of the demo programs for Zbasic. The reset pin didn't work so I used the manual method applying power to the module instead of using reset. There appears to be a small jumper that I need to connect on the ESP-03 board in order for Gpio16 to work as reset. I also read that if CH-PD has a pull-up it can be used as reset too. I'll try some of that Monday and see how it works. Things are going well for now.