Download the program for the device via the Internet.

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

Great, all pins / connections / settings work as expected.

Now we will verify component functionality. Change the flash output to a pin not being used by the ESP8266 Tx / Rx (example change to C1)

Add in the ESP8266 component and in properties set it for 9600 baud with Tx on D1 (or whatever your Tx output pin is)

In your flash chart, at the beginning initialise the component.

In the main loop, just after you set the Flash output pin high (C1), add in the following ESP8266 command
SendString("U",0)

Connect your scope to trigger on Ch1 and connect Ch1 to flash output pin (C1)
Connect Ch2 of your scope to D1 (or whatever the Tx output pin is)

Now when you run your chart the scope will trigger with the one-second flash and also capture what is being sent out on the Tx. You should see on Ch1 your square wave as before with a little "blip" on Ch2 each time Ch1 triggers.

If you then zoom in on Ch2 you should see a pulse going low, then a square wave returning high at the end.

Regards

gilanetugila
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.

Post by gilanetugila »

Good evening! In the tests according to your methodology, something went wrong, it probably immediately becomes clear to you... The LED has stopped flashing. In the screenshots from the screen, the signal from the Tx controller is yellow, and the green is the signal from the LED (output C1 of the controller).
Attachments
dso_01_01_00_08_29.jpg
dso_01_01_00_08_29.jpg (63.44 KiB) Viewed 4298 times
dso_01_01_00_09_21.jpg
dso_01_01_00_09_21.jpg (66.08 KiB) Viewed 4298 times
dso_01_01_00_07_11.jpg
dso_01_01_00_07_11.jpg (63.8 KiB) Viewed 4298 times

gilanetugila
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.

Post by gilanetugila »

Good evening! and here is the program itself.
Attachments
flash_led_test.fcfx
(11.33 KiB) Downloaded 186 times

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

I think I see the issue.

Lets make the settings / connections as follows

Flowcode ESP8266 Settings
Tx = D1
Rx = Don't Care / Unconnected
Reset Mode = Software

ESP SendString macro
Text = "U"
SendCR = 0

LED
Any unused pin you want e.g. C0

Ensure your clock speed matches your crystal. In your chart it was 1MHz but you usually have it at 16MHz (possibly a typing mistake).

Connect your scope ch1 to LED pin (C0)
Connect scope ch2 to Tx Pin (D1)

Set your scope to trigger on ch1 (pin C0) on a rising edge with a time base of 500mS. This should give a nice clean square wave on ch1 with "blips" on ch2.

Once you capture the above, zoom in on ch2 and you should see pulses.

Regards

EDIT...
PS
You don't have the ESP or anything connected to the chip do you (other than crystal and other life-support)?

gilanetugila
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.

Post by gilanetugila »

Goodnight! I've just done what you recommended. The green graph shows the signal from the Tx output of the controller, and the yellow one from the LED. The Rx pin is disconnected from the controller.
Attachments
dso_01_01_00_05_50.jpg
dso_01_01_00_05_50.jpg (61.46 KiB) Viewed 4253 times
program and element settings esp8266.JPG
program and element settings esp8266.JPG (116.33 KiB) Viewed 4253 times
flash_led_test.fcfx
(11.32 KiB) Downloaded 165 times

gilanetugila
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.

Post by gilanetugila »

Goodnight! additional screenshots of the signals.
Attachments
dso_01_01_00_06_49.jpg
dso_01_01_00_06_49.jpg (63.85 KiB) Viewed 4249 times
dso_01_01_00_05_40.jpg
dso_01_01_00_05_40.jpg (61.4 KiB) Viewed 4249 times

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

I'm not familiar with your scope. Are you sure you are set to trigger on ch1 (yellow trace)?

Irrespective of such, your Tx pin trace doesn't look correct.

Can you confirm nothing other than your scope is connected to your Tx (D1) pin?

Regards

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

Your microcontroller should have the following connections for these tests (other than power / crystal / programming etc)

Pin 2 (D0) = Rx - unconnected
Pin 3 (D1) = Tx - connect to ch2 of Scope - nothing else connected to this pin
Pin 23 (C0) = connect to ch1 of Scope - nothing else connected to this pin

The Ground of each Scope channel should be connected to the microcontroller Ground.

Test-1
Only connect ch1 to microcontroller (pin C0)
Set the Scope to trigger on ch1, rising edge, with a suitable time base to capture your one-second flash. If you use the "Autoset" feature of your Scope take note of time base settings.

Each time your press "run" this should give you the square wave as before.

Test-2
Now connect ch2 of your Scope to pin 3 (D1)
Do not change any other scope setting. Do not press "Autoset". All settings should be the same as Test-1

Each time you press "run" this should give you the square wave as before on ch1 with "blips" on ch2 each time ch1 goes high. If not make sure your settings are the same used in Test-1 (triggering on ch1 rising edge and same time base).

Regards

gilanetugila
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.

Post by gilanetugila »

Good morning! Thank you again so much for helping me solve these technical problems! Now I looked at my board, the output of the Rx controller is disconnected on it (the wire is soldered off), and the output of the Tx controller goes to the board (to the voltage divider), and from it one wire goes to the esp-01 module (you didn't say to disconnect it), and I use the other wire to connect to the oscilloscope.

The "ground" pin of the oscilloscope pins CH1 and CH2 are connected to each other and in the video recommendations for using the oscilloscope it was said if there is one circuit and it is necessary to check the signal at two points, then it is enough to use one "ground" pin.

Due to the newly discovered circumstances, I ask you to adjust the troubleshooting task or confirm the previous two posts.

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

As we are seeing unexpected things on the traces, we need to move forward a step at a time to establish where things go wrong.

If you could redo the tests with nothing but the scope leads connected to the microcontroller as per above that would be a big help.

I'm unfamiliar with your scope, but I would normally connect each ground lead as "good practise".

I have a few things to do today but I will check back during the day.

At present it seems like an issue with connections (somewhere) so these tests will help isolate where.

Regards

gilanetugila
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.

Post by gilanetugila »

Good afternoon! My results are bad. I did it step by step, as you have written.

In 1 case, I don't have any signals at all, just a straight yellow line. For some reason, the LED does not blink in this program and there are no signals on the C0 pin.

In the 2nd case, there are small pulses on the Tx pin at the same settings as on channel 1. The ESP-01 module was removed from the adapter board in these experiments. In the 2nd case, I used the "ground" pins of the oscilloscope channels as you requested.
Attachments
dso_01_01_00_16_49.jpg
dso_01_01_00_16_49.jpg (58.48 KiB) Viewed 4197 times

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

In the screenshots your time base seems to be 200mS per division which means five divisions per second. Looking at your green trace you can see that each high / low change is one second in length suggesting that it is your "led" pin (C0). However I don't understand why the level of a "high" is only roughly about 0.4v.

What are your scope settings? Are your probes set to 1x or 10x?

Can you try the following?

On your scope only enable ch1, ch2 will remain disconnected and not used.

Connect ch1 to C0 and press "autoset" and capture.
Connect ch1 to D1 and press "autoset" and capture.

Regards

gilanetugila
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.

Post by gilanetugila »

Goodnight! It's already today, I'll be able to check the versions and write on Monday after 4 p.m. It's good that you clarified the scale of the oscilloscope's conclusions! CH1 had a scale of 1:1, and CH2 -1:10, but everything was fine before, probably touched by accident. There are small pulses on the graph-this output of the oscilloscope was connected to the output of the controller. And there was nothing visible on the C0 output, because the scale accidentally became 1:10 ... I'll double-check it at the same time on Monday.

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

OK so we can now explain the levels. Easy done and if I've not used my scope for a while I too usually have something not right :)

Regards

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

This is what I'm expecting to see when you "scope" the pins.

Triggering on rising edge of "LED" pin (C0).

Trace-1.jpg
Trace-1.jpg (49.01 KiB) Viewed 4148 times

You can see the one-second flash on the first trace and each time it rises you can see the "blip" on the second trace. In the screenshot you can see two "blips" and I have set up to analyse the trace. On the right of the screenshot you will see I decoded 2 x "U" characters.


In this next screenshot I have zoomed in on the "blip" and you can see the train of pulses that make up a "U".

Zoom.jpg
Zoom.jpg (48.04 KiB) Viewed 4148 times

You can clearly see the start bit, data bits and stop bit that makes up the transmission. Importantly you will see that this output idles in a high condition, going low at the start then returning to high at the end. I did not see this in your traces which is why I'm asking you to take things a step at a time to find out why.

Regards

gilanetugila
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.

Post by gilanetugila »

Good afternoon! Unfortunately, the miracle did not happen. Pin C0 is still empty-it looks like a line at 500ms and 2 volts and looks like a saw at 50ms and 50 millivolts... when I connect another pin to Tx, there is still a rectangular signal. I tried to connect the output of the oscilloscope CH1 to the output C0-it showed nothing there and to the output Tx -there is a rectangular signal. For some reason, everything is bad with C0 when the esp-01 module is running in the program...I am sure that without this module, the LED will flash and the signal will be normal. Why did you decide to connect the LED to pin C0 where it does not work, but left pin C1 or C5 where the LED worked? Maybe it's some kind of glitch in this controller, maybe try it on the same other one? Another point: on your graph, the sending of the letter "U" signal goes over the UART or RS232 bus, and my program uses the esp-01 module ... in other words, perhaps if I sent the letter "U" using the rs232 controller, I would have the same graph on the Tx output ...?
Attachments
dso_01_01_00_17_05.jpg
dso_01_01_00_17_05.jpg (62.76 KiB) Viewed 4103 times
dso_01_01_00_21_53.jpg
dso_01_01_00_21_53.jpg (59.01 KiB) Viewed 4103 times

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

Unless you clearly identify each trace I won't know what it refers to.

If you reread my posts above I asked for nothing to be connected to your chip pins other than scope probes (and essential life support such as crystal etc). Is this the case or is the esp8266 module still connected? If so please disconnect so nothing at all is connected to the pins except the scope probes. Nothing on pins D1 (Tx), C1 (Hardware Reset) or C0 (LED flash pin).

You are free to choose any free pin for the "LED flash" you want, I simply chose C0 as it isn't used by the esp8266 component.

We have established that your clock is correct and you can "flash" certain pins. We can't really test further unless the pins in question are not connected to the esp8266 or anything else. I am at a loss to suggest why you are getting these traces so we need to test.

Please ensure nothing is connected to D1 (Tx), nothing is connected to the pin you choose for LED flash, and your FC chart is set up to flash the correct pin.

I have no reason yet to suspect any issue with the component and these tests will help point to where the issue lies. I suspect you may still have left the esp8266 connected as instead of 5v it looks like 3.3 via your divider.

Regards

gilanetugila
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.

Post by gilanetugila »

Good evening! I have the esp-01 module disconnected from my board and nothing is connected to the Tx pin except the voltage divider (it makes 3.2-3.3 volts of 5 volts) volts. In the voltage divider, at the midpoint, I have a soldered wire and I remove the Tx signal from it. In the figure where the "saw" is shown, this is a high-magnification signal from the C0 output, where two signals are a straight line, this is the C0 output, and a rectangular signal is from the Tx output.

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

If only the voltage divider on D1 then that's OK, I can understand the connection. Pin to ground via two resistors and you take readings from the junction of the two resistors. We can forget about that part now. ESP or the USB=TTL should not be connected to the microcontroller.

However if you are getting the one-second square wave on that pin, then double check your FC chart. Your chart should be something like this (for flashing C0, change to suit yourself).

Start
Initialise ESP8266
Begin Loop
Output 1 on port C0
ESP SendString macro ( Text = "U" SendCR = 0 )
Delay one second
Output 0 on port C0
Delay one second
End Loop

With your scope make sure both probes are set the same (e.g. 1x) and both ch1 and ch2 are enabled.
Set your scope to trigger on ch1 rising edge. Set the trigger level to be around 1v
Connect ch1 probe to port C0 (or whatever you use) and the scope Ground to the microcontroller ground (0v)

Connect your scope ch2 to port D1 (Tx) with it's Ground connected to the microcontroller ground (0v).

If your connections and chart are correct you should see something like the traces I shared.

Regards

gilanetugila
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.

Post by gilanetugila »

Good evening! Now I tried to rearrange the LED to pin C5 and the Tx pin turned out to have a signal similar to yours. In the figure, yellow is the signal from the C5 output, and green is from the Tx output. It's up to your new letter!
Attachments
dso_01_01_00_08_45.jpg
dso_01_01_00_08_45.jpg (61.53 KiB) Viewed 4024 times

gilanetugila
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.

Post by gilanetugila »

Good evening! My program is the same as you described. Now I'll try to move the LED to other points and see what kind of signal it will be.
Attachments
my programm.JPG
my programm.JPG (62 KiB) Viewed 4015 times
flash_led_test.fcfx
(11.33 KiB) Downloaded 261 times

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

Some progress but you need to check your settings.

Can you share a trace showing the one-second square wave AND the Tx pin? I want to see the square wave and the "blip" like in my first trace.

The character captured is not a capital u (U). Is your clock correct and what is your baud?

Regards

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

Just a thought, did you set your scope to trigger before you ran your chart? If so you may have caught part of the initialisation sequence.

Start your chart and do a single trigger on your scope. Once it captures something set it to trigger again. The next trigger it receives MUST then be part of the loop.

Regards

gilanetugila
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.

Post by gilanetugila »

Good evening! Now in the program I connected the LED to pin C1, the signals on the Tx pin are the same as yours, and for some reason there is a pulse on pin C1 of a very long duration, but the LED is already on, but not for 1 second, but for a long time. The transfer rate is 9600.Unfortunately, it is not possible to take a good picture on the output of C1 and Tx. It turns out well either there or there. Now I will try to connect the LED to C0.I set up the trigger when the program was already running. It's just that there are different pulse durations and everything does not fit together.
Attachments
dso_01_01_00_07_39.jpg
dso_01_01_00_07_39.jpg (60.26 KiB) Viewed 3994 times
dso_01_01_00_06_41.jpg
dso_01_01_00_06_41.jpg (58.39 KiB) Viewed 3994 times
my new programm.JPG
my new programm.JPG (69.13 KiB) Viewed 3994 times

chipfryer27
Valued Contributor
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.

Post by chipfryer27 »

Hi

I think you have settings wrong somewhere.

If you were set to trigger on the LED going high you would capture something like I shared and the time base would show the period as one-second, not the 10mS in your display.

Can you send me the FC file?

Regards

Post Reply