Can PBP read optical encoder damn fast? :)


Results 1 to 40 of 47

Threaded View

  1. #31
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: Can PBP read optical encoder damn fast? :)

    You could always write a little program to test your supposition and find out , you never know you may learn something


    Code:
    TOUCH                var byte
    A   VAR TOUCH.0
    B          VAR TOUCH.1
    RES        var byte    
        
        
    touch = 4
    Debug 9,"XOR TRUTH TABLE"
    Debug ,13 ,10,"A",9,"B",9,"A^B",9,"CUT",13 ,10
    while touch
        touch=touch-1 
        touch=~touch 
    ;CODE UNDER TEST
       IF A = 1 or  B = 1  AND A <> B THEN 
           RES=1
       ELSE
          RES=0
       ENDIF
       DEBUG #A,9,#B,9," ",#A^B ,9," ",#RES ,13 ,10
       touch=~touch     
    WEND
    Last edited by richard; - 6th June 2020 at 07:46. Reason: white space
    Warning I'm not a teacher

Similar Threads

  1. HEDS5540 optical encoder
    By louislouis in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 11th October 2016, 23:23
  2. how to read ky40 mechanical encoder ?
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 25th October 2015, 16:22
  3. Probe to read quadrature encoder with DT_INT need help
    By phoenix_1 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 31st August 2009, 20:43
  4. USB Optical mouse as motor encoder
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th August 2008, 15:09
  5. Damn these low power PIC and other Microcontrollers
    By keithdoxey in forum Off Topic
    Replies: 8
    Last Post: - 12th November 2006, 21:52

Members who have read this thread : 2

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