Page 1 of 1

8-bit calculator project, tips needed!

Posted: Thu Nov 29, 2007 8:42 am
by Thirtyfour
Hi

I'm a new user in flowcode, and i'm in need of some tips to make a eight-bit calculator, which lights the leds in order of 0=>255. The problem is that i don't get how this program works.

I know that i can make it with 255 outputs, but what'a heck :P...

I also know how to make this project with C++, but the flowcode is quite different than writing a clean code.

So what is the best and easiest way to make this project? The PIC that i use is 16F84.

Posted: Thu Nov 29, 2007 10:28 am
by Benj
Hello

Are the LEDs connected to a single 8 bit port.

If so then in Flowcode simply create a byte variable called count.

Then create a while loop and in the propertys input add

count < 255

Then inside the loop create a output icon that outputs the variable count to PortB then create a calculation icon with count = count + 1

You may also need a small delay inside the loop so that you can see the LEDs counting from 0 to 255.