Laboratory 4 - LCD Stop Clock
Laboratory 4 - LCD Stop Clock
Faculty of Engineering
ENGR2105
Engineering Laboratory and Design III
Laboratory #4
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
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.
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.
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.