Timer Of 40 Days 12f675 Or 16f628


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Talking Timer Of 40 Days 12f675 Or 16f628

    Darrel,

    You can explain to me as making it I don't understand and forgive my ignorance.

    Thank you

    Leonardo


    Quote Originally Posted by Darrel Taylor
    Take a look at this Elapsed Timer Demo.

    http://www.picbasic.co.uk/forum/showthread.php?t=190

    Then, all you need to do is this...
    Code:
    Loop:
        if (DaysChanged= 1) and (Days = 40) then
            DaysChanged= 0
            Gosub ResetTime
            ' ... Do something here ...
        endif
    Goto Loop

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Nope, Sorry! It's not going to work with the Demo version.

    Come back after you buy PicBasic Pro, and I'll tell you all about it.
    <br>
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    Can I make the program with the version demo, if it is can he/she tell this way me as?.

    Thank you again






    Quote Originally Posted by Darrel Taylor
    Nope, Sorry! It's not going to work with the Demo version.

    Come back after you buy PicBasic Pro, and I'll tell you all about it.
    <br>

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Well, if it doesn't need to be exact, you might do something like this.
    Code:
    Minutes   VAR  Byte
    Hours     VAR  Byte
    Days      VAR  Byte
    
    Wait40Days:
        For Days = 1 to 40
            For Hours = 1 to 24
                For Minutes = 1 to 60
                    PAUSE 60000         ; 60 Seconds
                Next Minutes
            Next Hours
        Next Days
    <BR><BR>
    Last edited by Darrel Taylor; - 13th August 2005 at 17:39.
    DT

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Hello Darrel,

    Thank you for the code, I want that when push RB.0 he lights the led on RB.1 after the fixed time lapses I have carried out the tests and I have not been able to make it work, you can help me and to say eats up I please make it.

    I am using a PIC16F628.

    Thank you






    Quote Originally Posted by Darrel Taylor
    Well, if it doesn't need to be exact, you might do something like this.
    Code:
    Minutes   VAR  Byte
    Hours     VAR  Byte
    Days      VAR  Byte
    
    Wait40Days:
        For Days = 1 to 40
            For Hours = 1 to 24
                For Minutes = 1 to 60
                    PAUSE 60000         ; 60 Seconds
                Next Minutes
            Next Hours
        Next Days
    <BR><BR>

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    <table><tr><td nowrap><img src="http://toons.artie.com/alphabet/ralph/arg-n-50-trans.gif"><img src="http://toons.artie.com/alphabet/ralph/arg-o-5O-tRr-a-pl0ase-ns.gif"></td></tr></table><br><br>
    Try going here... http://www.melabs.com/resources/index.htm#Manuals<br><br>

  7. #7


    Did you find this post helpful? Yes | No

    Talking Hello

    Hello Darrel, I have bought the PBP and I am happy, if I need its aid I can write to him?.

    Thanks

    Leonardo





    Quote Originally Posted by Darrel Taylor
    <table><tr><td nowrap><img src="http://toons.artie.com/alphabet/ralph/arg-n-50-trans.gif"><img src="http://toons.artie.com/alphabet/ralph/arg-o-5O-tRr-a-pl0ase-ns.gif"></td></tr></table><br><br>
    Try going here... http://www.melabs.com/resources/index.htm#Manuals<br><br>

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    You helps me with the code so that it works.

    Thank you


    '************************************************* ***************
    '* Name : TIMER 40 DAYS.BAS *
    '* Author : [select VIEW...EDITOR OPTIONS] *
    '* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] *
    '* : All Rights Reserved *
    '* Date : 13/08/05 *
    '* Version : 1.0 *
    '* Notes : *
    '* : *
    '************************************************* ***************
    ' Turn LED on. Interrupt on PORTB.0 (INTE) turns LED off.

    PUSH VAR PORTB.0
    LED var PORTB.1


    Minutes VAR Word
    Hours VAR Word
    Days VAR Word


    loop:
    HIGH LED
    GOTO LOOP


    OPTION_REG = $7f


    Wait40Days:
    For Days = 1 to 40
    For Hours = 1 to 24
    For Minutes = 1 to 60
    PAUSE 60000 ; 60 Seconds
    Next Minutes
    Next Hours
    Next Days






    Quote Originally Posted by Darrel Taylor
    Well, if it doesn't need to be exact, you might do something like this.
    Code:
    Minutes   VAR  Byte
    Hours     VAR  Byte
    Days      VAR  Byte
    
    Wait40Days:
        For Days = 1 to 40
            For Hours = 1 to 24
                For Minutes = 1 to 60
                    PAUSE 60000         ; 60 Seconds
                Next Minutes
            Next Hours
        Next Days
    <BR><BR>

Similar Threads

  1. Timer code examples for PIC 16F628
    By Tastature in forum mel PIC BASIC
    Replies: 6
    Last Post: - 22nd November 2013, 02:47
  2. Timer interrupt frequency
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th January 2009, 23:49
  3. dual 7-segment countdown timer code
    By dr.ragh in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 30th April 2007, 13:19
  4. Timer does not work 12F675
    By Leonardo in forum mel PIC BASIC
    Replies: 12
    Last Post: - 22nd September 2005, 21:12
  5. Button pressed time control
    By tanero in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 15th August 2005, 15:17

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