Timer Question


Results 1 to 2 of 2

Thread: Timer Question

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    how about something like
    Code:
    OPTION_REG.7 = 0 ' Enable pull-up on PORTB
    
    CopperSheet var PORTB.0
    LED         var PORTB.1
    Delay       var word
    
    Start:
        delay=0
        while (coppersheet=0) and (delay!=2000)
              pause 1
              delay=delay+1
              wend
       
       if delay=2000 then 
          toggle LED       
          endif
       
       goto start
    untested but.. my last brain cell tell it's suppose to work or give you some pointers.
    Last edited by mister_e; - 23rd October 2005 at 02:00.
    Steve

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

Similar Threads

  1. Simple Timer question
    By jimseng in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th September 2009, 00:12
  2. Watchdog Timer Question
    By kevj in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th March 2008, 02:56
  3. Timer Question 16f877
    By Bonxy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th November 2005, 09:40
  4. Timer / CCP Question
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd November 2005, 09:22
  5. timer question (probably for Mel)
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th September 2005, 07:52

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