1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

jsr changing registers in 68hc11?

Discussion in 'Embedded' started by Mr Dump, Apr 4, 2007.

  1. Mr Dump

    Mr Dump Guest

    Hi All, I hope this is the right forum, I have a 68hc11
    microcontroller, and im using BR to debug my buggy code (it has the
    Buffalo monitor)
    The gist of it is: I load numbers into registers and then jump to a
    subroutine, i check the numbers before and after the jump, but they
    have changed- any clues to what is happening?
    cheers,
    dt
     
    Mr Dump, Apr 4, 2007
    #1
    1. Advertising

  2. Mr Dump

    Eric Guest

    On Apr 4, 9:56 am, "Mr Dump" <> wrote:

    > The gist of it is: I load numbers into registers and then jump to a
    > subroutine, i check the numbers before and after the jump, but they
    > have changed- any clues to what is happening?


    Is an interrupt occuring?

    When you say "registers", do you mean MCU registers or I/O control
    registers?

    Buffalo is not a very good way to debug since it is invasive. You
    might consider the 9s12 devices at some point because of their
    superior BDM debugging.

    Eric
     
    Eric, Apr 4, 2007
    #2
    1. Advertising

  3. Mr Dump

    Mr Dump Guest

    On Apr 5, 7:12 am, "Eric" <> wrote:
    > On Apr 4, 9:56 am, "Mr Dump" <> wrote:
    >
    > > The gist of it is: I load numbers into registers and then jump to a
    > > subroutine, i check the numbers before and after the jump, but they
    > > have changed- any clues to what is happening?

    >
    > Is an interrupt occuring?
    >
    > When you say "registers", do you mean MCU registers or I/O control
    > registers?
    >
    > Buffalo is not a very good way to debug since it is invasive. You
    > might consider the 9s12 devices at some point because of their
    > superior BDM debugging.
    >
    > Eric

    Hi Eric,
    Thanks for responding!
    by registers, I mean MCU registers, Reg X and Reg B.
    Im using Buffalo, could the buffalo BR command be a cause?- i'm using
    that to halt things to look at the registers.
    I thought for a while I might have been using direct addressing by
    accident instead of load immediate, but the check before the jump
    subroutine command shows the number I want, but the check immediately
    after the jump shows a
    change! It is weird, the code works when loaded into ram, but I needed
    it put in EEPROM, so I changed address labels around to suit etc....
    and partial operation occurs, but not quite what I want, and it seems
    to be at this jump point, that things are going amiss.
    cheers,
     
    Mr Dump, Apr 6, 2007
    #3
  4. Mr Dump

    Mr Dump Guest

    On Apr 6, 12:23 pm, "Mr Dump" <> wrote:
    BWAHHHH!! He he he found it- it's NOT changing the registers at
    all!!!
    The same routine is called for earlier in the initialisation setup- so
    when the break point exited,
    I was looking at *those* values! It pays to have a nights sleep on
    the matter!
    Thanks Eric for your time!
    [SNIP]
     
    Mr Dump, Apr 6, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Pohlmann
    Replies:
    3
    Views:
    412
    42Bastian Schick
    Aug 25, 2003
  2. ams

    Motorola 68HC11 Tutor Trainer

    ams, Jan 19, 2004, in forum: Embedded
    Replies:
    0
    Views:
    445
  3. Jeff Fox

    68HC11 clocks

    Jeff Fox, Apr 5, 2004, in forum: Embedded
    Replies:
    2
    Views:
    411
  4. bruce varley

    Strange behaviour, I/O port, 68HC11

    bruce varley, Oct 17, 2004, in forum: Embedded
    Replies:
    2
    Views:
    231
    =?iso-8859-1?Q?Ren=E9=20K=F6nig?=
    Oct 17, 2004
  5. Ravi kumar.N
    Replies:
    1
    Views:
    316
    Thad Smith
    Mar 14, 2005
Loading...

Share This Page