8 inputs in a switch array

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

Moderator: Benj

Post Reply
DELAK_ALED
Posts: 23
Joined: Sat Jun 21, 2014 11:04 am
Has thanked: 5 times
Been thanked: 2 times
Contact:

8 inputs in a switch array

Post by DELAK_ALED »

How can I use a switch array with 8 inputs?
The simulation works correct with 4 inputs but don't work with 8 inputs
see attachments
Best regards
Attachments
4inputs.fcfx
switch array with 4 inputs
(5.24 KiB) Downloaded 175 times
8inputs.fcfx
switch array with 8 inputs
(5.24 KiB) Downloaded 186 times

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: 8 inputs in a switch array

Post by JohnCrow »

Hi Delak
I've just tried both your flowcharts. Both simulate fine. The switches turn on corresponding LEDs.
What isn't actually working on your system?
1 in 10 people understand binary, the other one doesn't !

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: 8 inputs in a switch array

Post by medelec35 »

Your flowchart will work on hardware if say using a different target chip for example 16F1937.
However you have chosen Formula Flowcode Buggy.
I don't know the full circuit of the buggy.
There are 8 outputs connected to portD, but I can only see two inputs.
1 connected to RB4 and the other connected to RB5.
How are you connecting all the other inputs?

Are you actually using the Flowcode Buggy or have you selected the wrong target device?

Could you explain what hardware you have got and how you have connected up all the switches?
Martin

DELAK_ALED
Posts: 23
Joined: Sat Jun 21, 2014 11:04 am
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: 8 inputs in a switch array

Post by DELAK_ALED »

I noticed when I save my programs first, and I close flowcode, then I re-open flowcode and open my program then it works correct.
But the simulation doesn't work immediately without closing first flowcode.
Regards

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: 8 inputs in a switch array

Post by medelec35 »

Oops sorry,
I have totally misread your first post.
DELAK_ALED wrote: But the simulation doesn't work immediately without closing first flowcode
I do agree with you as I have just tried it out.
When you first create the flowchart, the simulation does not run correctly.
You do need to exit, and restart.
I must admit I did find this once to do with Human interface injector, but put it down to me not doing something right.
Since we loaded up your saved flowchart the bug you are referring to did not show as we just had to open your flowchart.

One for the bugs section.
Martin

Post Reply