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 evening! Now I have confirmed that when the LED is connected to pin C0, it stops flashing (does not light at all), there are no pulses on it. And there is our familiar signal on the Tx output.The previous program file is the same, only there the LED is connected to pin C1.
- Attachments
-
- flash_led_test.fcfx
- (11.1 KiB) Downloaded 195 times
-
- The LED is connected to pin C0.JPG (71.13 KiB) Viewed 4092 times
-
- dso_01_01_00_03_56.jpg (60.09 KiB) Viewed 4092 times
-
- 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! There are still a lot of free terminals, if necessary, I can connect the LED to another port in the morning and see what will happen 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
As mentioned something isn't correct. That isn't the correct character being sent and appears to be two characters (if baud and timing are to be believed).
I need to see your FC file to check.
Regards
As mentioned something isn't correct. That isn't the correct character being sent and appears to be two characters (if baud and timing are to be believed).
I need to see your FC file to check.
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 morning! I am sending you 2 programs with different LED connection. They are identical to the previous program, only the names are different.
- Attachments
-
- flash_led_C1.fcfx
- (11.1 KiB) Downloaded 169 times
-
- flash_led_C0.fcfx
- (11.1 KiB) Downloaded 177 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
In your chart "C1" you have in the esp8266 properties Reset Mode = Hardware and this is then set to be C1. This explains why you cannot see the one-second flash on pin C1 as there is conflict.
In an earlier post I suggested setting Reset Mode to Software as this would free up pins and I did suggest to select any free pin. Clearly C1 was not free to be used.
Anyway that explains why you weren't getting anything on C1 and we can move on.
In Build > Project Options you ae using an ATMEGA8 and have delay related timings set to 1MHz. Are you sure you have only a 1MHz crystal attached? This value must match the crystal you are using.
In chart "C0" Reset Mode is again set as Hardware on C1 but as you now have the LED on C0 it will flash OK. However you still have your delay related timings set as 1MHz which I suspect is incorrect.
Double check your settings and try chart "C0" again (with the LED on C0).
Regards
In your chart "C1" you have in the esp8266 properties Reset Mode = Hardware and this is then set to be C1. This explains why you cannot see the one-second flash on pin C1 as there is conflict.
In an earlier post I suggested setting Reset Mode to Software as this would free up pins and I did suggest to select any free pin. Clearly C1 was not free to be used.
Anyway that explains why you weren't getting anything on C1 and we can move on.
In Build > Project Options you ae using an ATMEGA8 and have delay related timings set to 1MHz. Are you sure you have only a 1MHz crystal attached? This value must match the crystal you are using.
In chart "C0" Reset Mode is again set as Hardware on C1 but as you now have the LED on C0 it will flash OK. However you still have your delay related timings set as 1MHz which I suspect is incorrect.
Double check your settings and try chart "C0" again (with the LED on C0).
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! As much as I would like this experiment to finally end with the detection of a problem, you assumed that all the problems are due to the fact that C1 is used for reset, but today I tried to connect the LED to port B1 and the result was the same, there are no pulses on the pin -it does not blink, and there is a familiar signal on the Tx pin. I do not change the frequency of the controller. When I flash the program, I erase only the program itself, and the frequency setting fuses remain unchanged. By the way, you said that I have a 1 MHz frequency of the controller, but what if this is the problem! I'm going to try to set the frequency to 8 MHz and see what happens on the LED. I do not attach screenshot files from the oscilloscope screen, because they are no different from those that I sent you before.
-
- 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
Please reread my earlier posts in which I state quite clearly that the delay related time settings must match the frequency of your crystal.
You cannot expect to have correct timing unless they match and you cannot at all expect communications to work.
Do not try random values. Find the frequency of the crystal being used (most likely marked on it) and enter that value. Nothing else will work......
Regards
Please reread my earlier posts in which I state quite clearly that the delay related time settings must match the frequency of your crystal.
You cannot expect to have correct timing unless they match and you cannot at all expect communications to work.
Do not try random values. Find the frequency of the crystal being used (most likely marked on it) and enter that value. Nothing else will work......
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! Unfortunately, the version about 8 MHz has not been confirmed. The signals are the same-there is a familiar signal on the Tx pin, but there is nothing on the pin where the LED is connected. But then another creative idea was born, but what if sending the "U" symbol was done outside the LED flashing cycle? I will be able to try this version a little later, now I need to move away.
Sorry, I checked the version before I read your answer....You wrote that there is a connection between the delay with which the LED flashes and the frequency of operation of the controller. This is the first time I've heard about this at all, can I drop a link to this material?
Sorry, I checked the version before I read your answer....You wrote that there is a connection between the delay with which the LED flashes and the frequency of operation of the controller. This is the first time I've heard about this at all, can I drop a link to this material?
- Attachments
-
- test_led_PB1_8MGr.jpg (59.55 KiB) Viewed 3997 times
-
- flash_led_B1.fcfx
- (11.1 KiB) Downloaded 149 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
Flowcode Wiki will explain better than I can the setting. FC has no way to know what frequency your chip runs at unless you tell it. If your clock was x-MHz but you tell it y-MHz then all timings including delays and communications will be very, very wrong.
I think when you sent me a correct trace a few days back, you were set at 16MHz (which is I think what most Mega8 run on).
Regards
Flowcode Wiki will explain better than I can the setting. FC has no way to know what frequency your chip runs at unless you tell it. If your clock was x-MHz but you tell it y-MHz then all timings including delays and communications will be very, very wrong.
I think when you sent me a correct trace a few days back, you were set at 16MHz (which is I think what most Mega8 run on).
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! Unfortunately, the quantity has not turned into quality. In all the tried programs, the signal was visible only from the Tx output, from the B1 output where the LED was connected-nothing came. I tried sending the "U" symbol at the end of the program and at the beginning of the LED flashing program, and as in your example, in the middle. At frequencies of 1 MHz, 8 MHz, 1.8432 MHz (external quartz). I even checked the LED flashing separately without the esp8266 software module working-the LED was flashing. Most likely, the problem is in the esp8266 module, but here too, not everything is so clear-the LED does not work in almost all cases (it seems to blink only when connected to pin C1).
-
- 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! You wrote about the possibility of the atmega8 controller operating at a frequency of 16 MHz, I have heard about this possibility, but I do not know how to turn it on...I use an online fuse calculator for avr controllers and there is no such feature there either.
-
- 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 very much doubt if you have a problem with the ESP module.
If you refer back to the posts you made on 22nd of May at 7:50am and 6:50pm you will see that you did at some point have a one-second flash operating correctly. What settings were you using then?
Earlier I didn't have access to my PC, now that I have I see that your chip has as a default a speed of 8MHz.
Build > Project Options is where you will find details
Unless you get this sorted then very little you do will work. There is no point is trying other pins or moving code around as this is a fundamental setting that must be resolved before you can do anything further. Check your crystal is connected correctly and settings.
Until you can get a correct one-second flash operating (on any pin) nothing will work as you hope.
Regards
I very much doubt if you have a problem with the ESP module.
If you refer back to the posts you made on 22nd of May at 7:50am and 6:50pm you will see that you did at some point have a one-second flash operating correctly. What settings were you using then?
Earlier I didn't have access to my PC, now that I have I see that your chip has as a default a speed of 8MHz.
Build > Project Options is where you will find details
Unless you get this sorted then very little you do will work. There is no point is trying other pins or moving code around as this is a fundamental setting that must be resolved before you can do anything further. Check your crystal is connected correctly and settings.
Until you can get a correct one-second flash operating (on any pin) nothing will work as you hope.
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.
Goodnight! I was looking for the moment when you said about May 22 that everything worked there. Unfortunately, I did not find the features of that assembly on the board, but most likely the esp-01 module was connected to the adapter board and, accordingly, to the controller. And then you said that you need to disconnect everything from the Tx and Rx terminals of the controller and I disconnected it, leaving only the wires for the convenience of connecting the oscilloscope. Maybe because of this? As for the frequency setting, where did you send me a screenshot from the screen. I always adjust the frequency there. It's just that if you don't have this program module to work with the avr controller, when you open the file of my program, it will be written there that it may not be displayed correctly and there is a default frequency setting there because of this, and not like mine. I won't be able to answer anymore today, I'll be in touch on Thursday 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
Not used FCv8 for a while, forgot to include this.
Build > Project Options > Configure
Here you can select the clock source from the drop down list.
What crystal are you using? It will usually be marked on the case? Didn't you mention in some post you were using a very low value, around 1.8MHz or the like? Your last chart showed a clock speed of 1MHz but if you are actually using 1.8MHz then as per previous posts you will have issues.
You really need to confirm the value of your crystal and set the clock speed to match.
Regards
Not used FCv8 for a while, forgot to include this.
Build > Project Options > Configure
Here you can select the clock source from the drop down list.
What crystal are you using? It will usually be marked on the case? Didn't you mention in some post you were using a very low value, around 1.8MHz or the like? Your last chart showed a clock speed of 1MHz but if you are actually using 1.8MHz then as per previous posts you will have issues.
You really need to confirm the value of your crystal and set the clock speed to match.
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! In general, if you look from the side of a person who has not used the FC program, but understands a little how the technique works, at the sight of our experiments on sending the letter "U" using the esp-01 module only from the program, but in reality this module is not connected and the controller faithfully sends this letter, this person should have hair on his head to move, and the question in my head is "what's going on here, why the Inquisition doesn't work ...". I decided to conduct an experiment-I replaced the esp8266 module in the program with rs232. They have the same protocol, you say, as if you know...But in reality, sending the letter "U" using rs232 or esp8266 is a different combination of pulses. But! what pleases me is that the LED flashes perfectly when sending the letter "U". I haven't read your letter yet, I'll send mine now and read yours.
- Attachments
-
- Green graph sending U by ESP8266, yellow graph LED.jpg (60.19 KiB) Viewed 3835 times
-
- Green graph sending U over RS232, yellow graph LED1.jpg (59.67 KiB) Viewed 3835 times
-
- Green graph sending U over RS232, yellow graph LED.jpg (61.05 KiB) Viewed 3835 times
-
- 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! Thanks for the hint, but I have never used the FC program settings to program the controller's operation parameters (except for setting the frequency of the crystal in the program), because some kind of special programmer is needed there. And I had TL866CS when I bought it, then I changed it and in theory it now has other letters at the end, but it's not about him. As for the crystal settings, I will now show them in the attached files. Well, in principle, they may differ slightly depending on whether the controller is turned on at low voltage or depends on the start time of the program.
- Attachments
-
- setting fuses to 8 MHz.JPG (113.81 KiB) Viewed 3825 times
-
- setting fuses to 1.8432 MHz.JPG (115.9 KiB) Viewed 3825 times
-
- setting fuses to 1 MHz.JPG (115 KiB) Viewed 3825 times
-
- 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! As for the configuration of avr controllers, here is one of the few links to online resources to quickly set the desired values and not bother reading the instructions too much.: https://www.engbedded.com/fusecalc/
-
- 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 screenshot above, with the yellow trace showing a perfect one-second flash with the green blips every second is exactly what you should have and when you zoom in on the blip you are indeed getting a U. This is good as it means your chip is running at the correct clock speed, which is extremely important. I cannot over emphasise enough the importance of correct clock settings and a one-second flash test to verify. If this very simple test fails then you cannot expect anything else to work correctly. It's like running out of petrol in your car and expecting to get it working again by inflating the tyres...
Take note of whatever settings you used to obtain these traces including the associated Flowcode ones as clearly they are correct for your chip with whatever crystal you are using. Can you post your FC chart too, the one that gave you these correct traces?
Regards
Flowcode can pretty much do all you need to get things running but as I've said before I'm not an expert on an ATMEGA8 and I have never programmed one other than on a development board such as early arduino. I'm unfamiliar with programming directly.I have never used the FC program settings to program the controller's operation parameters (except for setting the frequency of the crystal in the program), because some kind of special programmer is needed there
The screenshot above, with the yellow trace showing a perfect one-second flash with the green blips every second is exactly what you should have and when you zoom in on the blip you are indeed getting a U. This is good as it means your chip is running at the correct clock speed, which is extremely important. I cannot over emphasise enough the importance of correct clock settings and a one-second flash test to verify. If this very simple test fails then you cannot expect anything else to work correctly. It's like running out of petrol in your car and expecting to get it working again by inflating the tyres...
Take note of whatever settings you used to obtain these traces including the associated Flowcode ones as clearly they are correct for your chip with whatever crystal you are using. Can you post your FC chart too, the one that gave you these correct traces?
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 really liked your phrase about tires and gasoline, it's funny, but it often happens in life. I will now attach a program to you where, as you said, the graphs look beautiful, but once again I want to say that there I use the uart module in the program, but I can't get good results with the esp8266 module...
- Attachments
-
- flash_led_B1_rs232.fcfx
- (9.24 KiB) Downloaded 109 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
The chart shows exactly what I would expect it to contain, and your crystal is clearly 1.8432MHz.
Can you do the following
Help > Check For Updates and ensure Full Database is checked and then update Flowcode.
This will make sure you are up to date.
Next, using the same "working chart" you just shared, that uses the UART component, can you delete the UART component and replace with the ESP8266 component.
Everything else in your chart should be the same, just replace the UART with ESP.
Once done, can you rerun your test and share the traces and chart?
This will help establish where the issue lies.
Regards
The chart shows exactly what I would expect it to contain, and your crystal is clearly 1.8432MHz.
Can you do the following
Help > Check For Updates and ensure Full Database is checked and then update Flowcode.
This will make sure you are up to date.
Next, using the same "working chart" you just shared, that uses the UART component, can you delete the UART component and replace with the ESP8266 component.
Everything else in your chart should be the same, just replace the UART with ESP.
Once done, can you rerun your test and share the traces and chart?
This will help establish where the issue lies.
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! Unfortunately, there are no changes for the better. There is a signal on the Tx pin, there is no signal on the B1 pin, the LED does not blink. I don't have any new program updates. I tried to change the parameter of the esp8266 module. There is a setting for how commands end, it usually stood \r\n-the signal turned out to be longer than with \r-this can be seen in the attached drawings.
- Attachments
-
- Properties-Command Terminal-..r..n.jpg (61.7 KiB) Viewed 3739 times
-
- Properties-Command Terminal-..r.jpg (58.64 KiB) Viewed 3739 times
-
- flash_led_B1_esp8266.fcfx
- (11.1 KiB) Downloaded 115 times
-
- 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 here you can see what errors occur during compilation, maybe something is not working correctly?
- Attachments
-
- error compiler.JPG (86.99 KiB) Viewed 3739 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
When I shared my traces with you I was not using your chip but my chart was pretty much as yours so we can discount the commands. Also I was using FCv10. If I get time I'll try using v8.
As I don't have your chip I cannot test for myself, but from the tests we have done there certainly seems to be a problem. I cannot explain why you are now unable to flash B1 nor why your sendstring is not sending out the correct character. It maybe a "bug" which given that v8 is no longer supported may go uncorrected.
Have you considered upgrading to FCv10? It is free and supported.
You can of course continue to use the UART component instead of the ESP8266 but depending on what you wish to do things can get complicated. Using the UART means you need to send individual "AT" commands and capture and interpret any relevant replies. You will most certainly need a copy of the "AT" commands and have an understanding of how to use them.
Also, to capture incoming data you should look at the RxInt command and the Circular Buffer component and examples as you will most likely need to use these too.
What components do you intend to use in your chart (e.g. UART / 16 x 2 LCD / pushbutton etc)?
Regards
When I shared my traces with you I was not using your chip but my chart was pretty much as yours so we can discount the commands. Also I was using FCv10. If I get time I'll try using v8.
As I don't have your chip I cannot test for myself, but from the tests we have done there certainly seems to be a problem. I cannot explain why you are now unable to flash B1 nor why your sendstring is not sending out the correct character. It maybe a "bug" which given that v8 is no longer supported may go uncorrected.
Have you considered upgrading to FCv10? It is free and supported.
You can of course continue to use the UART component instead of the ESP8266 but depending on what you wish to do things can get complicated. Using the UART means you need to send individual "AT" commands and capture and interpret any relevant replies. You will most certainly need a copy of the "AT" commands and have an understanding of how to use them.
Also, to capture incoming data you should look at the RxInt command and the Circular Buffer component and examples as you will most likely need to use these too.
What components do you intend to use in your chart (e.g. UART / 16 x 2 LCD / pushbutton etc)?
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
Following on from the above, as I and others have used the ESP8266 in FCv8 it is unlikely the strange results you are seeing is component related as it would have been apparent well before now, but it could possibly be chip related. Do you have any other non ATMEGA8 chip to try? It is a very old chip which has (I believe) been discontinued so you would benefit by a more modern and supported design.
You could also try using FCv10 which is free. You have nothing to lose by trying it.
Regards
Following on from the above, as I and others have used the ESP8266 in FCv8 it is unlikely the strange results you are seeing is component related as it would have been apparent well before now, but it could possibly be chip related. Do you have any other non ATMEGA8 chip to try? It is a very old chip which has (I believe) been discontinued so you would benefit by a more modern and supported design.
You could also try using FCv10 which is free. You have nothing to lose by trying it.
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 morning! I was also thinking about newer versions of the FC program today...but I thought it was a good thing that I didn't buy them, there would be the same jambs in the program, but for a lot of money and maybe a better interface. Yes, I downloaded version 10, but did not install it. We have a limited set of chips in our store, if you order something, you have to wait until 1-3 months when the right chip arrives and then face the same problems. Or do you want to say that you are making a program in version 10 and everything works for you on a real board? If you think that the Atmega 8 controller or similar is so bad, no question! let's take the pic controller that you worked with, the power harness just needs to be changed and I've never worked with them, but with your help I hope to illuminate with the spotlight of your knowledge, skills and abilities that deep dark and endless abyss of my technical ignorance! so as not to reinvent the wheel. You wrote about the free upgrade of the FC program to version 10, I haven't heard anything about it. Is it necessary to delete this professional version and install a professional one too, with support for all chips and frame blocks, or a stripped-down demo for several chips?
I'm going to use the same components on the board and in the program as before: lcd1602, esp8266 module.,uart or rs232 ,the conclusions with which you can measure the voltage are at least 4, as I wrote several buttons (2-3 pcs) and so that all this wealth is desirable on 1 chip.
Well, or alternatively, try some simple and small pic controller with two rs232 pins-one channel will be used for communication with the esp-01 module, and the other for communication with atmega8.
I'm going to use the same components on the board and in the program as before: lcd1602, esp8266 module.,uart or rs232 ,the conclusions with which you can measure the voltage are at least 4, as I wrote several buttons (2-3 pcs) and so that all this wealth is desirable on 1 chip.
Well, or alternatively, try some simple and small pic controller with two rs232 pins-one channel will be used for communication with the esp-01 module, and the other for communication with atmega8.