1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RTI, TOI and TOC programming

Discussion in 'Assembly Language Programming (ALP) Forum' started by infinitig35, Oct 24, 2008.

  1. infinitig35

    infinitig35 New Member

    Joined:
    Oct 24, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Hello everyone. I have a homework problem that I'm stuck at, can someone give me a hint on how to proceed with this. Here's the problem:
    Write a program that uses both an RTI (Real Time Interrupt) and an TOI (Timer Overflow Interrupt) or a TOC (Timer Output Square). Have each of the interrupts do something different.

    thanks
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    This will depend very much on what the last few weeks' course content. These questions are not generic; they are very specific, so any answers will be completely useless unless we just happen to guess precisely what kind of hardware you're using.

    Do you understand the question? Whatever hardware you're using that will be the first step. If you don't, then either there's been no info on it in the course so far, in which case why is the teacher asking you, or you haven't been paying attention.
     
  3. infinitig35

    infinitig35 New Member

    Joined:
    Oct 24, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    I'm using the Motorolla M68HC11.
     
  4. infinitig35

    infinitig35 New Member

    Joined:
    Oct 24, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Where are the experts at??
     
  5. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    Where they always were. We don't have details on your hardware (which is more than just the chip - what is the development kit you're using?) so there's nowt we can do, unless one of us by pure chance just happens to have exactly the same as wot you've got on your desk.

    Where exactly are you stuck? Do you understand the assignment? Di you understand the concepts (which should have been explained in the course)? Have you designed the program yet? Have you started coding and hit a problem? Are the interrupts being generated correctly? How exactly are they being generated; what external hardware causes an interrupt?

    Generally interrupt processing goes along the lines of "ok, we got an interrupt, so disable interrupts to stop us disappearing up our own backside, and look to see what interrupted us. Then set a flag for the main program to pick up on the fact that an interrupt happened, re-enable interrupts and exit as quickly as possible."
    The main program needs to setup the interrupts of course, by setting the appropriate interrupt registers, and by checking periodically for whether or not any interrupt has occurred. If you know for certain that interrupts aren't that frequent, you MAY be able to do some limited processing within the interrupt routine, but generally you need to exit as quickly as possible because normally you don't know when the next interrupt will be.
     
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    Well said.
     

Share This Page