Flowcode V2 and V3 Tutorials

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
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:

Flowcode V2 and V3 Tutorials

Post by medelec35 »

Found this information on the net, thought it may be useful to know what each tutorial is about.

TUT_01.FCF
Tutorial 1: Lighting an LED
Lighting up an LED (A0). Demonstrates how to send output to a port.
Clears PORT A by sending 0 to the port, which turns off all the LEDs.
Then sends 1 to PORT A, which lights LED A0

TUT_02.FCF
Tutorial 2: Outputting a value to a port.
Sends 5 to PORT A, which lights up two LEDs.
The two LEDs correspond to the binary pattern for 5.
Try this:
Change the value in the OUTPUT icon and see what affect this has on the LEDs

TUT_03.FCF
Tutorial 3: Single bits and ports.
Sends 1 to each individual bit of PORT A, then clears the port. Finally it lights up all of PORT A.
Sending 1 to a specific bit will light that bit. Sending a value will light the corresponding pattern of bits.
Try this:
Change the order of how the LEDs light up.
Change which LEDs light up.

TUT_04.FCF
Tutorial 4: Using variables.
Sends MY_OUTPUT to PORT A.
When output to a port variables work the same as values.
Try this:
Change the value that is assigned to MY_OUTPUT in the Calculation icon.
Add a new variable OUTPUT_A and change the calculation to use this variable instead.

TUT_05.FCF
Tutorial 5: Basic calculations.
Performs basic calculations and sends the result to PORT B.
Try this:
Change the calculation, or add new ones.
Add a second variable and use this to try calculations with more than one variable.

TUT_06.FCF
Tutorial 6: Input from switches.
Input is taken from switches on PORT A and displayed on PORT B.
Note that this tutorial also uses connection points to run continuously.
Try this:
Try inputting from a single bit rather than the whole port.

TUT_07.FCF
Tutorial 7: Boolean logic calculations.
Calculates RESULT based on a variable, input from PORT A and the Boolean logic AND function.
Try this:
Change the value of BOOLVAR.
Try other Boolean functions such as OR and XOR.

TUT_08.FCF
Tutorial 8: Using masking.
Passes the input from PORT A to PORT B, but uses a mask to select only certain bits from PORT A.
Try this:
Change what is being masked.
See what happens when you mask the output.

TUT_09.FCF
Tutorial 9: A basic counter.
A basic counter on PORT B.
Note that once the counter reaches 255 (all LEDs on) it overflows and starts again at 0.

TUT_10.FCF
Tutorial 10: A timed counter.
As Tutorial 9, but with a 1 second delay to aid timing
Try this:Change the delay to speed up or slow down the count.

TUT_11.FCF
Tutorial 11: Using loops.
This counter uses a loop to count up to 16 on PORT A.
Try this:
Change the LEDs to PORT B and Increase the counter.

TUT_12.FCF
Tutorial 12: A basic light chaser.
A light moves across the row of LEDs
By multiplying by 2 the next binary number is activated and the light appears to move.
Try this:
Can you make it work in reverse?

TUT_13.FCF
Tutorial 13: Improved light chaser.
In the previous tutorial the light appeared to fall off the end of the LEDs. So we have added a simply decision box to see if its fallen off,
and if so re-initialise the count.
Try this:
How would you make this work in reverse?

TUT_14.FCF
Tutorial 14: Bitwise shifting.
Another light chaser, but this one uses bitshifting.
Bitshifting actually moves the bits along to the next one.
Try this:
Change the value of count and see what happens.
Change the direction of the bitshift.

TUT_15.FCF
Tutorial 15: Moving LED display.
Creates a moving LED display using loops.
Try this:
Compare this tutorial and the next one to see different ways of solving the same problems.

TUT_16.FCF
Tutorial 16: Moving LED display.
Creates a moving LED display using decisions and connections.
Try this:
Compare this tutorial and the previous one to see different ways of solving the same problems.

TUT_17.FCF
Tutorial 17: Using a seven segment display.
Displays a number on a seven segment display.
Rather than use complex code to pass the specific inputs that the seven segment display needs to display the number we are using a
macro that handles this for us.
Try this:
Look at the macro properties to see how it works.
Change what digit is displayed.
Display the decimal point.

TUT_18.FCF
Tutorial 18: Counting on a seven segment display.
Uses a simple loop to turn the seven segment display into a counter.

TUT_19.FCF
Tutorial 19: Counting on a seven segment display using timers.
In this tutorial we use a timer interrupt to make the seven segment display update every second.
We have set the clock speed to 3276800Hz, and the prescaler value to 1:128
This now gives us a timer interrupt frequency of 25Hz (25 times a second)
We can now edit the TMR0 interrupt to update the display variable every second.
Try this:
Change the clock speed and prescaler values to see how they affect the timer interrupt frequency.

TUT_20.FCF
Tutorial 20: Counting on a quad seven segment display using multiplexing.
The PICmicro can only illuminate one of the four displays at a time. However the PICmicro can light up the four displays one after the
other so fast that to the human eye they appear to be continuously lit. This is called multiplexing.
Note that this tutorial uses a macro UPDATE_VALUES.
Macros can be used to neaten up the flowchart by removing large or complex blocks of code, or to separate a piece of code that may
be useful elsewhere as well.
Try this:
Change the code so that it no longer multiplexes - what is the display like now?
Create two new macros - one to initialise the display, and one to output to the display.

TUT_21.FCF
Tutorial 21: Using the LCD display.
Uses the LCD display to display a message.
Try this:
Change the message (see the LCD display help page for more details).

TUT_22.FCF
Tutorial 22: A 24 Hour clock.
Displays a 24 hour clock on the LCD display.
Note the use of macros to improve the layout of the code.
Try this:
Change the code to make a 12 hour AM/PM clock.

TUT_23.FCF
Tutorial 23: PORT B0 interrupt.
Uses an interrupt on PORT B0 to increment a counter.
Try this:
Change the code so that the counter updates continually, and is reset by the interrupt.

TUT_24.FCF
Tutorial 24: Generating sound.
Note: Sound will not simulate in Flowcode.
Turns the PORT B switches into piano keys.
Sound is generated by waggling Pin A0.
A headphone or speaker needs to be connected to the audio output for the sound to audible.
Try this:
Alter the TONE values to see how they affect the sound.

TUT_25.FCF
Tutorial 25: Using embedded C and Assembly code.
This tutorial demonstrates the use of embedded C and Assembly code.
Note: C and ASSEMBLY code will not simulate in Flowcode.

TUT_26.FCF
Tutorial 26: Using Analogue inputs.
Note: This tutorial requires a PICmicro with an analogue input, such as a PIC16F877.
Reads the analogue level of the input and outputs this to a LCD display.

TUT_27.FCF
Tutorial 27: Advanced calculations.
This tutorial demonstrates a number of complex calculations.

TUT_28.FCF
Tutorial 28: Using macros.
This tutorial demonstrates the use of macros.
Martin

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 V2 and V3 Tutorials

Post by Benj »

Hello Medelec

Thats brilliant, many thanks for finding that and posting it here.

Here is the rest of the list.

TUT_29.FCF
Tutorial 29: String manipulation - reversing a string.

TUT_30.FCF
Tutorial 30: String Manipulation - automatic string reversal.

TUT_31.FCF
Tutorial 31: String input via switches, output on LCD.

TUT_32.FCF
Tutorial 32: Password input with allow or deny.

TUT_33.FCF
Tutorial 33: Including external C functions.

TUT_34.FCF
Tutorial 34: Including supplementary code C functions.

Palani Vel Rajan
Posts: 1
Joined: Sun Sep 20, 2009 8:23 pm
Contact:

Re: Flowcode V2 and V3 Tutorials

Post by Palani Vel Rajan »

Good morning every one in the forum... I am new to this forum ... I am unble to access the tutorials...can anybody please help me.

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

Re: Flowcode V2 and V3 Tutorials

Post by Steve »

The tutorials are either on the Flowcode CD or are installed when Flowcode is installed (and can be found in the same directory as the Flowcode exe).

Post Reply