Program time-out


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Yup

    I realized that the pause in trying's loop paused for 3 seconds. I changed the loop structure a little though I haven't had a chance to check it yet. Here it is:

    repeat
    repeat
    t=t+1 'added this
    pauseus 500 'added this
    until dtmf_ready=1 or t > 60000 'added this
    if t > 60000 then start 'added this
    gosub getdtmf
    password[c]=dtmf
    c = c + 1ause 500
    until c > 7

    this should give me a 30 timeout feature if I calc'ed it correctly. I am running 20 mhz. The dtmf_ready is a pin on the pic that waits for the dtmf decoder chip to go high which indicates that a tone has been decoded and is ready for the pic to "read". This pin stays high for as long as the individual holds the button down. hopefully this doesn't slow down the program any. Thanks

    Travin

  2. #2
    trying's Avatar
    trying Guest


    Did you find this post helpful? Yes | No

    Smile

    travin 77 I guess i should have gone into more detail it was just a ideal as I was walking out the door
    yes it's looking for a LOW pb and the pause time will add to total time of the loop. hope I didn't get you side tracked

Similar Threads

  1. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  2. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 03:55
  3. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 20:55
  4. Alarm Time
    By Santana in forum Code Examples
    Replies: 1
    Last Post: - 8th December 2006, 14:58
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 15:24

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