Introduction to Microcontroller Programming
About PICmicro Chips
Clocking Your PICmicro Devices E-Blocks Flowcode Step By Step
PICmicro Projects
Labs |
Labs /
Lab 4 - Calculations1. Introduction
Modern microcontrollers, like the PIC, are able to do simple mathematical tasks with 8-bit numbers really fast. When the calculations get more complex or the numbers rise above an 8-bit value, then this is possible too but it adds to execution time drastically. Flowcode lets us use complex calculations on up to 16 bit values in programs and takes care of all the complexity behind it. We do however, have to take into account that this will slow the PIC down. 2. Setting up the equipment
3. Hardware settings
4. Flowcode and download settings
5. Software learning objectives
Output, binary code training, what are variables and how are they used, calculations on an 8-bit microcontroller. 6. Hardware learning objectives
LED’s, logic output levels, Calculations on an 8-bit microcontroller 7. Instructions
Construct the system shown from E-blocks. In the course navigate to the ‘Flowcode step-by-step’ and review the Digital Inputs (section 3) to get more info on how to use variables and sections 4, 5 and 6 on Calculations. In the main course you will find interesting info on where variables are stored in the PIC. Make sure to use the 'Help' menu and function in Flowcode to get more info on the calculation and variables possibilities. During these exercises you are going to send different 8-bit codes to Port B of your Microcontroller. You'll also learn how to use variables and perform calculations on 8-bit numbers. 16-bit Float variables can also be used, although these are not discussed in this course. 8. Labs
|