Introduction to Microcontroller Programming
About PICmicro Chips
Clocking Your PICmicro Devices E-Blocks Flowcode Step By Step
PICmicro Projects
Labs |
Slow SimulationFlowcode allows you to progress through the flowchart one step/icon at a time. You can watch the effect of each step on the variables and on the output. Note that this program will also be fully functional when simulating 'As fast as possible'.
Do one of these!
Ignore the 'Macro Calls' section for the moment.
Move the cursor over the switch box connected to Port B.
Click on switches B0, B1, and B3, to activate these switches. The switches should now look like this:
You have set up the binary number 000 1011 (which is the number eleven in decimal.)
Switch B6 gives the most significant bit of the number, and B0 the least significant bit.
Set up the number 000 1111 (fifteen) on the switches connected to Port C.
It looks like:
Reading from Most significant bit (D7) to Least significant bit (D0), the LED array shows the number 0001 1010. In decimal, this is the number 26. No surprises there then!
The program is finished, and working. As usual, you could now let Flowcode translate it into machine code, and burn it into a PICmicro chip. |