AX10445 Module Series User
’
s Manual
Application
25
begin
inline($FA);
(* cli *)
port[pa+4] :=0;
(* clear modem control reg
*)
port[pa+1]: =0;
(* clear int enable reg. *)
int14_0(0,$8A);
(* initial using bios call *)
i :=port[pa+2];
(* clear flags *)
i :=port[pa];
setintvec(intno,intbuf);
(* save vectors *)
setintvec(intno,@ch_isr);
(* change vector *)
port[pa+1] := $01;
(* set receive interrupt *)
port[pa+4] := $08;
(* enable interrupt *)
port[$21] := port[$21] and mask;
(* unmask 8259 interrupt *)
inline($FB);
(* sti *)
end;
(* write data to UART *)
procedure write_com(data:string;wlen:wored);
var i : word;
begin
i := 1;
while i <= wlen do
begin
(* check if 485 mode then turn rts on *)
if (is_485) then port[pa+4] := $0b;
(* write a byte to UART *)
port[pa] := ord(data[i]);
(* check Trans. Empty bit *)
while ((port[pa+5] and $40) = 0) do begin end;
(* check if 485 mode then turn rts off *)
if (is_485) then port[pa+4] :=$08;
i := i + i;
end;
end;
Содержание AX10445 Series
Страница 1: ...AX10445 Series Isolated Dual Channel RS422 485 Interface Module User s Manual...
Страница 10: ...AX10445 Module Series User s Manual 4 This page does not contain any information...
Страница 20: ...AX10445 Module Series User s Manual Setting up the AX10445 14 This page does not contain any information...
Страница 41: ...AX10445 Module Series User s Manual Application 33 return 0 void Reset_Buf rear1 front1 rear2 front2 0...
Страница 46: ...AX10445 Module Series User s Manual 36 This page does not contain any information...
Страница 48: ...AX10445 Module Series User s Manual 38 This page does not contain any information...
Страница 50: ...AX10445 Module Series User s Manual 40 This page does not contain any information...
Страница 52: ...AX10445 Module Series User s Manual 42 This page does not contain any information...
Страница 54: ...AX10445 Module Series User s Manual 44 This page does not contain any information...
Страница 58: ...AX10445 Module Series User s Manual 48 This page does not contain any information...