PT630 Programming Reference Guide
Page 58 of 59
------------------------------------------------------------------------------------------------------------------
1.9.6 Set RTS/DTR Signal of RS232 Port
Entry parameter: AH =
5
AL
= 1 ;
set
DTR
2
; set RTS
DH =
0
; set Enable (High voltage)
1 ;
set
Disable
(Low
voltage)
Return
Value:
None
Note: Only for NONE communication protocol
Example
:
void TC_232_RTS(int rts)
{
regs.h.ah = 5;
regs.h.al = 2;
regs.h.dh = (unsigned char)rts;
int86(0X
14,
®s,®s);
}
void TC_232_DTR(int dtr)
{
regs.h.ah = 5;
regs.h.al = 1;
regs.h.dh = (unsigned char)dtr;
int86(0X
14,
®s,®s);
}
1.9.7 Get
CTS
/DSR
Signal Status of RS232 Port
Entry Parameter: AH =
6
AL =
1
; get CTS
AL =
2
; get DSR
Return Value:
DH =
0
; High voltage on signal
1 ;
Low
voltage
on
signal
Note:
Only for NONE communication protocol
Example
:
int TC_232_CTS()
{
regs.h.ah = 6;
regs.h.al = 2;
int86(0X
14,
®s,®s);
return((int)regs.h.dh);
}
int TC_232_DSR()
{
regs.h.ah = 6;
regs.h.al = 1;
int86(0X
14,
®s,®s);
return((int)regs.h.dh);
}
1.9.8 Flush RS232 RX buffer
Entry Parameter: AH =
8
Return
Value:
None