You are on page 1of 2

EE5160 MBED Micro-controller Class Assignment

1) Blinking LED
a) Write a program to blink LEDs on LPC1768 microcontroller.
b) Write a program to blink the LEDs in alternate fashion i.e. at a time LEDs placed at odd
position should glow and then they should turn off and LEDs placed at even place should
glow.
c) Write a program to blink LEDs in a running fashion i.e. first LED glows, then first and
second, then first, second and third, and so on.
Using UART
2) Design the digital code converters BCD to Grey & Excess-3, output should be displayed
accordingly on the leds present on microcontroller.
Hint: Use Tera term to give inputs.
3) In an image processing application there is a need to find the multiplication of 3*3 matrix.
Implement the following cases on ARM LPC 1768
a) Implement a fixed 3*3 matrix multiplication operation.
b) Now read an image in matlab and consider that 45 pixels of this image are coming in
sequence to the microcontroller (read the image in matlab and take the 45 samples).
Assume that 9 samples in a sequence belong to one window in 3*3 matrix format.
Compute the following using the constraints as specified below:
i.
Using 3*3 matrix-multiplier module (that you developed in problem (a)) in
parallel.
ii.
Reusing the only ONE 3*3 matrix-multiplier module that you developed in
problem (a).
Hint: Use mul() function in matlab.
Now compare these results with matlabs outputs and find the error in terms of mean and standard
deviation for problem b (i) and (ii).
4. Inverse matrix computation is extremely useful for blind source separation problem where the sources
and channel information are to be estimated blindly from the mixed signals captured by the sensors. Find
the inverse of 4*4 matrix under following constrains.
a) Compute inverse of fixed 4*4 matrix using the following constraint:
i. By computing all cofactors in parallel.
ii. By reusing only one co-factor computation module.
d) 64 samples are coming in sequence to microcontroller, assume that 16 samples in a
sequence belong to each window (4*4). Compute:
(i)
Inverse by using 4*4 inverse computation module in parallel;
(ii)
Inverse by reusing the 4*4 computation module.
Compare these results with matlabs outputs. Find the error in terms of mean and
standard deviation and also plot the error.

Hint: Use inv() function in matlab to find invers of matrix .


Using On-chip peripherals
4) In solar power generation, there is a need to change the solar panel position according to the sun
direction using servomotor. We need to control the servomotor using LPC1768 by generating
PWM. Generate the PWM signal with different duty cycles. So the outputs by glowing the LEDs.
Hint: you may take one square wave as reference and generate sinusoid of different frequency.
Then wherever the square wave amplitude is greater than that of the sine wave, you may consider
that as ONE and if less, then consider ZERO.
NOTE: Install TERATERM software to establish communication between microcontroller and PC using
UART.

You might also like