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 / 6260
6259  |  6261
Subject: 
RE: Encoders
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 20 May 1999 07:41:35 GMT
Original-From: 
Weng, Andrew <andrew.weng@STOPSPAMvalueoptions.com>
Viewed: 
915 times
  
I modified the sencoder() routines to work with quad encoders and a
direction decoding IC.  the encoder_counts now returns the correct count.  I
removed the velocity variable from the routine as well.
I think I changed encoder routines 2 and 4 and have the direction bits on 3
and 5.
I don't have them with me but I can send them if you want...

-Drew


-----Original Message-----
From: Joe Marie J. Maja [mailto:maja@robotics.is.tohoku.ac.jp]
Sent: Wednesday, May 19, 1999 9:27 PM
To: Fred G. Martin; HandyBoard
Subject: Encoders


Konnichiwa  !!

I am currently using the shaft encoder drivers of handy and it works
fine, until I implemented a PID (Position Control).  I need
to check the
direction of my mobot.  Which means that - if it goes backward, I need
to decrease the count and increase it if it goes forward.

I tried to use 74HC74 to check the direction of the rotation of the
encoder(My encoder have this sig A and sig B output).

and run this code

void check_right_encoder()  /*process*/
{
      while(1)
    {
        if (encoder1_counts!=0)
              {
                  if(digital(8)==0) {              /*check
the direction
of rotation */
                             counter_r--;
/*declared as global
*/
                              encoder1_counts=0;
                            }
                    else
                             {
                              counter--;
                               encoder1_counts=0;
                               }
               }
}

This works fine.

QUESTIONS:

Is there anyone who have tried to do the same thing, but
implemented it
in assembly - .icb?


joema






--
MIME ATTACHMENTS DISCARDED:

1.  Content-Type: text/html;
    charset="iso-2022-jp"
    Content-Transfer-Encoding: quoted-printable
    Content-Length: 5579



1 Message 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