|
|
| (36 intermediate revisions by 5 users not shown) |
| Line 1: |
Line 1: |
| :* Double click on the [[Input Icon Properties|Input icon]].
| | For an excellent introduction guide, we recommend Introduction to microcontroller programming CP4375 which can be found at https://www.matrixtsl.com/learning/ |
| :: This opens the 'Properties: Input' dialogue box, allowing you to configure the way the program treats information from the switch.
| |
| :: This information will be contained in a variable called 'switch'.
| |
| ::* Click on the down arrow at the right-hand end of the 'Variable:' box to open the variables dialogue box.
| |
| ::* Hover to the left of the 'Variables' label and click on the down arrow that appears.
| |
| ::* Click on the 'Add new' option to open the 'Create a New Variable' dialogue box.
| |
| ::* [[Creating Variables|Create a new variable]] named "switch" with initial value "0" and description "Copies the state of the switch"
| |
| ::* Leave the 'Variable type:' as 'Byte'.
| |
| ::: (For more information about variables, see [[Creating Variables]] and [[Variable Types]].
| |
| ::: (The resulting dialogue box is shown opposite.)
| |
| [[File:gen_exerciseFirstFlowchart_inputprops_01.png|250px|right]]
| |
| | |
| :* Finish configuring the input properties as follows:
| |
| ::* Change the 'Display name:' to "Read the switch".
| |
| ::* In the 'Variable:' box, type the name of the variable you created "switch".
| |
| ::* Leave the 'Port:' as PORT A.
| |
| ::* Select to 'Input from:' 'Single Bit' and choose bit 0.
| |
| ::: (The resulting dialogue box is shown opposite.)
| |
For an excellent introduction guide, we recommend Introduction to microcontroller programming CP4375 which can be found at https://www.matrixtsl.com/learning/