P&I-Ch2: Protocols 1
ch. 2 giao thøc ghÐp nèi
(Interfacing Protocols)
Bao gåm:
- Giao thøc ghÐp nèi
- §Æc ®iÓm lËp tr×nh I/O
P&I-Ch2: Protocols 2
2.1. Interface Protocols:
K/n: Lµ c¸c qui ®Þnh:
Signals
Data format
Rate
Error detection & correction
Command & Response set
Scenario (kÞch b¶n)
ISO 7 layer Model (Ref. Computer networks)
Cã thÓ ph©n chia thµnh 2 nhãm chÝnh:
Transport-Oriented Protocols (1..4) (!!!)
PhysicAL (wire, cable, connector, port), DataLink (CRC,
CS, Token), NetWork (Comm. 2 networks ), Transport
(Err-protected raw infor),
Application-Oriented Protocols (5..7) :
Session (Opening, End), Presentation (Common
Language) Application (Read/Write, Start/Stop,
FileTransfer)
P&I-Ch2: Protocols 3
2.1. Interface Protocols: 2.1.1. Signals:
Khi thiÕt kÕ, x©y dùng ghÐp nèi m¸y tÝnh, cÇn chó ý
®Æc biÖt tíi tÝn hiÖu theo c¸c yªu cÇu:
H¬n 1 thiÕt bÞ? => bus/m¹ng hay kh«ng ? => dïng bit
(trêng) ®Þa chØ.
NÕu dïng bus => Standard bus hay kh«ng?
IDE vμLPT-mode 0 cables lμbus? t¹i sao?
Data: Xa /gÇn, nhanh/chËm => Serial vs Parallel
Xa: Daisy chain cho t/h hoÆc nguån cÊp...
C¸c tÝn hiÖu ®iÒu khiÓn vµ tr¹ng th¸i:
Control signals
Status signals
Handshaking signals - bt tay
P&I-Ch2: Protocols 4
Daisy chain:
–Ni các thiết b khong cách tvài đến vài
chc m, đầu ra ca port (module) thn ni vi
đầu vào ca n+1
Dùng cho tín hiu (// & nt), ngun cung cp,
handshake...
P&I-Ch2: Protocols 5
2.1. Interface Protocols: 2.1.1. Signals:
VÝ dô 1: PC-LPT handshaking:
PC
LPT port
Line Printer
SLCT SLTC_in
H×nh 2.1.a. LPT handshake
Signal