- #1
crono1009
- 15
- 0
Homework Statement
I am writing a program to loop (rotate) two lit LEDs through eight LEDs on my board.
For Example:
11000000 01100000 00110000 00011000 00001100 00000110 00000011
Where the ones are lit LEDs and the zeros are non-lit LEDs.
It is supposed to loop forever.
Homework Equations
N/A
The Attempt at a Solution
The program is in the text file attached. The program was pretty much already written for me. We had to take the tutorial code the looped one LED and allow it to loop two while also created a initialization subroutine.
This program worked the first time I built it though I recently built it again with no changes and it does not work, whilst simulating it loops through the Init subroutine forever.
My Questions:
What is cblock?, it isn't in the datasheet for my pic.
What does endc do? also not in the datasheet.
Why does my init subroutine continue to loop?
I'm very new to assembly programming, though I do have a background in VHDL, Verilog, C++, MATLAB, and JAVA.
Thank you.
EDIT: I found that the reason why it was continuously looping through the Init subroutine was because I forgot to add "goto Start" after org 0, though now it only flashes the LEDs once and then they turn off indefinitely.
Now it works, feel free to delete this post.
Attachments
Last edited: