flowcode Help

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
steve22
Posts: 7
Joined: Sun Feb 08, 2009 2:23 pm
Contact:

flowcode Help

Post by steve22 »

I am looking for some help I have just started to use this software but the penny has still to drop. Any way what I am looking for is to find code examples to use but cannot find any. I want to be able to turn a number of outputs on and off by using a push to make switchs, each time I press the switch I want the led to change state but can not seem to find any examples to assist me. I can get the led to light when Ihold the switch down but it goes out when it is released. Could anyone assist me with a example peice of code.

chevy6600
Flowcode V4 User
Posts: 115
Joined: Fri Feb 22, 2008 6:38 pm
Contact:

Re: flowcode Help

Post by chevy6600 »

Hi steve22, you ought to have a list of demo programs in your instalation of flowcode but you need to go through them one at a time
as they are listed with a number. I have attached one of these demo files here, this one uses a switch to cycle through a number of leds
, these leds represent an increasing count so you can see the progression each time the switch is pressed.
Attachments
switch and led.FCF
(6.5 KiB) Downloaded 533 times

steve22
Posts: 7
Joined: Sun Feb 08, 2009 2:23 pm
Contact:

Re: flowcode Help

Post by steve22 »

Hi

I was going through these samples but none really addressed what I was trying to get. As I dont have much of a grasp of it just yet .In affect what I was trying to do was understand the workings of the 4013 d type flip flop and to create a working peice of code. .

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: flowcode Help

Post by Benj »

Hello Steve

Hopefully this should help a little.
Attachments
Flowcode1.fcf
(6 KiB) Downloaded 541 times

steve22
Posts: 7
Joined: Sun Feb 08, 2009 2:23 pm
Contact:

Re: flowcode Help

Post by steve22 »

I am not trying to go as far as the code listed. I was trying to get to grips with what was happing behind the program, this is why I was lookig for a simple coding example of press button light lights press button again light goes out.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: flowcode Help

Post by Benj »

Hi Steve

Ok this should be more along the line of what your looking for.
Attachments
Flowcode1.fcf
(6 KiB) Downloaded 509 times

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: flowcode Help

Post by Steve »

Sounds like a college assignment...

There are lots of videos, example files and tutorials on our website - please look there for some ideas.

icabjeff
Posts: 34
Joined: Thu Jul 27, 2006 11:00 pm
Location: Newton, NJ, USA
Contact:

Re: flowcode Help

Post by icabjeff »

After getting output though port B through a screw terminal and connecting wires from the terminal to a keyboard encoder I was able to see letters from the encoder in notepad. When I tried to compile my multi-click test program it failed even though it worked in the simulation. I received the following errors:


File name: Z:\Flowcodesaves\PICstickfinals\PICmulti-click_axisEPROMs1s2test.c
Generated by: Flowcode v3.2.2.40


Launching the compiler...
.....................................................

Z:\Flowcodesaves\PICstickfinals\PICmulti-click_axisEPROMs1s2test.c(1004:10): error: unknown identifier 'FC_RS232_TXSTA_VAL'
Z:\Flowcodesaves\PICstickfinals\PICmulti-click_axisEPROMs1s2test.c(1004:10): error: invalid operand 'FC_RS232_TXSTA_VAL'
Z:\Flowcodesaves\PICstickfinals\PICmulti-click_axisEPROMs1s2test.c(1004:8): error: failed to generate expression
Z:\Flowcodesaves\PICstickfinals\PICmulti-click_axisEPROMs1s2test.c(1005:10): error: unknown identifier 'FC_RS232_SPBRG_VAL'
Z:\Flowcodesaves\PICstickfinals\PICmulti-click_axisEPROMs1s2test.c(1005:10): error: invalid operand 'FC_RS232_SPBRG_VAL'
Z:\Flowcodesaves\PICstickfinals\PICmulti-click_axisEPROMs1s2test.c(1005:8): error: failed to generate expression

................

Any help would be greatly appreciated.

Thanks,
Jeff

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: flowcode Help

Post by Benj »

Hi Jeff,

What chip are you using. Also please could you post up your FCF file and I will have a look at the problem for you.

icabjeff
Posts: 34
Joined: Thu Jul 27, 2006 11:00 pm
Location: Newton, NJ, USA
Contact:

Re: flowcode Help

Post by icabjeff »

Sorry I neglected to attach the FCF and failed to metion I'm using a PIC 16F877A I should know better.

Thanks,
Jeff
Attachments
PICmulti-click_axisEPROMs1s2test.fcf
(22.25 KiB) Downloaded 434 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: flowcode Help

Post by Benj »

Hello Jeff,

The problem was caused because you have an unused RS232 component in your program.

To view the component use the View -> Attached components menu.

You can then use the RS232 drop down menu to delete the component from your program.

Your program should then compile correctly.

icabjeff
Posts: 34
Joined: Thu Jul 27, 2006 11:00 pm
Location: Newton, NJ, USA
Contact:

Re: flowcode Help

Post by icabjeff »

I removed the RS232 and was able to compile successfully, only to find that my program which accepted input for my multi-click switches in simulation doesn't do so after burning to the PIC. I broke my program into steps to find the segment causing the issue. I successfully tested the hardware inputs right before burning the section in question with a simple input/output program to confirm it isn't the problem. Attached is the section in question. Any ideas?

Thanks,
Jeff
Light teststep3s1.fcf
(18.53 KiB) Downloaded 411 times

Post Reply