can someone help me with RCTIME


Results 1 to 26 of 26

Threaded View

  1. #1
    Join Date
    May 2007
    Posts
    26

    Unhappy can someone help me with RCTIME

    I have been having problem getting RCTIME to work it always results in 1 even when nothing is connected to it. I have a feeling it has something to do with the way I have analog set up, but I haven't been able to figure it out.

    the code for serial output and delays is working fine. but I just get a constant stream of 1's no matter what I do. If anyone could help it would be awesome!

    Code:
    '---clock settings
            define OSC 8
            OSCCON = %1111110 ' sets internal osc to run at 8MHZ
    
    '----------turn analog on porta off, and use as digital input/output
            CMCON = 0 'Comparators ON (right?)
            ANSEL = 1 'A/D ON -- Port pins all analog (I hope)
    '----------
    
    '---** Constants
    
    rcpin var porta.3
    
    '---**variables
    
    rcreturn var byte
    
    '------**main program
    
    
    
    loop:  
    
    '----its rctime!
    pause 1000
    
    high rcpin
    pause 5 
    rctime rcpin,1,rcreturn
    low rcpin
    
    
    '----(end rctime) shows over folks ^^
    
    
    
    '----send serial feedback      
            serout2 porta.0, 16468, ["rc time was: ",dec rcreturn] 'call for data    
     '-----end serial feedback
    
    goto loop   'loop forever
    end
    Last edited by gandora; - 15th May 2007 at 10:28. Reason: missing code

Similar Threads

  1. PULSIN & RCTIME resolution calculation
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th January 2010, 14:34
  2. POT and RCTIME instructions
    By ruijc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th November 2007, 15:47
  3. RCtime timeout
    By chriroz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2007, 15:45
  4. RC - connection using RCTime produces strange results
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th February 2007, 16:16
  5. PULSIN and RCTIME
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th November 2004, 14:45

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