Hi Travin77 - trying's sample waits for the pin to go low. If your button pulls an input high, just replace the "IF pb=0" with "IF pb=1"Originally Posted by Travin77
Or do you need to do something different than just wait for a button press?
Arch
Hi Travin77 - trying's sample waits for the pin to go low. If your button pulls an input high, just replace the "IF pb=0" with "IF pb=1"Originally Posted by Travin77
Or do you need to do something different than just wait for a button press?
Arch
"Data sheets? I ain't got no data sheets. I don't need no data sheets. I don't have to read any stinking data sheets!"
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
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
Bookmarks