Quad encoder problems


Results 1 to 40 of 52

Threaded View

  1. #28
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default One other thing...

    Since you are using a serial LCD and software based serial routine, the interrupts will be disrupting the timing of the serial output. I would recommend using HSEROUT. The timing won't be affected with the interrupts.

    EDIT:
    Here is how you can do this:

    1) Switch your serial cable to RB2 (pin 8)

    3) Setup the HSER defines:
    Code:
    'Setup for 9600 baud 
    ' Set transmit register to TXEN =1 (TX enabled) and BRGH = 1
         DEFINE HSER_TXSTA	24h
    ' Set baud rate
         DEFINE HSER_BAUD	9600
    3) Change your SEROUT2 commands to HSEROUT.
    Code:
    HSEROUT [254, 88] 'Clear LCD
    
    and
    
    HSEROUT [254, 71, 1, 1, "ROT1:", DEC2 RotEnc1_val," ROT2:", DEC2 RotEnc2_val]


    Steve
    Last edited by SteveB; - 30th September 2006 at 17:35.

Similar Threads

  1. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 14:45
  2. Instant Int and encoder (Elect. Gearing)
    By boroko in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 29th November 2009, 02:29
  3. encoder HEDL 5540
    By kutsi in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th June 2007, 14:00
  4. quad encoders
    By cpayne in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 13th March 2007, 17:49
  5. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 21:56

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