
2003 University of Illinois at Chicago ECE 367 V. Goncharoff
Web code:
Last name:
First name:
Signature:
ECE 367 - Microprocessor-Based Design
Homework #9: Due in class on Wednesday, Nov. 26, 2003.
The following circuit interfaces with a Motorola 68HC11 microcomputer
operating in single-chip mode:
Write an assembly language program that drives the LED with a PWM waveform
having approximately 30 Hz fundamental frequency. The duty cycle of the PWM
waveform is to be determined by the potentiometer setting (0 to 100%).
The switch shown performs a toggling ON/OFF function: when being turned on,
the duty cycle of PB0 waveform increases at a slope of +20% per sec until the
potentiometer-specified level is reached. When being turned off, the duty cycle
decreases at a slope of −20% per sec until zero value is reached.
Provide a well-commented, printed listing of your assembly language code.
MC68HC11
microcontroller
Analog-to-Digital Converter Input
PC0
PB0
Vdd
Vdd
potentiometer
220 Ohms
LED
1K Ohms
10K Ohm
On / Off
Brightness Control