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

Looking at your screenshot you are doing well. This is exactly as I'd expect as you are sending from chip and it is being received by the Terminal program.

All is good :) :)

Next I'd suggest you modify the SendString command to instead of sending "U" it sends "U\r\n"

You should now get

U
U
U
etc

Once you are comfortable sending from chip to PC we will modify your chart so the chip can receive data you send from the PC to the chip. There are a few ways to do this and I'll give brief examples of a couple. It is better to understand these concepts now before progressing to the module.

Regards

PS
My view is that any post is valuable. Just because something doesn't work as hoped doesn't mean it is worthless. Others may have similar issues to you and may think on giving up, but perhaps after reading of your experiences they will continue. The issues you faced updating the firmware, which did stump me for a bit, did get resolved and I know the posts have been helpful to others. Had you not faced these issues I'd never have explored the issue further and perhaps it wouldn't be documented for others.

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! Here I did as you showed. It worked again.
Attachments
2.JPG
2.JPG (55.54 KiB) Viewed 466 times
Atmega328p_flash_led_test_send_U_1.fcfx
(11.5 KiB) Downloaded 9 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

Excellent :)

Take note of how you connected everything together, connections, settings, everything. Do note that although you are using Terminal Com Port 3 just now, this may change when you next insert the adapter, or use another USB port on your PC.

Next we can look at sending from your PC to the chip.

You can use "receive string" or "receive character" etc but one of the easiest and most reliable of ways is to use an Interrupt and a Circular Buffer.

Have a look at the WiKi pages for these components and I will create an example chart for you to try.

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! Sorry, I won't be able to do this in the near future, it seems I'm sick and that's why I have a mess in my head...

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 look at the attached file Echo_Test

Echo_Test.fcfx
(11.73 KiB) Downloaded 10 times

In this chart we still flash the LED in the Main loop, but we also use the UART and an Interrupt.

The purpose of this chart is for you to connect your PC to the chip as before (Tx-Rx / Rx-Tx) and then using Terminal, whatever you type in Terminal should be received back. The chip will simply echo whatever it receives back out.

The program will simply flash the LED as before, but when you send a character from Terminal (e.g. the letter "A" or anything) then the chip will detect the reception of such and branch to the ISR_Rx macro.

In the ISR_Rx macro we simply receive the character then immediately send it back out (re transmit it). That's all it does. Whatever you type in Terminal should be returned to you.

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

Sorry to hear you are unwell. I hope you get better soon..

Regards

Post Reply