SRM32F411RE,Port output variable not working

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

Moderator: Benj

Post Reply
nnnnff
Posts: 107
Joined: Tue Oct 04, 2011 8:55 am
Has thanked: 3 times
Been thanked: 6 times
Contact:

SRM32F411RE,Port output variable not working

Post by nnnnff »

Loading to the chip does not work when using BOOL D as the output of port B10.why?
Flowcode2.fcfx
(7.97 KiB) Downloaded 122 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: SRM32F411RE,Port output variable not working

Post by LeighM »

Ah, well spotted, this is the issue with your Timer interrupt program.
In my test version I used D = !D which does work.
(as I've been a C programmer for the last 40 years :lol:

Bools are simple in C, in that 0 is false, anything else is true.
But this can have complications depending upon how they are stored and processed.

This particular scenario, using NOT on a Bool and starting with D = 1,
has highlighted a potential issue with how Flowcode processes the NOT keyword.
I will discuss this with my colleagues.

Meanwhile please could you use D = !D instead.

nnnnff
Posts: 107
Joined: Tue Oct 04, 2011 8:55 am
Has thanked: 3 times
Been thanked: 6 times
Contact:

Re: SRM32F411RE,Port output variable not working

Post by nnnnff »

Everything is normal. Ok. Thank you very much!

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: SRM32F411RE,Port output variable not working

Post by LeighM »

OK, good, thanks for letting us know.
Also, I have been reminded that historically in Flowcode the operators AND, OR and NOT have always been bitwise operators.
So this confirms that you do need to use D=!D in this scenario.
Thanks
Leigh

Post Reply