Timed sampling with Logic Scope
Timing setup
The ARM can sample the up to 32 data lines at 1 MHz rates in
BASIC. The software library LogicScope.bas is used to coordinate this sampling.
Other sample rates that are multiples of 40 uSec are also
supported.
While sampling data the CPU is consumed gathering the 400
samples and then sending them to the PC, at which point processing of the user
program can continue.
Example
Example
#include
<LogicScope.bas> ' call in
support for LogicScope functions
#include
<HWPWM.bas>
'...
'
user code to generate the stimulus -- the ScopeDemo engages the
HWPWM
HWPWM (1,200,10)
HWPWM
(2,200,20)
HWPWM (3,200,40)
HWPWM (4,200,80)
HWPWM
(5,200,16)
HWPWM (6,200,32)
HWPWM (7,200,40)
HWPWM
(8,200,45)
...
while 1
call doLogicScope
(50,0,0) ' 50 uSec, and trigger on any state
(mask =0, trigger =0)
stop
' stop needed only to handshake with the PC for continuous
tracing
loop
keywords: Logic Scope