Encoder velocity....


Results 1 to 12 of 12

Threaded View

  1. #6


    Did you find this post helpful? Yes | No

    Default Re: Encoder velocity....

    Quote Originally Posted by Heckler View Post
    What does the value "mills" represent?
    it's the command(value) of the clock in the atmega.
    Quote Originally Posted by Heckler View Post
    Is it the time between encoder marks?
    No. It is simply the current time. That's why the newtime-oldtime statement,
    Quote Originally Posted by Heckler View Post
    What PIC are you using?
    Quote Originally Posted by Heckler View Post
    Does it have internal timers?
    If so you could use an interrupt to start the timer at each mark on the encoder and then check the timer on the next interrupt.
    This is my question... what is the command for accessing the internal clock? I may be looking in the wrong places but I can't find it anywhere. I see stuff that appears to be timers, and I guess that would work, but can't I just ask the PIC "What time is it now?" Is it not keeping a clock cycle tally from bootup?
    Quote Originally Posted by Heckler View Post
    or if you don't need your PIC to do something else while waiting for the next mark you could start incrementing a counter variable when you detect the first mark and then stop incrementing on the next mark and see what the value is. Or if the encoder is going to stop dead at the end of travel you could turn off the motor if the count reaches a high enough value to indicate it has stopped or slowed.
    If it stops dead it will destroy itself. It has to stop on deceleration before it binds too much.
    Last edited by thasatelliteguy; - 18th April 2014 at 14:33.

Similar Threads

  1. 18F2431 QEI in Velocity mode
    By sean-h in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st February 2011, 16:59
  2. User Position, Velocity & Time II (D1h)
    By dj.lambert in forum GPS
    Replies: 2
    Last Post: - 31st July 2009, 09:21
  3. Encoder problem
    By precision in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th September 2006, 22:21
  4. rf encoder/decoder
    By a_critchlow in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd February 2006, 11:58
  5. Quadrature Encoder
    By Plasmajocky in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th June 2004, 17:35

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts