Try thisby (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
from IP address 71.60.226.47 |
| Response Title | Author and Date |
| Don't forget operator precedence, Ted | on Apr 1 |
| * I did, thanks | on Apr 1 |