EIE373 Microcontroller Systems and Interface Laboratory Exercise 3: AVR Interrupt ProgrammingR

Java Python 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 Se EIE373 Microcontroller Systems and Interface Laboratory Exercise 3: AVR Interrupt ProgrammingR ction 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         

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值