Professional Documents
Culture Documents
LABORATORY SESSION # 3
3 Configuration of STM32F100xx GPIOs as an Output
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
3.3 PROCEDURE
___________________________________________________________________
__
___________________________________________________________________
__
20
Student Workbook EE-07310: Microprocessor based Embedded Systems
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
___________________________________________________________________ __
_____________________________________________________________________
_____________________________________________________________________
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
21
Student Workbook EE-07310: Microprocessor based Embedded Systems
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
22
Student Workbook EE-07310: Microprocessor based Embedded Systems
A B
Figure 3.3: (a) Peripherals selection and (b) Port C peripheral window
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
_____________________________________________________________________
_____________________________________________________________________
___________________________________________________________________
__
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
___________________________________________________________________
__
___________________________________________________________________
__
23
Student Workbook EE-07310: Microprocessor based Embedded Systems
___________________________________________________________________
__
___________________________________________________________________
__
3.5 LEARNING OUTCOMES
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
25
Student Workbook EE-07310: Microprocessor based Embedded Systems
- Investigate the outcome of program if the data type of variable ‘i’ in for loop
is changed from ‘int’ to ‘char’.
_________________________________________________________________
__ __
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
- Masking is used in the code. Compare the simple assignment of values to the
register with the masking approach.
___________________________________________________________________
__
___________________________________________________________________
__
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
___________________________________________________________________
__
___________________________________________________________________
__
- How can you enable and disable the clock for GPIOA, GPIOB and GPIOC
simultaneously?
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
26
Student Workbook EE-07310: Microprocessor based Embedded Systems
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
___________________________________________________________________
__
- Re-write the program to blink both on-board LEDs, PC8 and PC9 .
Give related code section only, where the modification is done.
27
Student Workbook EE-07310: Microprocessor based Embedded Systems
Figure 3.8: Code from Keil µVision for blinking PC8 and PC9 simultaneously
28
Student Workbook EE-07310: Microprocessor based Embedded Systems
- Re-write the program in order to blink PC8 and PC9 LEDs alternatively.
Figure 3.10: Code from Keil µVision for blinking PC8 and PC9 alternatively
Figure 3.9: Hardware picture for blinking of PC8 and PC9 alternatively
29
Student Workbook EE-07310: Microprocessor based Embedded Systems
30
Student Workbook EE-07310: Microprocessor based Embedded Systems
31