About timing in pic basic pro


Results 1 to 3 of 3

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    mmm, something is not clear in your explanation....

    When you said, "PORTA.0 will be check for 30 second only" once PORTA.0=1 on or once you put the power on your PIC?

    Let's say once your put the power on your pic...
    Code:
            TRISA = 255
            TRISB = 0
            CounterA    VAR WORD
            PB          var PORTA.0
            OUT1        VAR PORTB.0
            OUT2        VAR PORTB.1
            
            PORTB = 0       ' Clear all leds
            CounterA = 0    ' Clear counter
    Start:
            while (CounterA<300) AND (PB=0)
                pause 100
                CounterA = CounterA + 1            
                wend
            
            if CounterA>=300 then
                OUT2 = 1
                else
                    OUT1 = 1
                endif
                
    Spin:   GOTO Spin
    Last edited by mister_e; - 4th October 2007 at 03:37.
    Steve

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

Similar Threads

  1. Looking at pic basic pro symbol values in mplab 8.15a simulator
    By ukemigrant in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 16th May 2009, 14:18
  2. I want to buy PIC BASIC PRO...
    By simransingh in forum General
    Replies: 2
    Last Post: - 30th October 2007, 18:13
  3. PIC BASIC or PIC BASIC PRO
    By kirkmans in forum USB
    Replies: 3
    Last Post: - 20th April 2007, 01:52
  4. Replies: 5
    Last Post: - 17th January 2006, 20:26
  5. How to use 93C46 Type EEPROM using PIC Basic PRo
    By in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st April 2003, 05:07

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