联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> CS作业CS作业

日期:2024-12-09 03:40

Department of Electrical and Electronic Engineering

EIE373 Microcontroller Systems and Interface

Laboratory Exercise 3: AVR Interrupt Programming

Objective: To develop C programs with interrupts under the Arduino platform.

Equipment: Atmel Studio and the Arduino Starter Kit

Procedure:

Section A: Write a single C program to implement two applications in Lab 2.

Implement Sections B and C of Lab 2 in the ArduinoUno so that two applications (traffic light and counting) can be executed at the same time. Note that CTC mode should be used. The clock frequency of the Arduino Start Kit is  16 MHz. Note that you should write a simple application (e.g., flash one LED only) to check whether you can set a timer properly by using an interrupt.

Important information:

You  must  use  interrupts  to  implement  these  two  applications  (i.e.,  timer  and  counter- programming). Polling in timer programming is not accepted.

Section B: Replace the counting application by using an external hardware interrupt.

In Section A, counter programming is used to implement the application. In this section, an external hardware interrupt INT0 is used as a counter to implement the same application.

Section C: Use an external hardware interrupt to enable the simulation of the traffic lights.

Connect a switch to an external hardware interrupt INT1 pin. Write a C program so that the traffic light simulation can be started by pressing the switch once. If the switch is pressed again, the simulation will be stopped (i.e., all LEDs will be OFF).

Demonstrate your applications in Sections A,B, and C to our student helpers.

Instructions:

1.   You are required to demonstrate your programs to our student helpers.

2.   Zip all programs (including the whole project) in Sections A, B, and C into a single file. Submit it to Blackboard.

3.   Deadline: Check the course information.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp