Computer Communication
Technical Handbook
019722-101 Rev. 05
90
SC-350/360
number := 0;
checkSum := 0;
for i := 1 to n do
number := number * 256 + RxWait;
dummy := RxWait;
ReadNumber := number;
end; { ReadNumber }
procedure Revisions;
var
tmp : integer;
sw,
prot : real;
begin
TxCommand(”P”, ”R”, FALSE);
checkSum := 0;
tmp := RxWait;
sw := tmp + RxWait / 100.0;
protocol := RxWait;
prot := pr RxWait / 100.0;
dummy := RxWait;
tmp := RxWait;
writeln(”Software revision: ”, sw:4:2);
writeln(”Protocol revision: ”, prot:4:2);
end; { Revisions }
procedure ReadCountReg;
begin
TxCommand(”R”, ”C”, FALSE);
writeln(ReadNumber(4):11:0, ” coins counted.”);
dummy := RxWait;
end; { ReadCountReg }
procedure ReadAccReg;
begin
TxCommand(”R”, ”A”, FALSE);
writeln(ReadNumber(4):11:0, ” coins in accumulator.”);
dummy := RxWait;
end; { ReadAccReg }
procedure Setbatch(limit : longint);
begin
TxCommand(”W”, ”L”, FALSE);
case protocol of
1 : begin
Tx2(limit div 256);
Tx2(limit mod 256);
end;
2 : begin
Tx2( limit div 16777216);
Tx2((limit div 65536) mod 256);
Tx2((limit div 256) mod 256);
Tx2( limit mod 256);
end;
end; { case protocol }
Tx2(checkSum);
dummy := RxWait;
end; { Setbatch }