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: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

With FCv10 it is entirely free for hobbyist use and comes with many "free" chips to use from most families (e.g. PIC) however if the chip you want to use isn't included in the free offerings then you would need to purchase the chip pack itself. Note though that ALL components are now free.

More details of free chips can be found here https://www.flowcode.co.uk/free/ and of course from the website.

I used a PIC16F18877 when I captured the traces on hardware simply because it was already in my programmer but if I get a chance I'll try it using FCv8 to see if there is any difference and if I find it, I think I have something running a 328P which I believe is directly compatible with the MEGA8. I won't be able to test on an ATMEGA8 though.

I appreciate that access to components can be very limited depending on country, and also more expensive too, so if you give me an idea of what's available to you at a reasonable price I can perhaps offer some further advice, and if I have the chip I can test it to ensure it doesn't throw up any surprises.

Over the weekend I'll try and send you a couple of things to try using the UART to talk to the ESP8266. Do note though that the microcontroller must connect directly with the ESP8266, it does not connect via any adapter or the like.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good evening! Yeah, I see-in other words, I need to look at what we have in the store, and you see if these controllers will bring any surprises. And you say that you cannot use any adapters between the controller and the esp8266 module. I meant that in some tasks the esp8266 module will work quite rarely, and therefore I suggest trying to use two controllers, one avr to solve some tasks, and the other pic controller will only receive or send data using the esp8266 module and then transmit them via another rs232 channel to the main controller...Or is it too complicated and not practical and it is better to use one controller for all tasks?

Unfortunately, I can't view the available controllers quickly, plus work breaks, I'll look at it approximately by Wednesday-Thursday evening. I really hope that with the new match everything will work faster. And it's probably easier for you to work with pic controllers and I'll find out how to work with them.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

Generally speaking using one microcontroller would be preferable.

When I first decided to use microcontrollers I bought FCv3 plus some hardware from Matrix to get me up and running and I think it came with a PIC16F877A, so I kind of grew up with PICs :) I usually play with either a PIC16F1939 or 16F18877 simply because they are usually already in my programmer and are reasonable general purpose chips. No need for external crystals as they have internal oscillators that are stable enough for most of my needs. They usually get used to "prove a concept" and then I'll choose a more appropriate chip.

In the long term, using a more up to date chip will prove better for you as the MEGA8 really is an old chip now, and you would be better off learning to use something more current, and if you are more comfortable using AVR then they have plenty of offerings.

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

Have a read through these posts.

https://www.flowcode.co.uk/forums/viewt ... f=3&t=1774

They may prove helpful in your project as two PICs talked to each other via esp8266 (I'm not saying only PICs work, it's just an example).

Ignore all the sensor stuff and just look at the "talking" to the ESP's part.

I found an ages old project that used an ESP8266 written in FCv6. My thoughts at present, admitting that I'm no ATMEGA8 expert, is that the issues you see could very well be chip related. I see no reference to these issues in the forums until now.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good evening! I am now in the throes of choice, I found pic controllers that will fit into the already soldered DIP28 panels, I also found them with even fewer pins and suitable functionality. But since you say that using two controllers is not a good idea, so I also reject this idea. In addition, pic controllers that have 2 uart outputs are too large-centipedes...and they have a lot of things I don't need and the price is high. It remains to see the functionality and availability of what we have in stores, but...everything can go wrong and you will have to choose from what you have and solder the panel where the controller is inserted. In addition, I found an interesting feature in pic controllers with a uart bus. Do they have any other synchronizing output!? AVR controllers have only Tx and Rx pins. So it will no longer be possible to use one pic and one avr, but I have already written about the size of the controllers.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

Most modern microcontroller can handle all the expected protocols such as (but not limited to) UART / RS232, SPI and I2C and many have multiple channels (e.g. two or more UART etc).

I didn't get a chance to try my chart in v8, but as I've used the component since v6, albeit not with a MEGA8, I'm not really expecting issues.

The posts I referred to show two PIC talking using the ESP8266 component, but as that component doesn't work for you it would need to be changed to using the UART and sending AT commands directly.

Do you only wish to display your transmitted values or do something else with them?

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

Further thought.

If you are concidering moving to a more up to date chip, why not check that it is included in the "free" chips that come with FCv10? That way you can use the latest version of Flowcode too.

Seems pointless to me to "learn" a new chip and not use the latest FC.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good afternoon! The solution for receiving and transmitting data over wi-fi using the esp8266 module can be used in several projects (if of course it turns out) in one, data will be transmitted and written to memory without the ability to view them during reception, in another case they can and will need to be seen, in the third case they are preferably somewhere on the computer record it with subsequent display, in the fourth case, the esp module, upon the occurrence of some event, will have to access the network and send a free text message. In reality, everything will depend on my capabilities and the relevance of the proposed. I chose the PIC16F876A chip, it is on sale. But I've never worked with a pic controller, so I don't know how to connect and configure it. I hope we can use your controller and your FC to repeat your success on the version of the controller that I wrote about above and in FC8. But if anything, let me take only 1 piece so far to test it using the "flash led test".

I looked at the controllers that are available in the free FC10 version, we do not have such on sale.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

The 876A is the little brother of the 877A, a ubiquitous chip if ever.

Do you have a programmer for PIC chips? If not you may need to factor in that cost too. As you already have a programmer for your MEGA8, would that not also do a 328P? Maybe a 328P is an available option for you?

With the PIC, I'm sure you will have a learning curve but in my opinion it isn't too steep. As mentioned when I started I bought hardware from Matrix which included the 877A and within ten minutes or so of installing FC and getting the hardware connected I'd a one-second flash running.

Whilst I don't have the 876A I have used many 877A chips. In terms of memory they are quite modest though compared to newer chips.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good evening! Yes, I looked in the store, they have such an atmega328p chip for sale, my programmer will be able to program it-I just looked at it, and the FC program and your knowledge, skills, abilities and desire to help developers of different levels will help me make future projects. And chasing the most sophisticated chips is a hopeless occupation-the people who develop these chips and write documentation for them are much more specialists than all users of the FC program...In addition, the finished product is appreciated not by a fancy chip, but by its usefulness and demand. And people are not interested in how it works, even on ferrite memory cells or springs with blocks and ropes. Previously, experts made mechanical robot dolls when they didn't even know about electricity.

So we choose atmega328p for the project? but I'll only buy 1 piece for now, otherwise something might go wrong.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

The Arduino Uno and Nano both use that chip so if there are issues they should be well documented. I do have something using a 328P so I will try and look it out and test with an ESP8266.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good evening! I will be able to find out if it is worth using the atmega328p chip only on Wednesday, after 13 o'clock. If everything goes well with you, then I will be able to purchase it on this day and try to connect and check it.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

I'll try and test tomorrow night, but can't guarantee as I need to find the chip first.

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

I think I have an Arduino Uno R3 (somewhere) and possibly a Nano too, which use 328's but I need to dig them out.

This might be easier for you as it is pretty much a replacement for the MEGA8, so hopefully your programmer will work with them too.

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

This morning I tried the ESP8266 component with an UNO-R3 which uses a 328P microcontroller.

Same as before, a loop containing a one-second flash and outputting "U" on Tx port.

No issues at all.

UNO_R3-1s.jpg
UNO_R3-1s.jpg (47.56 KiB) Viewed 719 times
UNO_R3-zoom.jpg
UNO_R3-zoom.jpg (43.99 KiB) Viewed 719 times
R3_esp.fcfx
(10.32 KiB) Downloaded 22 times

So we know that the 328P can work with the ESP8266 component. Hope this helps.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good afternoon! Thanks for testing this chip, I'll try to get it out today, connect it and check it as well. But for you, sending the letter "U" looks like you were sending not from the esp8266 module, but using the uart bus. When you send from the cp8266 module, pulses of different lengths are obtained there, and on the uart bus the pulses have the same duration, although both modules send data over the same bus.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

I'm not sure I understand what you mean. These signals are obtained from the Tx pin of the microcontroller (and the pin I designated for flash test).

The microcontroller uses pins D0 and D1 to communicate via it's UART. When you add in a UART component in FC then the component as part of initialisation takes control of these pins.

I did not use the UART component I instead used the ESP8266 component. As this component uses the same Tx and Rx pins as the UART would, it similarly takes control of pins D0 and D1. So now the esp8266 component is using these pins to communicate, not the UART component.

The connections from the microcontroller to the actual esp8266 module use the Tx and Rx pins of the microcontroller and these connect directly to the corresponding Rx / Tx pins of the module.

Nothing else should be in the circuit between them, just direct connections.

Micro -- ESP8266

Tx -- Rx
Rx -- Tx
Gnd -- Gnd

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good afternoon! I don't agree with you about the connection issue. Because the atmega328p signal level (5 volt power supply)it differs from the signals of the ESP8266 module (3.3 volt power supply). The signal from the Tx output of the controller must go through the voltage divider and on to the Rx output of the esp8266 module.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

Sorry, you are quite correct regarding the voltage divider between microcontroller Tx and the esp8266 Rx.

I was really meaning that no other device should be between them.

Good luck with your tests.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good evening! You just can't imagine what just happened!!! Imagine it was possible to run the flash led test on the atmega8 controller. The voltage diagrams are correct and the LED is flashing. The program is almost the same: the controller is connected to the esp8266 module, but I decided to check the crazy version that came to my mind-I just initialized the rs232 module in this program. He is not involved in the program cycle yet, you can continue further! I suggest you enjoy the elegance of stress graphs.
Attachments
yellow is the flashing of the LED, green is the sending of the letter U_1.jpg
yellow is the flashing of the LED, green is the sending of the letter U_1.jpg (59.7 KiB) Viewed 677 times
yellow is the flashing of the LED, green is the sending of the letter U.jpg
yellow is the flashing of the LED, green is the sending of the letter U.jpg (60.28 KiB) Viewed 677 times
flash_led_B1_esp8266_rs232.fcfx
(12.97 KiB) Downloaded 10 times

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

Whatever it is you did, keep doing it... :lol:

Exactly as you should have. I can only guess that there may be an issue in initialising the esp8266 on the ATMEGA8. A test to confirm would now be to remove the UART and see what happens.

Anyway, you now have working options :)

Good stuff :)

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

Remember to set the FC esp component back to 115200 baud when you connect to the esp module.

I only had it at 9600 for testing.

Regards

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good afternoon! I conducted an experiment with disabling the uart initialization module-the result is also positive, but so far I have conducted the test at a speed of 9600.Now I will do the same at a speed of 115200. Yes, I also wanted to say that I did not remove the uart module itself from the program. Yes, I forgot to say that sending the letter "U" in this program looks like the uart module is working, not the esp8266 module.
Attachments
flash_led_B1_esp8266_rs232.fcfx
(12.98 KiB) Downloaded 12 times

gilanetugila
Posts: 268
Joined: Thu Jul 30, 2020 2:01 pm
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Download the program for the device via the Internet.

Post by gilanetugila »

Good afternoon! I have now checked the sending of the letter "U" at a speed of 115200. The result is also positive, the signals are the same and the LED is flashing.
Attachments
flash_led_B1_esp8266_rs232.fcfx
(12.83 KiB) Downloaded 11 times

chipfryer27
Valued Contributor
Valued Contributor
Posts: 773
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times
Contact:

Re: Download the program for the device via the Internet.

Post by chipfryer27 »

Hi

I really can't explain other than a possible bug specific to the chip.

Anyway, as you can now communicate using the esp component you should be able to "talk" to the esp :)

Regards

Post Reply