Rc PCM signal Read (Help)


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Puerto Rico
    Posts
    133

    Question Rc PCM signal Read (Help)

    '** R/C **
    'Measure the pulse width of the incoming RC signal


    PulsIn Throtpin, 0, Throttle


    IF Throttle = 0 Then
    GoTo EmergencyOff
    EndIF

    IF Throttle < ThrottleTrim - 6 Then
    MSG_LCD=5
    GoTo EmergencyOff
    endIF


    PumpMath = (Throttle - ThrottleMin) * 100 / dioScalefactor

    if (PumpMath > 100) or (PumpMath <=0) then
    PumpMath=1
    endif

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


    Did you find this post helpful? Yes | No

    Default

    and the problem is???

    BTW i see some things that should be consider about the maths
    Code:
    PumpMath = (Throttle - ThrottleMin) * 100 / dioScalefactor
    use some () for your math can save your 6 o'clock...
    Code:
    PumpMath = ((Throttle - ThrottleMin) * 100) / dioScalefactor
    but as we don't have many details... it's hard to know what's wrong. Tell us the whole story including the PIC model, wich pins you're using and blah blah blah will really help
    Steve

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

Similar Threads

  1. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  2. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  3. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  4. Rc signal help
    By geckogrotto in forum mel PIC BASIC Pro
    Replies: 42
    Last Post: - 27th August 2006, 00:10
  5. How to Read r/c signal PCM
    By jetpr in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2005, 07:06

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