Introduction to Microcontroller Programming
About PICmicro Chips
Clocking Your PICmicro Devices
E-Blocks
Flowcode Step By Step
PICmicro Projects
Labs
|
- Click 'View' on the menu bar, and then ensure 'Project Explorer' is checked (View > Project Explorer). Then click on the 'Globals' button at the top of the Project Explorer panel:
- We are going to create two variables, one called 'SHEEP' and the other called 'TOTAL'. The 'SHEEP' variable will show whether a sheep is present or not. The variable 'TOTAL' will store the total number of sheep recorded so far.
- Hover over 'Variables' in the project explorer panel then click on the that appears, then click 'Add new'. You now see the 'Create a New Variable' dialogue box. Type in the name "SHEEP" and then click on OK. You can leave the variable type as 'Byte' as there will not be that many sheep. Create a variable in the same way and name it "TOTAL".
|