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 / 1555
1554  |  1556
Subject: 
Re: timing
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 27 Feb 1997 20:59:52 GMT
Original-From: 
Mike Ross <MROSS@antispamOUTLAND.JSC.NASA.GOV>
Viewed: 
2248 times
  
On Thu, 27 Feb 1997, Mike Degon wrote:

Hi-
I'm attempting to write an assembly routine to control a pulse width, but I
can't seem to get the timing down.  For example, I can output a 3.33ms
pulse width, but if I run the routine again, it sometimes jumps to 3.5ms,
and then jumps back down to 3.33ms the next time.  Why is this? Does it
have something to do with interupts wedging themselves into my code? Can I
turn off all interupts?  How about that heart beat? Can I turn it off? Or
turn off the whole LCD display, for that matter, because I'm not using it?
Sorry about all the questions, but I'm in desperate need of some answers.


Mike,

Not enough info to determine your problem.  Are you using the Output
Compare functions, or are you trying to emulate that functionality some
way?  The OC lines are hardware-set, so they go off whenever the
free-running counter matches some value - the interrupt routine just
resets the flag so it can fire again.  Other interrupt routines won't
interfere.

The Handyboard has two OC lines available, so you can get 2 PWM outputs
with very little computational overhead.  Just keep the TOCx register
loaded with the number of 0.5 microsecond clicks in your pulse.


-mike



* Michael L. Ross/C33 | Lockheed Martin Eng & Sci Svcs Co. ****
* Robotics Department | 2400 Nasa Rd. 1, Houston, TX 77058*****
* (281)333-7094; (281)333-6071 fax*    #include <disclaimer.h>*
* Finger me for my public key.  mross@outland.jsc.nasa.gov ****



Message is in Reply To:
  timing
 
Hi- I'm attempting to write an assembly routine to control a pulse width, but I can't seem to get the timing down. For example, I can output a 3.33ms pulse width, but if I run the routine again, it sometimes jumps to 3.5ms, and then jumps back down (...) (28 years ago, 27-Feb-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