Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Rate-counter/XPL0/rate-counter.xpl0
Normal file
13
Task/Rate-counter/XPL0/rate-counter.xpl0
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
include c:\cxpl\codes; \intrinsic 'code' declarations
|
||||
int N, I, T0, Time;
|
||||
[for N:= 1, 3 do
|
||||
[T0:= GetTime;
|
||||
for I:= 1 to 100 do
|
||||
[while port($3DA) & $08 do []; \wait for vertical retrace to go away
|
||||
repeat until port($3DA) & $08; \wait for vertical retrace signal
|
||||
];
|
||||
Time:= GetTime - T0;
|
||||
IntOut(0, Time); Text(0, " microseconds for 100 samples = ");
|
||||
RlOut(0, 100.0e6/float(Time)); Text(0, "Hz"); CrLf(0);
|
||||
];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue