MC68HC11 and the HCSim11 simulator

  • Thread starter addle_brains
  • Start date
  • Tags
    Simulator
In summary, the program counter is changed to a location that's outside the boundaries of your memory, resulting in an error. The memory addresses $FFF2 and $FFFE contain information about the location of the ROM, so it is likely that they are what is causing the error.
  • #1
addle_brains
8
0
Hey everyone, new here.

I am currently doing an assignment to write a program in assembly for the MC68HC11 microcontroller using the HCSim11 simulator. The program must make use of the IRQ request line. On Strobe A rising edge, a count from 0 to a set maximum (the maximum is set by switches PC0 - PC4) will begin and display the numbers on the LCD screen.

Now, I know pretty much how to do this. I had the program working and all, but I made some changes according to the assignment guidelines and now I get an error. The program waits for an interrupt, and when I switch strobe A on, i get a warning:

"The PC is placed on an address outside the list window. The disassembler window is made active so you can still trace the program counter."

I have retraced steps, followed examples and I cannot figure out how to fix this, let alone what it means. Any help would be great, seeing as people in my course, including instructors, are not offering any. Googleing has been fruitless.
 
Computer science news on Phys.org
  • #2
It means the program counter (PC) has been changed to a location that's outside the boundaries of your memory. In other words, you jumped to a memory location that doesn't exist.

Chances are, you set up some kind of an interrupt vector, and that vector is incorrect.

- Warren
 
  • #3
I have set up an IRQ and RESET vectors, $FFF2 and $FFFE respectively,as per the assignment details. Yet, when the interrupt is set, I still get the error. Can I submit my code and someone could maybe tell me what's wrong?
 
  • #4
$FFF2 and $FFFE are memory addresses? If so, what are the contents of those memory addresses? Jumps to other addresses?

- Warren
 
  • #5
The assignment specifications request that we assign interrupt and RESET vector addresses (among others including LCDDATA and Port controls) thusly:


IRQ EQU $FFF2 IRQ vector
RESET EQU $FFFF RESET vector
 
Last edited:
  • #6
Again...

What is contained in those memory addresses, $FFF2 and $FFFE?

- Warren
 
  • #7
In my code? I can't really remember, I'm not at home, but just stuff like LDAA commands or CLRA. The memory map says that those addresses are for ROM so it shouldn't matter, should it?
 
  • #8
Well, when your interrupt request is activated, the microcontroller jumps to whatever address is stored in $FFF2-3. You should probably know what's in those memory locations, so you know where the jump is going.

- Warren
 

Related to MC68HC11 and the HCSim11 simulator

1. What is the MC68HC11?

The MC68HC11 is a microcontroller developed by Motorola in the 1980s. It is a popular choice for embedded systems due to its low cost, low power consumption, and versatile features.

2. What is the HCSim11 simulator?

The HCSim11 simulator is a software tool used to simulate the behavior of the MC68HC11 microcontroller. It allows users to write and test programs without the need for physical hardware.

3. How is the MC68HC11 programmed?

The MC68HC11 can be programmed using assembly language or a high-level language such as C. The HCSim11 simulator provides a user-friendly interface for writing, testing, and debugging programs in both languages.

4. What are the advantages of using the MC68HC11 and HCSim11?

The MC68HC11 and HCSim11 offer a cost-effective and efficient way to develop and test embedded systems. They also have a large community of users, making it easy to find resources and support for programming and troubleshooting.

5. Can the HCSim11 simulator be used for other microcontrollers?

While the HCSim11 simulator was specifically designed for the MC68HC11, it can also be used to simulate other microcontrollers that use a similar instruction set. However, some features may not be available for other microcontrollers.

Similar threads

  • Electrical Engineering
Replies
1
Views
2K
  • Programming and Computer Science
Replies
29
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Electrical Engineering
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Programming and Computer Science
Replies
4
Views
2K
Back
Top