Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MC68HC11 and the HCSim11 simulator

  1. May 27, 2007 #1
    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.
     
  2. jcsd
  3. May 28, 2007 #2

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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
     
  4. May 28, 2007 #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?
     
  5. May 28, 2007 #4

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    $FFF2 and $FFFE are memory addresses? If so, what are the contents of those memory addresses? Jumps to other addresses?

    - Warren
     
  6. May 28, 2007 #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: May 28, 2007
  7. May 28, 2007 #6

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Again...

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

    - Warren
     
  8. May 28, 2007 #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?
     
  9. May 29, 2007 #8

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: MC68HC11 and the HCSim11 simulator
  1. Simulating the universe (Replies: 15)

Loading...