Lab 8 & 9 PDF
Lab 8 & 9 PDF
Lab 8 & 9 PDF
LABORATORY SESSION # 7
#Group Daniyal Intisar
Messam Raza
Maryam Ijaz
Daniyal Intisar
BSEE02163115
7 Hardware Delay Using STM32F100xx Timers
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
7.3 PROCEDURE
_____________________________________________________________________
_____________________________________________________________________
54
Student Workbook EE-07310: Microprocessor based Embedded Systems
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
7.4 OBSERVATION & RESULTS
55
Student Workbook EE-07310: Microprocessor based Embedded Systems
56
Student Workbook EE-07310: Microprocessor based Embedded Systems
57
Student Workbook EE-07310: Microprocessor based Embedded Systems
(c) GPIOC
Figure 7.3: (a) Timer2, (b) GPIOA and (c) GPIOC peripherals
- Hardware pictures
58
Student Workbook EE-07310: Microprocessor based Embedded Systems
- Oscilloscope screenshot
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
100ms:_______________________________________________________________
_____________________________________________________________________
1s:__________________________________________________________________
_____________________________________________________________________
59
Student Workbook EE-07310: Microprocessor based Embedded Systems
10s:_________________________________________________________________
_____________________________________________________________________
- Modify the program such that two LEDs (PC8 and PC9) toggles after pressing
the switch at 1Hz frequency
60
Student Workbook EE-07310: Microprocessor based Embedded Systems
- Point-out the changes in the code section to toggle the two LEDs alternatively.
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
61
Student Workbook EE-07310: Microprocessor based Embedded Systems
Is adept in the use Is able to use the Is able to use the Is unable to use
of software tool software tool software tool but the software tool
Software Usage
and can access effectively by cannot access all ☐
(Software) – C3
advanced features accessing all the the required
required features features
62
Student Workbook EE-07310: Microprocessor based Embedded Systems
LABORATORY SESSION # 8
#Group Daniyal Intisar
Messam Raza
Maryam Ijaz
Daniyal Intisar
BSEE02163115
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
- __________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
8.3 PROCEDURE
63
Student Workbook EE-07310: Microprocessor based Embedded Systems
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
64
Student Workbook EE-07310: Microprocessor based Embedded Systems
Main.c:-
65
Student Workbook EE-07310: Microprocessor based Embedded Systems
Main.h:-
66
Student Workbook EE-07310: Microprocessor based Embedded Systems
67
Student Workbook EE-07310: Microprocessor based Embedded Systems
Pwm.h:-
68
Student Workbook EE-07310: Microprocessor based Embedded Systems
69
Student Workbook EE-07310: Microprocessor based Embedded Systems
- Hardware pictures
- Oscilloscope screenshots
70
Student Workbook EE-07310: Microprocessor based Embedded Systems
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
_____________________________________________________________________
71
Student Workbook EE-07310: Microprocessor based Embedded Systems
- Generate PWM with different duty cycles (10%, 20%, 30% … 90%).
20
%
72
Student Workbook EE-07310: Microprocessor based Embedded Systems
30
%
40
%
50
%
60
%
73
Student Workbook EE-07310: Microprocessor based Embedded Systems
70
%
80
%
90
%
74
Student Workbook EE-07310: Microprocessor based Embedded Systems
- Re-write the program to generate a PWM with variable duty cycle, the duty
cycle automatically changes after a specific interval of time (say 3 sec).
main.c
main.h
75
Student Workbook EE-07310: Microprocessor based Embedded Systems
Is adept in the use Is able to use the Is able to use the Is unable to use
of software tool software tool software tool but the software tool
Software Usage
and can access effectively by cannot access all ☐
(Software) – C3
advanced features accessing all the the required
required features features
76