Hardware Reference
In-Depth Information
declare sub sweepdelay (count%)
' Set up the screen and graphics viewport
screen 8
view (0, 20)-(639, 199)
' Set initial timebase rate
dly% = 50
' Get initial voltage level
v% = inp(&H300)
if v% > 127 then v% = v% - 256
q%=350+v%-255
' Main loop
do
cls
' Plot the axes
line (0, 0)-(0, 179), 5
line (0, 179)-(640, 179), 5
' and the grid
fori%=0to179step 12
line (0, i%)-(640, i%), 5
next i%
fori%=0to640step 25
line (i%, 179)-(i%, 0), 5
next i%
' Update the status display
sweeptime$ = str$(int(sweeptime!/25000))
locate 2, 1
print "X = ";sweeptime$; " ms/div "
locate 2, 20
print "Y = 50 mV/div"
locate 1, 1
print "Press <SPACE> to abort, <X> to freeze, ";
print "<+> or <-> to change timebase setting"
' Get initial voltage level and plot the starting point
v% = inp(&H300)
if v% > 127 then v% = v% - 256
q%=85+v%
pset (0, q%), 10
' Scan across the screen from left to right
mtimer ' Reset the timer
forx%=0to639
v% = inp(&H300)
if v% > 127 then v% = v% - 256
q%=85+v%
line -(x%, q%), 10
call sweepdelay(dly%)
Search WWH ::




Custom Search