Recommendations - Model Train Controller


Results 1 to 40 of 102

Threaded View

  1. #20
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Malc ...

    Think you change your Duty VERY frequently ( it's only a train ...not a jetfighter !!! ) ... so you could insert some PAUSE 100 - 300.

    Secondly, you also could change DUTY ... only if the POT result changes.( a little Hysteresis w/ ADC could be useful ??? )

    Third, you could insert a smooth duty transition ...

    like that :


    ....

    Dutyvar3 = 0

    Main:
    ADCIN 0, D

    IF D <> DutyVar3 THEN

    IF Dutyvar3 > D then Dtemp = Dtemp - 1 '( 1, 5, 10 ... as INERTIA needed ! )
    IF Dutyvar3 < D then Dtemp = Dtemp + 1

    DutyVar3 = Dtemp


    ENDIF


    PAUSE 200 '( to be trimmed ... 200 for 1 Channel, 100 for 2
    Channels ...)

    GOTO Main

    ... or something like that !!!

    Alain
    Last edited by Acetronics2; - 12th February 2007 at 15:28. Reason: skipped PAUSE ...
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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