Try this

by (Login burger2227)
R

You can count the 1KHZ pulses from the port, but a lot of code may mess it up:

t! = TIMER + 1    'count for 1 second. Single allows start in mid second

DO WHILE t! > TIMER

DO: LOOP UNTIL (INP(ADD% + 1) AND 8)   'wait for hi pulse from external circuit to S3

count = count + 1

DO:  LOOP UNTIL (INP(ADD% + 1) AND 8) = 0  'wait for low pulse

LOOP

PRINT count

Ted



    
This message has been edited by burger2227 from IP address 71.60.226.47 on Apr 1, 2008 7:58 AM
This message has been edited by burger2227 from IP address 71.60.226.47 on Mar 31, 2008 5:08 PM
This message has been edited by burger2227 from IP address 71.60.226.47 on Mar 31, 2008 4:23 PM
This message has been edited by burger2227 from IP address 71.60.226.47 on Mar 31, 2008 3:25 PM

Posted on Mar 31, 2008, 3:23 PM
from IP address 71.60.226.47

Respond to this message   

Goto Forum Home


Response TitleAuthor and Date
Don't forget operator precedence, Ted on Apr 1
 * I did, thanks on Apr 1