Download the program for the device via the Internet.
Moderator: Benj
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good afternoon! I decided to check with an oscilloscope in the FC program what happens on the legs of the controller when the esp-01 module sends data about its firmware, there are no signals on the Rx leg, this means the esp-01 module sends firmware data via wi-fi or this module is visually present in the FC program, but in reality it is not it works (as in the case of spi). How else can I check the functionality? or should I use an oscilloscope to try to check what is happening on the antenna of the esp-01 module? There is the first version of the program in the screenshot of the signals on the oscilloscope, but the results are the same in both cases.
- Attachments
-
- 2.from esp-01 to Rx pin of the controller, synchronization is based on the enable signal from lcd1602.jpg (137.52 KiB) Viewed 5727 times
-
- esp-01 send firmware test .JPG (40.21 KiB) Viewed 5727 times
-
- Atmega8_ESP-01_FirmwareTest.fcfx
- (16.1 KiB) Downloaded 148 times
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
Get rid of the UART component (as per my previous post). There is no need whatsover to include it in your chart at all.
I'd be wary of any simulation.
Regards
Get rid of the UART component (as per my previous post). There is no need whatsover to include it in your chart at all.
I'd be wary of any simulation.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! Thank you, today I will try to do as you said, but I do not understand how the controller will receive a message from the esp-01 module...some kind of witchcraft...
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
Yep, the "witchcraft" of Flowcode...... Never say "Matrix" three times in front of a mirror at midnight........
Components when included in your chart take control over certain pins. The ESP8266 component pins (see component properties) connect the microcontroller to the esp8266 module (tx/rx). All communications between them are controlled by the component and pass via these pins. Having any other component use these same pins too, will only cause big problems.
Perhaps think on it as that the component has everything it needs to communicate, all built in to it.
Hope this helps.
Regards
Yep, the "witchcraft" of Flowcode...... Never say "Matrix" three times in front of a mirror at midnight........
Components when included in your chart take control over certain pins. The ESP8266 component pins (see component properties) connect the microcontroller to the esp8266 module (tx/rx). All communications between them are controlled by the component and pass via these pins. Having any other component use these same pins too, will only cause big problems.
Perhaps think on it as that the component has everything it needs to communicate, all built in to it.
Hope this helps.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! I hope this is how you describe it, if it were so it would get rid of many confusing situations. I made the program, it's in the attached file. I uploaded it to the controller, but no miracle happened, only the inscription "FirmwareTest" appeared. Perhaps the module sent the firmware data somewhere, as it warmed up a little while working. But where is not clear.
- Attachments
-
- Atmega8_ESP-01_FirmwareTest.fcfx
- (12.72 KiB) Downloaded 174 times
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
First, double check your connections and settings. I assume this is all hardware and not simulation?
Regards
First, double check your connections and settings. I assume this is all hardware and not simulation?
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! Yes, it was connected in a real device. One inscription appeared, but there is no firmware data. If something has to go through the Rx-Tx pins, then I can look in the oscilloscope. As for decryption, I don't know if it will work out or not, but will I see the signals if there are? Check it out? or you're not sure.I will be able to respond on Tuesday after 4 p.m.
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
You can use your PC to check.
Using your USB-TTL adapter, ensure settings are correct and then connect the USB gadget Rx pin to the uC Tx pin.
Run your chart and see what you capture coming out of the uC Tx pin going to the ESP.
If nothing then double check connections.
If you see an "AT" command being sent all good and well. Next move the USB gadget Rx pin to the esp Tx pin. Again run your chart and see what you capture.
Regards
You can use your PC to check.
Using your USB-TTL adapter, ensure settings are correct and then connect the USB gadget Rx pin to the uC Tx pin.
Run your chart and see what you capture coming out of the uC Tx pin going to the ESP.
If nothing then double check connections.
If you see an "AT" command being sent all good and well. Next move the USB gadget Rx pin to the esp Tx pin. Again run your chart and see what you capture.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! I connected the usb-ttl module to the computer (before that, I checked the passage of commands when the esb-01 module is connected to the usb-ttl module), connected the wire connecting the Rx pin of the usb-ttl module and to the voltage divider, which is connected to the Tx pin of the microcontroller, while the esb-01 module is also connected to the controller. I turned on the terminal program and connected the required port. There are no commands on the terminal program screen. Now I'm going to try to connect the oscilloscope and see if there's anything there.
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
I'm guessing there won't be.
Sounds like it is settings / connections with the uC.
Go right back to basics and do a one-second flash test on your uC with no components. Pick any free port and monitor with your scope. You should see a square wave.
Add in your LCD and ESP8266 components and initialise.
You should still be seeing your square wave.
Create a loop (after initialising components). In the loop just use the SendString command to send a U (the letter U) then a delay of one second.
With your scope on the uC Tx pin you should see a burst every second.
Regards
I'm guessing there won't be.
Sounds like it is settings / connections with the uC.
Go right back to basics and do a one-second flash test on your uC with no components. Pick any free port and monitor with your scope. You should see a square wave.
Add in your LCD and ESP8266 components and initialise.
You should still be seeing your square wave.
Create a loop (after initialising components). In the loop just use the SendString command to send a U (the letter U) then a delay of one second.
With your scope on the uC Tx pin you should see a burst every second.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! I have now checked the signal with an oscilloscope. A meander type signal is visible. The commands could not be decrypted. I also noticed an unpleasant feature in the power supply from 3.3 volts, I put the LF33CV chip, according to the specification it outputs a current of 0.5 amperes, but now it is very hot. I decided to check the current that comes from the chip - it outputs about 0.07 A, switched to a range of 600 mA, the tester goes into protection mode. I decided to check the current with a simpler tester, it shows about 0.06 A. When the esb-01 module was removed from the adapter on my board, the power supply chip stopped warming, the current consumption was 0.0 mA.But this meander is visible when the program is running to get the firmware version.
- Attachments
-
- dso_01_01_00_53_43.jpg (55.08 KiB) Viewed 5605 times
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
Sorry I'm confused.
Are you saying you still had the ESP8266 adapter board still in-circuit? The one that allows you to connect to a PC? If so that will be the cause of your problems, or very likely to be.
The uC should be connecting directly to the Tx / Rx pins of the ESP8266 (possibly reset too if you wish HW over SW reset). You cannot have the adapter board that allows you to connect to a PC as part of the circuit.
You will need to create, possibly using breadboard, a circuit that provides the necessary connections and power to the esp8266 with the Tx/Rx going to the uC.
Regards
Sorry I'm confused.
Are you saying you still had the ESP8266 adapter board still in-circuit? The one that allows you to connect to a PC? If so that will be the cause of your problems, or very likely to be.
The uC should be connecting directly to the Tx / Rx pins of the ESP8266 (possibly reset too if you wish HW over SW reset). You cannot have the adapter board that allows you to connect to a PC as part of the circuit.
You will need to create, possibly using breadboard, a circuit that provides the necessary connections and power to the esp8266 with the Tx/Rx going to the uC.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! And in the attached picture, sending the letter "U", a delay of 1 second, then clearing the screen and again a delay of 1 second. And the controller stopped being defined in the programmer, put another one. No, when I measured the current, I disconnected the usb-ttl adapter from the computer and from my board. At first I also thought he was to blame. Then I read in the summary that this power supply chip can heat up to +145 degrees Celsius.
- Attachments
-
- Atmega8_ESP-01_SendString_U.fcfx
- (12.21 KiB) Downloaded 178 times
-
- dso_01_01_00_03_08.jpg (54.77 KiB) Viewed 5590 times
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
Just remembered you don't have a USB-TTL adapter as such, rather a plug in "piggy back" that takes your esp.
With that in mind my previous suggestion of using the adapter to monitor is a non-starter.
Disconnect the esp and adapter from your microcontroller and then try the one-second flash test.
Regards
Just remembered you don't have a USB-TTL adapter as such, rather a plug in "piggy back" that takes your esp.
With that in mind my previous suggestion of using the adapter to monitor is a non-starter.
Disconnect the esp and adapter from your microcontroller and then try the one-second flash test.
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
Looking at the trace you just shared has me confused if related to the FC file also included.
Have you done a one-second flash check? Just connect your scope to a pin and toggle the pin every second.
Regards
Looking at the trace you just shared has me confused if related to the FC file also included.
Have you done a one-second flash check? Just connect your scope to a pin and toggle the pin every second.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! Sorry, I didn't really understand what kind of flash test? should I test the controller? the appearance of text on the indicator and its disappearance -is this suitable?
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
I just tested the controller and the indicator, everything works according to the program. It seems that you have the hardware or software to see how the esp modules work, and now you are trying to protect or hack them.
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
the "one-second flash test" is probably the best test you can do with microcontrollers and whilst so simple is equally so very great.
https://www.matrixtsl.com/wiki/index.ph ... ED_flasher
You can either connect an LED or just use your scope on the pin. If a scope you should see a square wave with a one second period.
Regards
the "one-second flash test" is probably the best test you can do with microcontrollers and whilst so simple is equally so very great.
https://www.matrixtsl.com/wiki/index.ph ... ED_flasher
You can either connect an LED or just use your scope on the pin. If a scope you should see a square wave with a one second period.
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
It isn't working according to your scope trace and your esp isn't responding so you have issues.I just tested the controller and the indicator, everything works according to the program. It seems that you have the hardware or software to see how the esp modules work, and now you are trying to protect or hack them.
Please explain your last sentence. Are you suggesting that I am not offering you assistance in trying to establish why you cannot communicate with the ESP?
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Goodnight! I conducted a flash test with a flashing inscription on the lcd 1602 indicator, is this enough or do I still need to conduct a test with some kind of separate output. Is this the same test just to check the health of the controller? I probably expressed myself incorrectly or incorrectly, I'm sorry, I misunderstood some events. The fact that I can't do it is only my merit of "crooked hands from a certain place" and the lack of necessary knowledge, skills, abilities. And you are the only reliable source of the necessary information and experience on this topic.
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
The LCD doesn't care what speed your controller is running at, it will work regardless of clock speed.
Your FC file should be outputting the letter "U" every two seconds as you have two one second delays in the loop, and the letter "U" should have 10-bits in each "burst". Your scope doesn't suggest that which is why I am trying to establish where the issue lies. In addition it looks like the trace is stretching with each high increasing in length.
If you create a chart as per the link I sent and connect your scope to the output, you should get a clearly defined square wave with a period of one-second. If not we need to establish why.
The one-second flash is probably the most useful troubleshooting technique available and is the best first step to take, especially if using comms.
Incidentally when you used the SendString I see you had SendString("U",8). The number after the "U" and in this case 8, is only to tell FC whether or not to include a Carraige Return when sending the value. 0 means no with any value above 0 being yes. I usually have 0 and include any required termination characters in my string.
Regards
Your FC file should be outputting the letter "U" every two seconds as you have two one second delays in the loop, and the letter "U" should have 10-bits in each "burst". Your scope doesn't suggest that which is why I am trying to establish where the issue lies. In addition it looks like the trace is stretching with each high increasing in length.
If you create a chart as per the link I sent and connect your scope to the output, you should get a clearly defined square wave with a period of one-second. If not we need to establish why.
The one-second flash is probably the most useful troubleshooting technique available and is the best first step to take, especially if using comms.
Incidentally when you used the SendString I see you had SendString("U",8). The number after the "U" and in this case 8, is only to tell FC whether or not to include a Carraige Return when sending the value. 0 means no with any value above 0 being yes. I usually have 0 and include any required termination characters in my string.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good afternoon! Thanks for another lesson about the number 8, as I understand it, there should be either a "0" or a "1", but in this particular case there should be a "0". And for comparing the test on lcd and on led. As for the flash test with the LED flashing, it also flashed in the attached file screen from the oscilloscope.
- Attachments
-
- dso_01_01_00_06_33.jpg (55.57 KiB) Viewed 5493 times
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
I'm not at my PC so can only give brief comment.
That looks like a good square wave so we now know that your clock and connections are good. It is always, always worth checking these at the beginning. You cannot over emphasise how valuable this check is.
Next, we will prove the port. In your flash test chart, change the output pin to whatever you will use for Tx (D0 or D1 I think).
Make sure you get a clean square wave on the pin. If not find out why.
Regards
I'm not at my PC so can only give brief comment.
That looks like a good square wave so we now know that your clock and connections are good. It is always, always worth checking these at the beginning. You cannot over emphasise how valuable this check is.
Next, we will prove the port. In your flash test chart, change the output pin to whatever you will use for Tx (D0 or D1 I think).
Make sure you get a clean square wave on the pin. If not find out why.
Regards
-
- Valued Contributor
- Posts: 784
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 186 times
- Been thanked: 205 times
Re: Download the program for the device via the Internet.
Hi
Back at a PC.
As mentioned that's a good square wave.
Next we "prove" the port we will transmit on.
Using your flasher chart as above, change the output to be D1 as this is the port that will eventually transmit to the ESP. You should get another nice clean square wave.
Once you have that we can move on to the next step, proving everything as we progress to getting the ESP's talking to each other.
Regards
Back at a PC.
As mentioned that's a good square wave.
Next we "prove" the port we will transmit on.
Using your flasher chart as above, change the output to be D1 as this is the port that will eventually transmit to the ESP. You should get another nice clean square wave.
Once you have that we can move on to the next step, proving everything as we progress to getting the ESP's talking to each other.
Regards
-
- Posts: 268
- Joined: Thu Jul 30, 2020 2:01 pm
- Has thanked: 7 times
- Been thanked: 1 time
Re: Download the program for the device via the Internet.
Good evening! I checked how the LED on the Rx and Tx pins would flash (the signal turned out to be smaller on this pin, since there is a voltage divider), it flashed on both pins without incident. Maybe in this example from "help" it is necessary to send the command "AT+GMR\r" or "AT+GMR\r\n" from the controller from the beginning? I will be able to continue on Friday, after 4 p.m.
- Attachments
-
- (Tx)PD1-the signal passes through the voltage divider.jpg (53.04 KiB) Viewed 5448 times
-
- (Rx)PD0.jpg (57.75 KiB) Viewed 5448 times