Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Answer ALL questions.

1. A machine cycle gives the steps the microcontroller takes to do a specific


task. List six (6) basic machine cycles.
(6 marks)

2. Illustrate the block diagram internal architecture of a microcontroller.


(6 marks)

3. Give command would you use to light up LED on port 5 and port 9?
(2 marks)

4. Explain the following instructions:


ATmega328P - out DDRB,r16 (5 marks)

5. A simple microcontroller circuit system consists of a ATMega2560 to


perform a task for a control system for a large water tank. When a start
button is pushed the tank will start to fill, and the flow out will be stopped.
When full, or the stop button is pushed the outlet will open up, and the flow
in will be stopped. Illustrate the flow chart to represent the solution of the
problem.
(7 marks)

6. The Inter-integrated Circuit (I2C) Protocol is a protocol intended to allow


multiple “slave” digital integrated circuits (“chips”) to communicate with one
or more “master” chips. Explain two (2) data lines needed for I2C.

(4 marks)

2
7. Illustrate a functional microcontroller system circuit for ATmega2560.
(8 marks)

8. Describe working principle of servo motor. (2 marks)

9. Microcontroller, two switches and eight LEDs are used to function as


follows; when a switch 1 is pressed, LED at bit 0 to bit 3 blinking. When a
switch 2 is pressed LED at bit 4 to bit 7 will activate a running light.
(Assuming that you are using Arduino software IDE to solve this problem).

i. Construct a circuit with ATMega2560


(10 marks)
ii. Produce a C programming code
(10 marks)
iii. Illustrate a functional flow chart for the programming
(10 marks)

10. Microcontroller and LCD display are used to function as follows; LCD will
display the text "Embedded System", scrolls it offscreen to the left, then
offscreen to the right, then back to home. (Assuming that you are using
Arduino software IDE to solve this problem).

i. Construct a circuit with ATMega2560


(10 marks)
ii. Produce a C programming code
(10 marks)
iii. Illustrate a functional flow chart for the programming
(10 marks)

You might also like