' TIME_1.BAS ' ' Shows how to measure "high", "low" times and period. ' Duty cycle also calculated. Signal source on pin7. ' P. H. Anderson, MSU, 17 Nov, '96 symbol high_time=w2 symbol low_time= w3 symbol period= w4 symbol symmetry=w5 dirs=%00001111 pins=%00000000 top: pulsin 7, 1, high_time 'get the high time pulsin 7, 0, low_time 'get low time period=high_time+low_time symmetry=100*high_time/low_time debug high_time, low_time, period, symmetry goto top 'continuous loop