Курсовая работа: Автоматический фазометр
freaquency:=k*256;
if(get_char(BASE)=TRUE) then k:=Value; {lower byte of freaquency}
freaquency:=freaquency+k;
freaquency_r:=10e5/freaquency; {convertion in Hz}
if(get_char(BASE)=TRUE) then k:=Value; {higer byte of fase}
fase:=k*256;
if(get_char(BASE)=TRUE) then k:=Value; {lower byte of fase}
fase:=fase+k;
if(freaquency<7) then {60MHz}
begin
divider:=1;
end;
if(freaquency>6)and(freaquency<$0E00) then {60/Nd+2}
begin
divider:=(75*freaquency)/512+1;
end;
if(freaquency>$0DFF)and(freaquency<$1C00) then {30/Nd+2}
begin
divider:=(75*freaquency)/1024+2;
end;
if(freaquency>$1BFF)and(freaquency<$3700) then {15/Nd+2}
begin
divider:=(75*freaquency)/2048+2;
end;
if(freaquency<$3700) then fase_r:=360*(freaquency_r*divider/6e7) {convertion}
else {fase measured MK}
begin
fase_r:=360*((2*fase)/freaquency);
end;