HEDS5540 optical encoder


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,610


    Did you find this post helpful? Yes | No

    Default Re: HEDS5540 optical encoder

    You need to define the constant PRECISION and assign it a value equal to the number of bytes to use for the values in the math routine. And you need to do this before including N-Bit. In this case it looks like Richard opted for 32bit values (4 bytes)
    Code:
    PRECISION CON 4 SYSTEM    '32bit values
    Include "N-Bit_Math.pbp"
    If you open the N-Bit file you'll find a link to the thread on this forum: http://www.picbasic.co.uk/forum/showthread.php?t=12433

    /Henrik.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: HEDS5540 optical encoder

    Yes, right. I forgot this line. After putting this line as you say the code compiles OK. Now I do some testing and trying to understand the code.

Similar Threads

  1. 2 Beam Optical Pulse Generator
    By WOZZY-2010 in forum Schematics
    Replies: 8
    Last Post: - 6th April 2010, 04:03
  2. USB Optical mouse as motor encoder
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th August 2008, 15:09
  3. optical voice link
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th May 2008, 21:11
  4. Using a optical coder
    By debutpic in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 16th October 2007, 04:57
  5. Using the optical sensor from a ball mouse
    By lsteele in forum General
    Replies: 5
    Last Post: - 5th September 2007, 16:45

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