2 set of button not function properly in same time

Moderator: Benj

Post Reply
allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

2 set of button not function properly in same time

Post by allpicproject »

Hi all,

This my first post and I'm using flowcode PIC v4.5.

Btw, sorry for my bad english as it's not my mother language.

I just create one flowcode PIC using 2 set of button ( 1 set of 8 toggle button , another set is just one push button ). Hhen it run (simulation) I just can click 1 set only ( the other set not respond as button ,,, just hang ). After some time, the other set of button work ok ( can toggle / push ) but the first set not work ( hang ).

I never found this problem in PIC v4.3.

Regards
Allpic

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: 2 set of button not function properly in same time

Post by JohnCrow »

Hi
It will help someone to look at you problem if you can post your flowchart.
1 in 10 people understand binary, the other one doesn't !

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: 2 set of button not function properly in same time

Post by allpicproject »

here it is.
Attachments
N00001_Testing_ToggleButton-PushButton.fcf
(7 KiB) Downloaded 363 times
Last edited by allpicproject on Sat Oct 08, 2011 7:42 pm, edited 1 time in total.

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: 2 set of button not function properly in same time

Post by JohnCrow »

Hi

1 )You are using a pic 16F84A, this only has 2 ports A & B, so the leds on port D won't be connected to anything.

2) Your switches and push button are on the form, but not connected to anything.
All your chart does is to turn all 8 bits of port d on and off every 250ms

This will almost certainly give the very unpredicable results when running the simulation, as you have found.

Not quite sure what you are trying to make the program do, but you need to put something in the flowchart to use the switches and if you want leds on port d a bigger pic like the 16F877A
1 in 10 people understand binary, the other one doesn't !

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: 2 set of button not function properly in same time

Post by allpicproject »

Ok. got it.

Thanks.

NOTE: in FC PIC v4.3, it works if there is no connection to button (push / toggle ) but in FC PIC 4.5, it should fully connected then it work properly. I use PIC16F887 not PIC16F84A . ( PIC16F887 has port A - E , so no issue on port but the problem is I dont connect the button properly to any port.) . Anyway thanks for correct me.

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: 2 set of button not function properly in same time

Post by medelec35 »

Have you considered setting your flowchart up for key mapping.
See:
http://www.matrixmultimedia.com/mmforum ... 219#p21219
Then if you use run or single step, you press a number on your keyboard and the switch assigned to the keyboard will activate.
I use that function a lot, especially if clicking on the switches don't cause them to activate, Or I want to activate several switches simultaneously!

Martin
Martin

allpicproject
Flowcode V4 User
Posts: 36
Joined: Thu Sep 01, 2011 11:10 am
Has thanked: 17 times
Been thanked: 1 time
Contact:

Re: 2 set of button not function properly in same time

Post by allpicproject »

Hi Martin,

The problem solved ( just the difference between FC PIC v4.3 vs v4.5 )

Btw, thanks for tips.

Post Reply