Download User Manual SP232 Serial Extended Function Module (for 1502B/C
Transcript
Miscellaneous Information ’q$ = CHR$(32) + CHR$(130) + CHR$(0) + CHR$(1) + CHR$(251) r$ = CHR$(2) s$ = CHR(6) a$ = CHR$(7) SCREEN 2: WINDOW (0, 0)-(251, 255); CLS RETURN ’================================================ getwave: ’ get waveform from 150XB/C ’================================================ ’ This routine draws waveform as it gets each point from 150XB/C ’ It would be just as easy to put the data into an array... c$ = INPUT$(4, #2) ’ gets 4 bytes before first data point in frame GOSUB graticule PSET (0, 2 * ASC(INPUT$(1, #2))) ’ draw first point FOR l = 2 TO 251 LINE -(1, 2 * ASC(INPUT$(1, #2))) ’ draw to next point. NEXT 1 ’ This routine does not check CRC to make sure data is all valid... c$ = INPUT$(1, #2) ’ this gets the CRC byte at the end of the frame RETURN ’================================================ suspend: ’ wait until g or period key is pressed ’================================================ BEEP WHILE (x$ <> ’’g’’) AND (x$ <> ’’.’’) x$ = INKEY$ WEND BEEP RETURN .BP ’================================================ graticule: ’clear screen & draw graticule ’================================================ CLS LINE (0, 0)-(251, 255), 1, B FOR x = 0 TO 251 STEP 251 / 10 FOR y = 0 TO 255 STEP 255 / 40 5–8 ’ draw border ’ draw grid marks SP232 User Manual