Lab1 - 2 Eng
Lab1 - 2 Eng
OBJECTIVE:
REFERENCES:
EXPERIMENT 1:
.include "m324PAdef.inc"
.org 00
ldi r16,0x01
out DDRA, r16
start:
sbi PORTA,PINA0
cbi PORTA, PINA0
rjmp start
Connect PA0 to a measurement channel on the TEST STATION and measure pulse forms
using an oscilloscope.
EXPERIMENT 2:
a) Write a subroutine Delay1ms and use it to write a program to generate a 1KHz square
wave on PA0.
b) Use this subroutine to write subroutines Delay10ms, Delay100ms, and Delay1s.
c) Use the Delay1s subroutine to write a program to blink/turn off an LED connected to
PA0.
https://doe.dee.hcmut.edu.vn/
LAB 1-2
DELAY WITH INSTRUCTIONS
EXPERIMENT 3:
a) Connect the necessary signals from an AVR port to the control signals of the shift
register on header J13. Connect the output of the shift register to a LED bar.
b) Using the sample programs from the experiment guide, write a program to create a
gradually lit LED effect from left to right, then gradually turn them off from left to right
after every 500ms.
https://doe.dee.hcmut.edu.vn/
LAB REPORT
Group:
Class Group: Subject:
EXPERIMENT 1:
EXPERIMENT 2:
EXPERIMENT 3:
https://doe.dee.hcmut.edu.vn/