waveforms detections
bluejay
Posts: 131
Does anybody know how to display waveforms on the screen terminal such as square waves from a 555 timer instead of one's and zeros?
The simple program displays digits of one's and zeros. Thanks in advance.
The simple program displays digits of one's and zeros. Thanks in advance.
' {$STAMP BS2} ' {$PBASIC 2.5} 'input ex1 'Syntax: COUNT Pin, Duration, Variable 'Syntax: PULSIN Pin, State, Variable box PIN 4 result VAR Nib DO COUNT CR, box,result 'DEBUG ? box DEBUG BIN box 'PAUSE 100 'PULSIN box,1,result 'DEBUG HOME,"input= ",DEC box LOOP
Comments
COUNT CR, box,result
but the proper syntax is
COUNT pin, duration, variable
If box is your pin number, and you want to count for 1 second, then it would be
COUNT box, 1000, result.
If the rate of change is relatively slow, the display of a multi-level result can be made to scroll down the screen.