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 / 6257
6256  |  6258
Subject: 
Encoders
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 20 May 1999 01:27:04 GMT
Original-From: 
Joe Marie J. Maja <MAJA@ROBOTICS.saynotospamIS.TOHOKU.AC.JP>
Viewed: 
954 times
  
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



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