Micro-controller Programming Problem - Assembly

  • Thread starter crono1009
  • Start date
  • #1
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

  • Rotate.txt
    2 KB · Views: 446
Last edited:

Answers and Replies

Related Threads on Micro-controller Programming Problem - Assembly

  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
2
Replies
25
Views
7K
  • Last Post
Replies
6
Views
5K
Replies
10
Views
1K
Replies
12
Views
4K
Replies
3
Views
2K
  • Last Post
Replies
3
Views
10K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
2
Views
4K
Top