Recommendations - Model Train Controller


Results 1 to 40 of 102

Threaded View

  1. #31
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    in theory the right setting have to be
    Code:
    ANSEL=%00110001
    CMCON=7
    GPIO=0
    TRISIO=1
    and later i just change the main loop to...
    Code:
    Main:                               
            ADCIN 0, DUTYVAR3
            GOTO Main
    AND NOW it's working pretty good and smooth... well here...

    For once i found a use of the Left-Justified results... Never thought ADCIN handled it

    Make sure your Pot impedance meet the maximum recommended on.. 2.5 k if my memory serves me well. 10K here (EasyPic 4) still work fine..

    Also, as the ADC results is a 8 bit result, you should change the SPWM_RES to 255.
    Last edited by mister_e; - 15th February 2007 at 19:28.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Microstepper controller
    By aratti in forum Schematics
    Replies: 14
    Last Post: - 3rd January 2015, 17:52
  2. problem with the GSM controller
    By Dariolo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2009, 21:33
  3. Replies: 2
    Last Post: - 14th July 2008, 23:11
  4. Model Train controller - revisited
    By malc-c in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 8th May 2007, 10:40
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 15:44

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