Docsity

ECE 4175 Lab Assignment 1 - Fall 2002, Lab Reports of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 4175 RPK/RPY
Fall 2002
Lab Assignment 1
Due: Before class on Wed, August 28th
1) You will need to enter the code on the following page (into a text file), assemble
it using MPLab, and run it. It will “count” through the three red LEDs near the
top center of the board.
2) You will need to find suitable values for L_COUNT_INIT, M_COUNT_INIT,
and H_COUNT_INIT so that “DoSomething” is called once per second (therefore
counting at a rate of once per second).
3) You will need to print out a copy of the .LST file (assembler output file) to turn in
with your completed lab. Comment your code! (not just the provided comments)
4) Lab writeup must include a cover page with your name, the lab number, and the
class and section (ie, “ECE 4175 AASU/RPK” or “ECE 4175 GaSoU/RPY”).
5) Take your completed lab report to the lab and demonstrate your program by the
due date to received full credit.
pf3
pf4

Partial preview of the text

Download ECE 4175 Lab Assignment 1 - Fall 2002 and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

ECE 4175 RPK/RPY

Fall 2002

Lab Assignment 1

Due: Before class on Wed, August 28 th

1) You will need to enter the code on the following page (into a text file), assemble

it using MPLab, and run it. It will “count” through the three red LEDs near the

top center of the board.

2) You will need to find suitable values for L_COUNT_INIT, M_COUNT_INIT,

and H_COUNT_INIT so that “DoSomething” is called once per second (therefore

counting at a rate of once per second).

3) You will need to print out a copy of the .LST file (assembler output file) to turn in

with your completed lab. Comment your code! (not just the provided comments)

4) Lab writeup must include a cover page with your name, the lab number, and the

class and section (ie, “ECE 4175 AASU/RPK” or “ECE 4175 GaSoU/RPY”).

5) Take your completed lab report to the lab and demonstrate your program by the

due date to received full credit.

movlw M_COUNT_INIT ; movwf M_COUNT ;Re-initialize M_COUNT decfsz H_COUNT,1 ;Count down until H_COUNT Reaches Zero goto MainLoop ; if not zero, goto top of loop call DoSomething movlw H_COUNT_INIT movwf H_COUNT goto MainLoop

DoSomething incf LED_CPY,1 ;increment LED Copy movf LED_CPY, movwf PORTD ;Write out to PortD ( where RD[2:0] drive LEDs) return

end