Page 1 of 1

2 set of button not function properly in same time

Posted: Thu Oct 06, 2011 5:19 pm
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

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

Posted: Thu Oct 06, 2011 6:01 pm
by JohnCrow
Hi
It will help someone to look at you problem if you can post your flowchart.

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

Posted: Thu Oct 06, 2011 6:21 pm
by allpicproject
here it is.

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

Posted: Thu Oct 06, 2011 6:35 pm
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

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

Posted: Fri Oct 07, 2011 4:25 am
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.

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

Posted: Fri Oct 07, 2011 6:04 pm
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

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

Posted: Sat Oct 08, 2011 4:07 pm
by allpicproject
Hi Martin,

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

Btw, thanks for tips.