|
shim
初级用户
积分 85
发帖 73
注册 2007-9-23
状态 离线
|
|
2007-11-21 10:49 |
|
|
jojand
初级用户
积分 117
发帖 57
注册 2007-10-23
状态 离线
|
『第
17 楼』:
A机的发送端(TX)与B机的接收端(RX)相连,A机的接收端(RX)与B机的发送端(TX)相连,两机的地线(GND)相连;
发送:
OPEN "COM1:1200,N,8,1,RS,CS,DS" AS #1
PRINT #1,"OK"
CLOSE #1
接收:
OPEN "COM1:1200,N,8,1,RS,CS,DS" AS #1
INPUT #1,A$
CLOSE #1
|
在她弯下腰的瞬间 我彷佛看见 那神秘柔和的曲线 如云雾中岭壑的蜿蜒 |
|
2007-11-22 11:08 |
|
|
maclover815
初级用户
积分 92
发帖 47
注册 2007-12-7
状态 离线
|
|
2007-12-13 22:46 |
|
|
shlinno
新手上路
积分 2
发帖 1
注册 2007-12-19
状态 离线
|
|
2007-12-19 15:49 |
|
|
gaoxy2008
新手上路
积分 5
发帖 3
注册 2008-4-10
状态 离线
|
|
2008-4-11 10:25 |
|
|
dragon123321
新手上路
积分 7
发帖 4
注册 2007-12-5
状态 离线
|
|
2008-4-11 17:30 |
|
|
dragon123321
新手上路
积分 7
发帖 4
注册 2007-12-5
状态 离线
|
『第
22 楼』:
转载时请留言哦。。我只是想认识几个朋友罢了,交流交流编程罢了,呵呵
|
|
2008-4-11 17:31 |
|
|
netwinxp
高级用户
积分 741
发帖 366
注册 2007-7-25
状态 离线
|
『第
23 楼』:
Quote: | Originally posted by jojand at 2007-11-22 11:08:
A机的发送端(TX)与B机的接收端(RX)相连,A机的接收端(RX)与B机的发送端(TX)相连,两机的地线(GND)相连;
发送:
OPEN "COM1:1200 ... |
|
对,居于com设备句柄的操作更省事。
另:单片机方面可以用232芯片(如max232)来实现电平匹配从而降低对电源的要求,以前的电流环在设计中比较容易出现意外。
|
|
2008-4-17 09:06 |
|
|
danieldy
新手上路
积分 8
发帖 3
注册 2008-5-14
状态 离线
|
|
2008-5-15 12:42 |
|
|
Pauly
新手上路
积分 14
发帖 7
注册 2008-5-15
状态 离线
|
|
2008-5-15 13:53 |
|
|
ycjyh007
新手上路
积分 4
发帖 2
注册 2006-12-3
状态 离线
|
|
2008-5-16 16:15 |
|
|
yhoyo
新手上路
积分 2
发帖 1
注册 2008-5-16
状态 离线
|
|
2008-5-16 17:03 |
|
|
saliwen302
新手上路
积分 18
发帖 9
注册 2008-5-21
状态 离线
|
|
2008-5-21 11:43 |
|
|
lqhlqg123
新手上路
积分 4
发帖 2
注册 2008-5-6
状态 离线
|
|
2008-5-21 18:48 |
|
|
saliwen302
新手上路
积分 18
发帖 9
注册 2008-5-21
状态 离线
|
『第
30 楼』:
贴一段phoenix 的int 14h的code吧
先是注释:
;----------------------------------------------------------------------------
;
; I N T E R R U P T 1 4
;
; coreBiosSerialInterface - The BIOS serial interface supports the
; Intel 8250 Serial chip.
; Functions available are init, send, receive, and status.
;
;
; AH = 00 - Initialize Communications Port
; Entry: DX - COM adapter to initialize (0-3)
; AL - Initialization values
;
; 7 6 5 4 3 2 1 0
; Baud rate Parity stop bits Word length
; ---------------------------------------
; 000-110 00-None 0-1 10-7 Bits
; 001-150 01-Odd 1-2 11-8 Bits
; 010-300 10-None
; 011-600 11-Even
; 100-1200
; 101-2400
; 110-4800
; 111-9600
; Exit: AH - Line status
;
;
; AH = 01 - Send Character
; Entry: DX - Communication adapter number (0-3)
; AL - Character to send
; Exit: AH - Line Status
;
;
; AH = 02 - Receive Character
; Entry: DX - Communcation adapter number (0-3)
; Exit: AL - Character received
; AH - Line Status
;
;
; AH = 03 - Return Communication Status
; Entry: DX - Communication adapter number (0-3)
; Exit: AL - Modem status
; Bit 0 - Delta clear to send
; Bit 1 - Delta data set ready
; Bit 2 - Trailing edge ring indicator
; Bit 3 - Delta (RLSD)
; Bit 4 - Clear to send
; Bit 5 - Data set ready
; Bit 6 - Ring indicator
; Bit 7 - Received line signal detect
;
; AH - Line status
; Bit 0 - Data ready
; Bit 1 - Overrun error
; Bit 2 - Parity Error
; Bit 3 - Framing Error
; Bit 4 - Break detect
; Bit 5 - Trans holding register empty
; Bit 6 - Trans shift register empty
; Bit 7 - Time out error
;
; AH = 04 - Extended Initialize (PS2 compatibility)
; Entry: DX - Communication adapter number (0-3)
; AL - Break
; 00H - No Break
; 01H - Break
; BH - Parity
; 00H - None
; 01H - Odd
; 02H - Even
; 03H - Stick parity odd
; 04H - Stick parity even
; BL - Stop Bit
; 00H - One
; 01H - Two if 6,7, or 8 bit word length
; One and one-half if 5 bit word length
; CH - Word Length
; 00H - 5 bits
; 01H - 6 bits
; 02H - 7 bits
; 03H - 8 bits
; CL - Baud Rates
; 00H - 110 baud
; 01H - 150 baud
; 02H - 300 baud
; 03H - 600 baud
; 04H - 1200 baud
; 05H - 2400 baud
; 06H - 4000 baud
; 07H - 9600 baud
; 08H - 19200 baud
;
; Exit: AL - Modem status
; Bit 0 - Delta clear to send
; Bit 1 - Delta data set ready
; Bit 2 - Trailing edge ring indicator
; Bit 3 - Delta (RLSD)
; Bit 4 - Clear to send
; Bit 5 - Data set ready
; Bit 6 - Ring indicator
; Bit 7 - Received line signal detect
;
; AH - Line status
; Bit 0 - Data ready
; Bit 1 - Overrun error
; Bit 2 - Parity Error
; Bit 3 - Framing Error
; Bit 4 - Break detect
; Bit 5 - Trans holding register empty
; Bit 6 - Trans shift register empty
; Bit 7 - Time out error
;
; AH = 05 - Extended Communications Port Control (PS2 compatibility)
; Entry: AL = 0 Read modem control register
; DX - Communication adapter number (0-3)
; Exit BL = Modem control register
;
; Entry AL = 01 Write modem control register
; DX - Communication adapter number (0-3)
; BL - Modem Control Register
;
; Exit: AL - Modem status
; Bit 0 - Delta clear to send
; Bit 1 - Delta data set ready
; Bit 2 - Trailing edge ring indicator
; Bit 3 - Delta (RLSD)
; Bit 4 - Clear to send
; Bit 5 - Data set ready
; Bit 6 - Ring indicator
; Bit 7 - Received line signal detect
;
; AH - Line status
; Bit 0 - Data ready
; Bit 1 - Overrun error
; Bit 2 - Parity Error
; Bit 3 - Framing Error
; Bit 4 - Break detect
; Bit 5 - Trans holding register empty
; Bit 6 - Trans shift register empty
; Bit 7 - Time out error
;
;============================================================================
|
|
2008-5-22 14:50 |
|