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 / 6889
6888  |  6890
Subject: 
PWM on tic3
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Wed, 13 Oct 1999 15:53:27 GMT
Viewed: 
614 times
  
Hi,

I want to get the width of a PWM on TIC3 Channel, I wrote an .asm but it
doesn't work, I don't know what's wrong?

I need your help.

Thanks in advance.

Said.

Here is the .asm program:


#include "c:\pcode\include\6811regs.asm"
* program equates

* variables

        ORG     MAIN_START

variable_width3     FDB     0

variable_frst3      FDB     0

subroutine_initialize_module:

#include "c:\pcode\include\ldxibase.asm"
* X now has base pointer to interrupt vectors ($FF00 or $BF00)

        LDD     #ic3Int
        STD     TIC3INT,X

        LDX     #BASE


  BSET TCTL2,X %00000001 /* Interrupts TIC3,TIC2 rising edge*/
  BSET TFLG1,X %00000001 /* Clear IC3,IC2 Flags */
  BSET TMSK1,X %00000001 /* Clear Mask For Interrupt */


        RTS





ic3Int:

BRSET TCTL2,X %00000001 second
BSET  TCTL2,X %00000001
LDD TIC3,X
SUBD variable_frst3
STD  variable_width3
LDX #BASE
BSET TFLG1,X %00000001
RTI

second
BSET TCTL2,X %00000010
LDD TIC3,X
STD variable_frst3

LDX #BASE
BSET TFLG1,X %00000001
RTI



Message has 1 Reply:
  interfacing the GP2D12
 
Somebody asked the other day about a problem interfacing the Sharp GP2D12. I didn't see an answer, and I just did it myself and solved the problem, so here is how to do it. For those who don't know, Sharp just came out with an IR ranging sensor good (...) (25 years ago, 14-Oct-99, 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