To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 1912
1911  |  1913
Subject: 
NOTE 04/10/97 10:50:15
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 10 Apr 1997 15:50:10 GMT
Original-From: 
Ericson Mar <EMAR@CSFBG.CSFB.spamlessCOM>
Reply-To: 
<EMAR@CSFBG.CSFB.COMsaynotospam>
Viewed: 
1359 times
  
     Hi,

     Can someone help me understand encoders.asm?

     This is what I deduced from the code and I'm wondering if my guess is
     correct.

     1. When TIC3 and TIC2 inputs are changed, an "interrupt" in execution
     occurs and and execution immediately jumps to the address stored at
     the location TIC3INT and TIC2INT. (In this case, Port0_ShaftInt,
     Port1_ShaftInt)

     2. But for the interrupt to actually execute, TLFLG1 must allow it.
     For TIC3 and TIC2, this must be true:

     TLFLG1 =  %XXXXXXX1     ->   TIC3 change causes an interrupt
     TLFLG1 =  %XXXXXX1X     ->   TIC2 change causes an interrupt

     TLFLG1 becomes %-------1 and %------1- on TIC3 and TIC2 changes
     respectively. So each bit must be turned off by the line
     BCLR   TLFLG1,X %11111110      and
     BCLR   TLFLG1,X %11111101      respectively,
     otherwise, the interrupt will keept on executing after the very first
     change in state of TIC3 or TIC2, respectively.

     3. TCLT2 stores a byte which when set to %00001111, makes the TIC3 and
     TIC2 interrupts happen when either inputs change state from 0 to 1.
     (What is at TCLT2 to make it interrupt on a 1 to 0 change?)


     So, am I understanding the code correctly, or am I just hallucinating.
      :)

     Thanks for any help.



Message has 1 Reply:
  Re: NOTE 04/10/97 10:50:15
 
OK, I haven't looked at encoders.asm but if the following doesn't help just send more questions. (...) Sounds about right. (...) TCTL2 sets rising, falling, or both edge modes; TMSK1 arms interupts; IC event sets the TFLG1 register. (...) correct (...) (27 years ago, 14-Apr-97, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR