UART "SendString" command problem [SOLVED]

For general Flowcode discussion that does not belong in the other sections.
Sasi
Posts: 91
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 12:11 pm
Has thanked: 36 times
Been thanked: 9 times

Re: UART "SendString" command problem

Post by Sasi »

Hi Martin,

Thank you very much for trying it out.
Would you be so kind to attach the .fcfx, .c, and .h files from the program compilation results to the post.
I would like to compare them with what I get as a compilation result.
Regards,
Sasi

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: UART "SendString" command problem

Post by medelec35 »

Sure - files attached as requested.
Attachments
UART_Test_2_NOT Working.h
(9.02 KiB) Downloaded 10 times
UART_Test_2_NOT Working.c
(55.64 KiB) Downloaded 10 times
UART_Test_2_NOT Working.fcfx
(17.49 KiB) Downloaded 10 times
Martin

Sasi
Posts: 91
Joined: Wed Dec 02, 2020 12:11 pm
Has thanked: 36 times
Been thanked: 9 times

Re: UART "SendString" command problem

Post by Sasi »

Sorry, I would like to request the .hex extension instead of .h. :oops:

celebriums
Posts: 42
Joined: Fri Dec 18, 2020 7:33 am
Has thanked: 23 times
Been thanked: 7 times

Re: UART "SendString" command problem

Post by celebriums »

Dear Sasi
Can you remove the processor and try with a new processor? Maybe your processor is failing due to static electricity or something like that.
I can understand that you are overwhelmed by this problem, it's very frustrating.
I am asking to be sure of the oscillator speed of your processor, is the 1 second led blink test positive? Please test it on an oscillascope or logic analyzer.
I am waiting for your answer.
Sadık

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: UART "SendString" command problem

Post by medelec35 »

Sasi wrote:
Thu Apr 17, 2025 10:37 am
Sorry, I would like to request the .hex extension instead of .h. :oops:
Not a problem.
Zipped up as .hex file can't be sent
Attachments
UART_Test_2_NOT Working hex.zip
(806 Bytes) Downloaded 7 times
Martin

Sasi
Posts: 91
Joined: Wed Dec 02, 2020 12:11 pm
Has thanked: 36 times
Been thanked: 9 times

Re: UART "SendString" command problem

Post by Sasi »

The .hex file you sent works. :D
There is no difference in the code between the .c files.
Would reinstalling Flowcode fix the problem?
What would you suggest?
Sasi

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: UART "SendString" command problem

Post by medelec35 »

First without modifying the .fcfx file I sent, compile and load your Microcontroller.
If it works you have a configuration issue with your ,fcfx file.
Follow what Sadık has suggested and run a a 1 sec flash test and measure the time duration the LED is on for, or you can use a scope or a logic analyser.

If it does not work, then make sure you update your component library with the Full database option.
Reload your .fcfx project and try again.
Martin

celebriums
Posts: 42
Joined: Fri Dec 18, 2020 7:33 am
Has thanked: 23 times
Been thanked: 7 times

Re: UART "SendString" command problem

Post by celebriums »

Sasi
The problem is not in the C file,
As far as I understand, there is an error in your configuration settings. Cyrstal Settings
Can you write down the values of those settings?

// Enter C code below this comment
OSCCON = 0x70; //16MHz
st_bit(OSCTUNE,PLLEN);

uses the internal oscillator with this command. Remember :D

Sadık

Sasi
Posts: 91
Joined: Wed Dec 02, 2020 12:11 pm
Has thanked: 36 times
Been thanked: 9 times

Re: UART "SendString" command problem

Post by Sasi »

Hi Martin and Sadık,

I did a clean install of Flowcode10 on a desktop. I installed all the library updates. I compiled the .fcfx file Martin sent me, but the UART output didn't work.
Then I thought I'd try different versions of the XC8 compilers.
XC8 v2.10 (the default compiler for Flowcode 10) and XC8 v2.46 produced a non-working .hex file for me. XC8 v3.00 gave me errors during compilation, so I didn't experiment with it any further.
XC8 v2.50 is the winning compiler. It seems to only work with v2.50, although I haven't tried all the possible versions.
It helped a lot to solve the problem that I received working project files from Martin.
Thanks again.
Sasi

If I compile with XC8 v2.50, will other errors occur during program compilation?

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: UART "SendString" command problem

Post by medelec35 »

Thanks Sasi,
That is interesting.
I use XC 2.50 since I'm adding new target devices.
I know XC8 v3.0 is not compatible with Flowcode.
Sasi wrote:
Fri Apr 18, 2025 5:26 pm
If I compile with XC8 v2.50, will other errors occur during program compilation?
What errors did you get with v2.50
Martin

Post Reply