​​​​​​Mr BILLINGTON

A Genie Microcontroller can store numbers from 0-255 as variables which can be used within calculations in the program. The numbers are stored and referenced using letters A-Z allowing for 26 variables

All 26 variables are set to 0 when the microcontroller is powered and will remain unaltered unless referred to in the flowchart. The 'Random' command will change a specified variable to a random number between 0-255 every time it is called in the program. This number can the be used to change the path the program takes to create random question and answers for example. The 'Increase' command and 'Decrease' can be used to affect the variable by 1 each time they are called
----------------------------------------------------------------------------------------------------------
The 'Compare' decision command is used to compare two variables mathematically or to check the value of one of the variables. This allows the program to count input signals and respond to changes. Each time an input signal is received the 'Increase' command can be used to add 1 to a variable, and the 'compare' command can check the number to trigger outputs when a total is reached. Equally an additional equation can be added as either an 'or' (either one can be true) or 'and' (both must be true) in similar way to Logic gates
​----------------------------------------------------------------------------------------------------------
The 'expression' command can perform calculations in the program using numbers from 0-255 or stored variables A-Z. There is a wide range of mathematical functions it can perform, however, the outcome must be between 0 - 255 limiting its use. Importantly it can be used to set any specified variable value to a number up to 255 using the equation - variable = number. This is far more efficient than using 'increase'
​----------------------------------------------------------------------------------------------------------
Internally a microcontroller has a clock that begins counting once powered. It counts in milliseconds and cannot be used to show the current hourly time but the time within the program. This clock can be used within a program to control the events that happen. The 'wait' and 'pause' command will cause the program to stop for a specified period of time in milliseconds. This can also be linked to a stored variable

The 'clock' command can be used to reset the internal clock back to 0 milliseconds or control it stopping or starting. The 'sleep' command will set the microcontroller to a low power mode which will conserve battery and stop the flowchart for a set period of time
​----------------------------------------------------------------------------------------------------------
An LCD screen can be used as an output from one of the 'serial' output pins on the microcontroller. Using the 'LCD' command you can type up to 16 charatcers on each row and typically 2 rows (16x2 screen). Each letter can be given a delay using the 'add waiting time' to make the text scroll into view. Each variable value can also be displayed using text brackets such as - [a], as well as the program time from the internal clock in milliseconds. 

A unique 5 x 8 bitmap character can be designed and displayed on the screen using the number you have stored it as, [01] for example. To define the shape design in the program the 'character' option on the LCD command is used.







 Systems approach to Designing - Flowchart Programming Continued

EXAMPLE FLOWCHARTS

Copyright © A.F.Billington 2018. All rights reserved.