Timer Application


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Charudatt,



    Your program can use this example as a base,

    It could look something like the following:

    LED1 var GPIO.0 ; Or whatever pin works on your chip.
    LED2 var GPIO.1
    LED3 var GPIO.2

    FirstLed var byte
    SecondLed var byte
    ThirdLed var byte
    counter var byte


    Loop:

    ;Here your source gives you the values of the LED's length of time to stay on....


    FirstLed=7 ;these values you get from your source
    SecondLed=10
    ThirdLed=12

    ; Lets turn them all on!!!
    High LED1
    High LED2
    High LED3

    counter=FirstLed*1000
    Pause(counter);
    Low LED1;

    counter=(SecondLed-FirstLed*1000)
    Pause(counter);
    Low LED2;

    counter=ThirdLed-SecondLed*1000);
    Pause(counter);
    Low LED3;

    Goto Loop
    Last edited by Dwayne; - 16th February 2004 at 06:20.

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  3. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  4. Timer interrupt frequency
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th January 2009, 23:49
  5. timer interupt help 16f73
    By EDWARD in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd July 2005, 08:41

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