Level 3-Real Time Computing (11/12)

The following are programs for the LPC2478 OEM Board, they solve the following problems

Mark: 71%

Problem 1

1. Write a program to output a triangle wave on the screen of an oscilloscope. The
frequency of the wave should be as high as possible. Determine what parameters
of your chosen method limit the frequency. How fast can you make it run ?
2. Extend the waveform generator so that a variety of wave shapes can be produced.
A triangle wave, a square wave and a sine wave must be produced by your
program, and the particular wave shape must be selected by using the navigation
keys.
3. Extend the waveform generator program so that the frequency of the wave can be
varied using the navigation keys.

Solution:

Removed by Request of University of Durham

Problem 2

An analogue to digital converter is to be used to record audio signals from a microphone,
store the results in memory and then play them back through the monitor speaker.
Write a program to capture and store data samples in memory. Think carefully about the
type of storage to use and how many samples to take. You should record for a few
seconds of time. Your program should prompt you on the screen to start recording, and
then indicate when recording is complete. It should then ask you to initiate playback.
Try varying the sampling rate and playback rate to see how you can extend the recording
time for the same number of samples without introducing unacceptable distortion.
As an optional extra you may wish to consider how you could add a volume control to
playback and how the interface with the user can be improved.

Solution:

Removed by Request of University of Durham

Problem 3

Write a program to control the speed of a motor using pulse width modulation (PWM).
Use the PWM unit in the microcontroller to output a pulse which switches on the motor for
a defined period of time. By varying the pulse width you can vary the speed of the motor.
Your final program should allow the user to select from the following:

  • • number of selectable motor speeds, including off
  • a continuously ramping motor speed, starting at a low speed and increasing steadily to the highest speed, then repeating.

You can observe the pulse width and the output of the motor rev detector by connecting
an oscilloscope to appropriate test points on the board. The REVS testpoint is connected
to the output of the rev detector. The PWM testpoint is connected to the pwm output from
the microcontroller. You can also see the switching waveform across the motor on the
MOTOR testpoint.

Solution:

Removed by Request of University of Durham

Leave a Reply

Your email address will not be published. Required fields are marked *