Rc signal help


Results 1 to 40 of 43

Thread: Rc signal help

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Hi, Gecko

    Some little gags here and there ... but try it !!!


    '12F675
    @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF ' clock source internal
    OPTION_REG.5 = 0

    DEFINE PULSIN_MAX 2500
    DEFINE OSCCAL_1K 1

    CMCON = 7 'Tout digital pour 12F675
    ADCON0 = 0 'ADC off "
    ANSEL = 0
    VRCON = 0



    Pulselen var Byte ' Pulselen can be 0 - 255, 100 = 1 ms, 200 = 2 ms
    Init var Byte ' Init used to flash LED
    Compte var Byte

    In var GPIO.3
    Led var GPIO.1

    Clear ' set all variables = 0

    TRISIO = %001000

    High Led

    ReadPWM:

    PulsIn In, 1,Pulselen ' pin 4 - read high pulse length, times out after .65535 seconds

    If Pulselen < 80 OR Pulselen > 220 Then

    Pause 15

    Compte = Compte + 1

    IF Compte // 16 THEN

    Pulsout Led, 10000

    ENDIF

    Else

    HIGH Led

    ENDIF

    GoTo ReadPWM

    END

    I'll do better next time ...

    Alain

    PS: ... breadboard verified .... Yess !!!
    Last edited by Acetronics2; - 26th August 2006 at 10:25.
    ************************************************** ***********************
    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. Replies: 24
    Last Post: - 1st December 2009, 08:01
  2. Decoding an incoming infrared signal: need advice
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th May 2008, 16:28
  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. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  5. Rc PCM signal Read (Help)
    By jetpr in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th March 2005, 03:37

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