ADVANCE MICROPROCESSOR SYSTEM DESIGN
HAIDER ALI
MKE161135
Faculty of Electrical Engineering,
University Technology Malaysia
Group Assignment
PWM-based DC Fan Control System
Group Assignment
Contents
No. Title Page
1 LED Blinking Program 3
2 Reading switch 4
3 Reading Analogue input 5
4 Displaying numbers on seven-segment 6
5 Generating PWM Output 7
6 Control DC Fan with PWM 8
7 Front-end design using Visual Studio v13
Goals
1. To program the NuMaker board for LED blinking
2. To read the status of switch connected to NUC131
3. To read Analog inputs
4. To control the output of a seven-segment display
5. To generate PWM
6. Integrating these program for controlling speed of DC Fan
Design Hierarchy
“Template” from examples for the Board
Support Package (BSP) of Nuvoton
NUC131SD2AE has been copied and
modified for the desired program
NuMaker UNO kit is connected to the USB port on the Laptop (Shown below)
When the kit is connected to the PC, it will show the ICE
version and Device ID (If Nu-Link driver is installed properly)
1. LED Blinking Program
2. Reading switch
The switch is connected to Port (PF.4)
and LED1 and LED2 are connected to
pins 11 and 13 of Port B.
I/O Multifunction setting for pins of
Port B and Port F.
Setting the corresponding pins as input
or output
Program for reading the status of switch
SW1, and taking the corresponding action
3. Reading Analog input
Analogue signal (0---5V) is given to the
microprocessor as shown.
I/O Multifunction pin setting for the
Port-A(PA0, PA1, PA2 and PA3)
Interrupt Service Routine
reading analogue input