0% found this document useful (0 votes)
104 views4 pages

Laboratory 4 - LCD Stop Clock

This document provides instructions for Laboratory #4, which involves developing an LCD stop clock using an AVR microcontroller. Students will use timers, interrupts, and I/O ports on the microcontroller to display the time on a 16x2 LCD. The clock will be controlled by two push buttons to start/stop and reset. The objectives are to learn about microcontroller peripherals and real-world applications. Students must demonstrate a working stop clock on a breadboard by the deadline and submit a laboratory report with the C code.

Uploaded by

Reese
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views4 pages

Laboratory 4 - LCD Stop Clock

This document provides instructions for Laboratory #4, which involves developing an LCD stop clock using an AVR microcontroller. Students will use timers, interrupts, and I/O ports on the microcontroller to display the time on a 16x2 LCD. The clock will be controlled by two push buttons to start/stop and reset. The objectives are to learn about microcontroller peripherals and real-world applications. Students must demonstrate a working stop clock on a breadboard by the deadline and submit a laboratory report with the C code.

Uploaded by

Reese
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

University of the West Indies

Faculty of Engineering

ENGR2105
Engineering Laboratory and Design III

Laboratory #4

LCD Stop Clock

Laboratory Date: March xx, 2021

Faculty of Engineering, UWI, Mona ENGR2105 Lecturer: Lindon Falconer


1 Objectives
 To become familiar with the following Atmel AVR microcontroller features
o Timer
o Interrupts (Timer and External)
o I/O Ports
 To become familiar with displaying characters on an LCD using a microcontroller.
 To become familiar with interfacing push buttons with a microcontroller.
 To write advanced C programs.
 To develop a real-world application using an AVR Atmel microcontroller.

2 Preparation
 Review the following topics in the ECSE2104 lectures.
o Timers/Counter
o Timer and external interrupts
o I/O Ports
 Acquaint yourself with the above peripheral features on the Attiny2313/4313
microcontroller using the microcontroller’s datasheet.
 Review AVR LCD Interfacing Video on ENGVLE

3 Resources needed for the Laboratory

Components Quantity Equipment/Software Quantity


(Supplied by students) (Supplied by FoE/Student)
ATtiny2313/Attiny4313 1 AVR ISP Programmer 1
Microcontroller
1 AVR Programmer Interface and 1
16 X 2 LCD Development Board with power
supply
Push Button 2 Computer loaded with Atmel Studio 6 1
(Normally Opened) or 7
10K Ω 3 LCD C-program Libraries
POT (5K, 10k or 100k) 1
22pF capacitor 2
8MHz Crystal 1
100nF Capacitor 1
AVR ISP Programmer 1

Faculty of Engineering, UWI, Mona ENGR2105 Lecturer: Lindon Falconer


4 Instructions
Develop an embedded system based real-time stop clock that displays hours, minutes, seconds and
one-thousandths of a second on a 16 X 2 LCD, as shown in the diagram in Figure 1.

Figure 1: Display showing 1 hour, 20 minutes and 23.157 seconds.

4.1 Design Specifications

1. The program should be developed in the AVR C programming language using the Atmel
Studio application.
2. The program should use Timer and Interrupt peripheral features of the microcontroller.
3. The device should be implemented using the Atmel attiny2313 or attiny4313
microcontroller.
4. The device should be developed using two pushbuttons. One to start or stop the clock, the
other to reset the clock.
5. The START/STOP and RESET pushbuttons should be connected to the microcontroller’s INT0
and INT1 pins, respectively.
6. The LCD should be configured for four bits mode and connected to the PORTB of the
microcontroller, as shown in Figure 2.
7. When the device is powered on, the display should show 00:00:00.000. When the start/stop
button is pressed, the clock should start to count. When the start/stop button is pressed
again, the clock should stop and continue to display the last count after the press; another
press should enable counting from where it stopped. Pressing the reset button should set
the time to the initial state. NB: The reset button is only active when the clock is stopped.

Faculty of Engineering, UWI, Mona ENGR2105 Lecturer: Lindon Falconer


4.2 Implementation

The schematic diagram of the digital stop clock is shown in Figure 2. Students should use the LCD C-
Program library (see ENGVLE) in the software implementation. The stop clock should be simulated
on proteus or implemented on the AVR Programmer Interface and Development Board (supplied by
the lecturer) to speed up the hardware and software development process. The final
implementation should be done on a breadboard using your components.

Figure 2: Schematics showing microcontroller and LCD

5 Presentation and File Upload


The working stop clock, implemented on a breadboard, should be demonstrated to the Lecturer or
Laboratory Administrator.

The deadline for the demonstration is March xx, 2021, at 1:00 PM.

A laboratory report must be written in the standard format for course ENGR2105. The paper must
contain the final C-program that was used in the demonstration. The document should be given a
file name in the format ENGR2105_LAB4_IDNUMBER.pdf and uploaded to the ENGVLE website in
the LAB4 Solution folder.

The deadline for uploading the file is March xx, 2021, at 11:59 PM.

Faculty of Engineering, UWI, Mona ENGR2105 Lecturer: Lindon Falconer

You might also like