User sampling with Logic Scope

Random sampling setup

    LogicScope is setup to display 400 samples of 16 IO lines.  The user can generate these samples by sprinkling the sample call into their program.

    The sample data call is completed in less than 3 uSec, except on the 400th sample where the data is sent to the PC.  If you don't have 400 samples, but want to see the data in the sample buffer call the FlushScopeSamples routine.

#include <LogicScope.bas>         ' call in support for LogicScope functions

#define DoSample     CALL doScopeSample      ' use this version to watch code
'#define DoSample                                           ' use this version to remove LogficScope watch


CALL setupLogicScope               ' initialize the sampling routine


' user code for a custom serial interface

for i=0 to 8
  x = (x << 1) or (IN(3) and 1)

next i


CALL FlushScopeSamples           ' view any data in the buffer

keywords: Logic Scope