Sunteți pe pagina 1din 38

ch 4.

I/O Interface bus overview


Giíi thiÖu bus chuÈn cho ghÐp nèi, më réng:
– ISA/ PC-104 – AT bus
– USB (Universal Serial Bus)
– Philips I2C
– PCI (Peripheral Component Interconnect)
– SCSI (Small Computer Systems Interface)
– GPIB (General Purpose Interface Bus)
– Siemens Profibus, ASi bus, Multi Point Buses...
– IEEE 1394
– ...

P&I Ch4 - Bus 1


4.0. Kh¸i niÖm vÒ bus:

• PCB (Printed Cirrciut Board), Cable (Copper/


Optic), Slot, Connector...
• Nèi nhiÒu thiÕt bÞ slave [master], dïng chung:
trong 1 thêi ®iÓm chØ cã 1 talker – 1 hoÆc nhiÒu
listener
• Bus song song (n bit) hoÆc nèi tiÕp (I2C, USB,
SSA, Profi, ASi, IEEE 1394...)
• Thµnh phÇn (physical lines/ time sharing):
– Address
– Data
– Control/ Status/Handshake/data check
– [Power supply]

P&I Ch4 - Bus 2


4.1. industry small architecture (isa) bus:
• ISA/ AT bus, 1984, IBM, PC-104 bus, Available in
Pentium, PowerPC Platforms
• §Ó ghÐp thªm c¸c card/ thiÕt bÞ I/O chuÈn víi
Mother Board, 1..12 Slots, hiÖn t¹i c¸c m¸y cã thÓ
kh«ng dïng slot
• 8/ 16 bit for data transfers
• 4,77 => 8,33 MHz/11.1MHz => 2.75 MWps/5.5 MWps
max, DMA 16.
• Only 1 BusMaster, CPU hoÆc DMAC, w AEN
• No data integrity, kh«ng kiÓm tra parity, IO Check
• Dïng ®Ó ghÐp víi c¸c thiÕt bÞ chËm, kiÓu ký tù:
‘character typed devices’ : keyboard, mouse...
• Refer ‘AT Technical Reference’ or TechHelp for
detail
P&I Ch4 - Bus 3
H×nh 4.1. AT/ ISA/ PC 104 bus

P&I Ch4 - Bus 4


4.2. Universal serial bus - usb:

P&I Ch4 - Bus 5


4.2. Universal Serial Bus Rev. 4.2.1: Topology

• Rev.1.1:
23/09/1998
• Chia thµnh
nhiÒu Tiers
• C¸c Tiers nèi
c¸c thiÕt bÞ:
Hub hoÆc
chøc n¨ng
• Mçi Tier cã
Hub(s)

P&I Ch4 - Bus 6


4.3. usB: specifications

• ChØ cã 1 USB host (USB


Controller) trong hÖ
• Devices, cã 2 lo¹i:
• Hub, më réng thªm thiÕt bÞ nèi vµo USB
• C¸c thiÕt bÞ chøc n¨ng nh− ISDN, JoyStick, KB,
Printer, Digital Camera, Mass Storage...
• ThiÕt bÞ chuÈn interface USB theo:
• USB Protocol
• ChuÈn H® cña USB: config vµ reset
• Communication Standard
• USB Controller/ Host polls bus & initiates all data
transfer
P&I Ch4 - Bus 7
¦u ®iÓm:
• TÝn hiÖu vi sai ph¸t/ thu, bäc kim, chèng nhiÔu
• CRC Protection ®/v data & control fields
• Tù ph¸t hiÖn attach/ detach, x¸c ®Þnh cÊu h×nh
c¸c thiÕt bÞ tù ®éng ë møc hÖ thèng
• TimeOut ®/v tr−êng hîp mÊt gãi tin/ gãi tin lçi

P&I Ch4 - Bus 8


4.3. usB: Physical interface

• 1.5 Mbps – Low speed mode vµ 12Mbps (Revision 1.1)


• Nguån cÊp +5V, vµi metre
• Power managment
• Revision 2.0: 480Mb/s

P&I Ch4 - Bus 9


P&I Ch4 - Bus 10
P&I Ch4 - Bus 11
P&I Ch4 - Bus 12
P&I Ch4 - Bus 13
P&I Ch4 - Bus 14
P&I Ch4 - Bus 15
P&I Ch4 - Bus 16
4.4. Philips I2C bus
version 2.1. jan. 2000

• Philips, 1992 Ver. 1.0;... 1998 Ver 2.0, 2000: Ver 2.1,
dïng cho c¸c hÖ thèng nhóng (embeded systems) nh−
mobil phone, TV, pay phone, ATM...
• Kh«ng cÇn dïng bus interface chip(s), built-in
• Integrated addressing & data-transfer, cho phÐp dïng
phÇn mÒm ®Ó ®Þnh cÊu h×nh
• Thªm/ bít IC kh«ng ¶nh h−ëng bus system
• §¬n gi¶n t×m lçi, khoanh vïng lçi nhanh
• Gi¶m thiÓu kÝch th−íc: 2-wire serial, kh«ng cÇn c¸c
m¹ch Addr Decoder vµ ‘glue logic’, dïng phÇn mÒm
• TruyÒn ®ång bé, 100 kb/s Standard-mode, 400 kb/s
Fast-mode,
P&I 3.4Mb/s HiSpeed-mode
Ch4 - Bus 17
P&I Ch4 - Bus 18
Cã thÓ nèi nhiÒu Masters, trong 1 t/® chØ 01 BM’s Active

P&I Ch4 - Bus 19


H. 410a. Synchronous Serial Data & Clock

P&I Ch4 - Bus 20


Start(Rep Start, S) SCL=1, SDA= ↓
Stop (P): SCL=1, SDA= ↑

P&I Ch4 - Bus 21


P&I Ch4 - Bus 22
Multi byte R/W :Addr auto Inc/ Dec;
Master/ Slave :Send A[ck] (=0) hoÆc /A (NACK) (=1)
tïy thuéc bit tiÕp theo lµ data hay Stop

P&I Ch4 - Bus 23


Mét sè vi m¹ch dïng I2C bus:
• Dallas RTC 1307, 1308: 64 byte RAM & Real Time
Clock,
• Philips PCF 8593, Low Power Clock/ Calendar
• Atmel 93C46/24C96... EEROM

P&I Ch4 - Bus 24


4.5. PCI - Peripheral Component Interconnect

- 5/1993, Intel Ver. 2.0, Open standard,


- Local bus, trung gian gi÷a Local vµ c¸c bus chuÈn
kh¸c (ISA, MC, EISA) th«ng qua PIC Bridge/Controller.
- Cã kiÓm tra parity cho Addr vµ Data
- Auto configuration of all PCI devices, share the same
IRQ. Disabling IRQ => cÊm toµn bé PCI devices.
- No DMA, device on PCI bus lµ bus master (Tèt cho viÖc
dïng MultiTasking OS).
- Burst mode: 32 bit @33MHz --> 96..132MBps, tuú
thuéc sè byte (tõ 32 byte ®Õn 4KB). Option 64bit
@33MHz --> 264MBps, 64bit – 66MHz.
- Most Platforms use:Intel, DEC Alpha, PowerPC, Spark
- Modern OS: ‘Block Typed Devices’: tÇn suÊt vËn chuyÓn
cao, nhanh, data block
P&I Ch4 - Bus 25
4.6. Small computer systems interface - SCSI

• SCSI (SCSI-1): 1990; SCSI-2: 1993 to now; UltraSCSI:...


• Dïng cho Disk controller cã bé lÖnh cña nã,
• Th−êng cã 1 Adaptor, kh«ng n»m trªn motherboard
• Support any SCSI device: Disk, CD-ROM, tape, scanner
• 5 to 40 MB/s
• 7 devices max, upto 15 with SCSI-2 FastWide and
UltraSCSI

P&I Ch4 - Bus 26


P&I Ch4 - Bus 27
4.6. Small computer systems interface - SCSI

• TÝn hiÖu: Cã lo¹i cable ®¬n vµ vi sai (chèng nhiÔu tèt


h¬n), c¸c controller support 2 lo¹i tÝn hiÖu. Kh«ng nèi 2
kiÓu trªn cïng bus. Most: SingleEnd, RS6000 differential.
• SCSI Common Command Set: ®−îc göi tõ device driver,
®−îc dÞch bëi th/bÞ => Adaptor kh«ng ph¶i thay ®æi khi
g¾n thªm thiÕt bÞ
• SCSI subsystem gåm: Host adaptor (®Ó interface gi÷a
host system vµ subsystem), SCSI controller, bus, thiÕt bÞ.
• SCSI Controller & devices: 8.. 16 devices, 1 as Controller.
Thø tù −u tiªn cña c¸c thiÕt bÞ, cao nhÊt lµ 7 (Controller)
7– 6 – 5 – 4 – 3 – 2 – 1 – 0 –15 –14 – 13 – 12 – 11 – 10 – 9 – 8
• 8 data bit => 1 parity bit. K/tra Data: ECC, ®Þa chØ CRC @
mçi sector
P&I Ch4 - Bus 28
4.7. siemens process & field bus – profi bus

• Giíi thiÖu: M«i trg c«ng nghiÖp,


• chuÈn EN 50170-1-2
• KÕt nèi nh÷ng thiÕt bÞ vµo ra
ph©n t¸n, th«ng minh (PLCs,
Motor drivers, ), 1 trong nh÷ng
layers cña m¹ng CN: SINEC-L2
• Bao gåm c¸c giao thøc:
• PROFIBUS DP (Distributed I/O):trao ®æi sl víi c¸c
slaves qui m« nhá, ®Þnh kú, tèc ®é cao
• Profibus PA: Process Automation: IEC 61158-2: m«i
tr−êng kh¾c nghiÖt. Sè liÖu vµ power chung line
(PLC), 31.25 kbps
P&I Ch4 - Bus 29
• PROFIBUS FMS (Fieldbus Message Specification):
– KÕt nèi PC víi c¸c thiÕt bÞ tù ®éng cña Siemens:
S7/M7/C7 Families kiÓu cell
– Sè liÖu cã cÊu tróc, kh«ng phô thuéc vµo ®−êng
truyÒn.
•PROFIBUS FDL (Fieldbus Data Link): t−¬ng thÝch víi
c¸c m¹ng con
• Spec.:
– Token bus: cho nhiÒu masters (active nodes)
– Master - Slaves
– >1km (RS-485) vµ 9.6km (Optical Fiber)
– M∙ hãa Manchester II ®é tin cËy vµ chèng nhiÔu
tèt

P&I Ch4 - Bus 30


H×nh 4.15. M¹ng Profibus
P&I Ch4 - Bus 31
4.8. General purpose interface bus - GPIB

• As known IEEE 488; HPIB (Hewlette-Parkard Interface


Bus), IEC 625 bus
• §−îc thiÕt kÕ ®Ó kÕt nèi m¹ng m¸y tÝnh víi c¸c thiÕt bÞ
ngo¹i vi, ®o l−êng - kiÓm nghiÖm, lab... kiÓu Program-
mable Instrumentation
• 14 devices cã thÓ nèi vµo GPIB, ...1MB/s, couple meters
• 24 pin connector: 16 lines: 8 data (DIO1..8), 1 command
ATN; 3 handshake (DAV, NRFD, NDAC), 5 management
(®Ó ®iÒu khiÓn viÖc dïng bus), remainders: Twisted/
Logic Gnd, Shield
• Computer as Controller; c¸c thiÕt bÞ kh¸c lµ Talkers/
Listeners. Trg 1 t/®: 1 device - Talker, Others - Listeners
• §Ó nèi m¹ng:GPIB Card,cable,connector(H×nh 4-
16/17/18)
P&I Ch4 - Bus 32
H×nh 4.16. Mét sè PC's GPIB interface cards
P&I Ch4 - Bus 33
H×nh 4.17. GPIB connector & signals
P&I Ch4 - Bus 34
H×nh 4.18. IEEE-488 Instrumentation & connector

P&I Ch4 - Bus 35


4.9. IEEE 1394, Fire-wire

• IEEE 1394 serial bus, 1997, by Apple & TI, thay thÕ SCSI
• Upto 63 nodes (devices) connect to a PC, hot plugible
• High speed: 60 to 400 Mb/s (7.5 to 50 MB/s)
• Cable: 6 wire (2- power carier lines 8..40Vdc/ 1.5A), 15'.
• Daisy chain extending to over 200'
• P1394 - PCI bus <=> Audio, Video devices, CD, disk,
printer...
• Tree topology: 63...64k nodes (bridge across buses)
• Addressing single node, broadcasting all nodes, config
time < 400 us
• More than one PC can be connected to P1394 bus

P&I Ch4 - Bus 36


H×nh 4.19. S¬ ®å ghÐp nèi c¸c ngo¹i vi qua IEEE 1394 bus

P&I Ch4 - Bus 37


bμi tËp - bμi tËp lín ch−¬ng 4

LËp nhãm nghiªn cøu 1 lo¹i bus ®Ó thiÕt kÕ ghÐp nèi


hÖ thèng (kÕt hîp víi c¸c ch−¬ng sau)
• NhiÒu thiÕt bÞ ngo¹i vi/ ®o l−êng/ thu thËp sè liÖu/
gi¸m s¸t/ ®iÒu khiÓn,
• Tèc ®é,
• Kho¶ng c¸ch,
• Giao thøc/ ®èi tho¹i thÝch hîp.

P&I Ch4 - Bus 38

S-ar putea să vă placă și