modelo geral de um sistema de comunicação de dadossereno/comun_dados.pdf · modelo geral de um...
TRANSCRIPT
2003/2004 Informatica Industrial BII 1
Modelo Geral de um Sistema deComunicação de Dados
Configuração histórica básica :
DTE DCE DCE DTEGeneralização do conceito:
RedeTelef
2003/2004 Informatica Industrial BII 2
Modelo Geral de um Sistema de Comunicação de DadosUm terminal começou por ser apenas um monitor e um teclado. É capazde receber e mostrar caracteres; recebe também entradas por teclado eenvia-as para o computador central, que faz todo o processamento.Tipicamente vários terminais são ligados a um mesmo computador
Um DTE (Data Terminal Equipment) foi inicialmente um terminal;actualmente é representa qualquer equipamento que é fonte ou destinode dados:
• terminal• computador central/servidor• computador pessoal• equipamento industrial automático• PLC (Programmable Logic Controller)• NCM (Numerically Controlled Machine)• equipamento de medição remota
• estação meteorológica• medidor de caudal• medidor/contador de tráfego• câmara de vídeo/vigilância• sistema remoto de segurança• etc.
2003/2004 Informatica Industrial BII 3
Um DCE (Data Communications Equipment) começou por ser omodem (modulator/demodulator). De um modo geral representaum equipamento que recebe um fluxo de dados e o converte demodo a poder ser transmitido com segurança e fiabilidade:
modemtransmissor de RF (rádio frequência)transmissor (transponder) via satéliteroutermodem “digital”
A núvem representa toda uma rede complexa e normalmenteheterogénea de sistemas de transmissão de dados, que utiliza RF,HF e UHF sem fios e transmissão por fios, convencionais ou porfibra óptica.
2003/2004 Informatica Industrial BII 4
Organizações e Normas para a Comunicaçãode Dados
A normalização é vital na indústria de comunicações. Se issoseria impossível criar redes de dimensão mundial.A preparação de normas nesta área é da responsabilidade devárias organizações, nomeadamente:ISO International Standards Organisation
É hoje talvez a maior organização de normalização, sobretudodirigida para a indústria
EIA Electrical Industries Association.Criada inicialmente para produzir normas para a indústria eléctrica,estendendo-se também à electrónica e à comunicação de dados(ex. RS/EIA 232)
2003/2004 Informatica Industrial BII 5
IEEE Institute of Electrical & Electronic EngineersÉ a organização profissional dos engenheiros electrotécnicos eelectrónicos dos USA, que evoluiu para um forum de troca deinformação e normalização (IEEE488, IEEE-1284C (centronics)).
ITU-T International Telecommunications UnionConhecida inicialmente por CCITT (Consultative Committee ofInternational Telegraphy and Telephone). É responsável pela maioriadas normas usadas hoje na comunicação de dados.
ANSI American National Standards InstituteComo sugere o nome, mantém normas aplicáveis nos USA. Éfortemente influenciada pelas grandes empresas detelecomunicações como a AT&T e a Bell. Na prática, a indústriadefronta-se com normas CCITT/ITU adoptadas for a dos USA enormas ANSI (Bell/AT&T) ligeiramente diferentes.
2003/2004 Informatica Industrial BII 6
A norma RS232Crenamed the "EIA232 Standard" in the early 1990's
(baseado em Christopher E. Strangio, CAMI Research Inc., Lexington, Massachusetts)Durante 30 anos foi a norma generalizadamente adoptada e utilizadapara a transmissão de dados. Pela sua larga utilização foi sofrendomodificações e simplificações, gerando por vezes incompatibilidades.A comunicação é do tipo “série” e utiliza tensões, protocolos eligações de acordo com EIA232. Alguns problemas habituais são:
1. Ausência ou má ligação dos sinais que controlam o fluxo (handshaking /protocolo), originando saturação ou interrupção da comunicação.
2. Cabo com ligações erradas (DTE vs. DCE) das linhas de dados ou deprotocolo.
3. Género das fichas ou configuração de pins incorrectas, impedindo o“casamento” das ligações.
Felizmente os circuitos que comandam as comunicações EIA232 sãomuito tolerantes aos erros de ligação; no entanto se uma ligação nãofunciona deve ser desligado o cabo até resolver o problema.
2003/2004 Informatica Industrial BII 7
Fluxo de informaçãoVelocidade (baud): 110, 150, 300, 600, 1200, 2400,4900, 9600, 19200Paridade: none, odd, even
2003/2004 Informatica Industrial BII 8
Fluxo de informaçãoVelocidade (baud): 110, 150, 300, 600, 1200, 2400, 4900, 9600,
19200Paridade: none, odd, evenDados: 7 ou 8 bitsStop bits: 1 ou 2
1 0 0 1 1 1 0 1 1 1 0 0 1 0 1 1 1 0 0 1… … ...
|-------byte 1------|Pb Sb|------- byte 2 -----|Pb Sb ...
2003/2004 Informatica Industrial BII 9
2003/2004 Informatica Industrial BII 10
2003/2004 Informatica Industrial BII 11
Descrição dos pinos mais importantesPin 7, Pin 1, and the shell are included in this category. Cables
provide separate paths for each, but internal wiring oftenconnects pin 1 and the cable shell/shield to signal ground onpin 7.
NOTE: The existence of a defined ground potential within the cablemakes the EIA232 standard different from a balanced differentialvoltage standard, such as EIA530, which provides far greater noiseimmunity.
Pin 2 - Transmitted Data (TxD) This signal is active when data istransmitted from the DTE device to the DCE device. When nodata is transmitted, the signal is held in the mark condition(logic '1', negative voltage).
NOTE: Pin 2 on the DCE device is commonly labeled "ReceivedData", although by the EIA232 standard it should still be calledTransmitted Data because the data is thought to be destined for aremote DTE device.
2003/2004 Informatica Industrial BII 12
Pin 3 - Received Data (RxD) This signal is active when the DTE devicereceives data from the DCE device. When no data is transmitted,the signal is held in the mark condition (logic '1', negativevoltage).
NOTE: Pin 3 on the DCE device is commonly labeled "TransmittedData", although by the EIA232 standard it should still be calledReceived Data
Pin 4 - Request to Send (RTS) This signal is asserted (logic '0',positive voltage) to prepare the DCE device for acceptingtransmitted data from the DTE device. When the DCE is ready, itacknowledges by CTS.
NOTE: Pin 4 on the DCE device is commonly labeled "Clear to Send",although by the EIA232 standard it should still be called Request toSend.
2003/2004 Informatica Industrial BII 13
Pin 5 - Clear to Send (CTS) This signal is asserted (logic '0', positivevoltage) by the DCE device to inform the DTE device thattransmission may begin. RTS and CTS are commonly used ashandshaking signals to moderate the flow of data into the DCEdevice.
NOTE: Pin 5 on the DCE device is commonly labeled "Request to Send",although by the EIA232 standard it should still be called Clear to Send.
2003/2004 Informatica Industrial BII 14
Especificação mecânica da RS232C / EIA232A maioria das pessoas identifica facilmente a ficha de ligação sérieRS232C, habitualmente do tipo DB25 macho:
Ficha tipo DB25 com 25 pinos.
A especificação mecânica define o tipo e sexo da ficha. O sexo temque ser definido na caixa do equipamento e no cabo. Define ainda onúmero de pinos e eventuais clips ou fechos para segurar a ficha nolugar.
2003/2004 Informatica Industrial BII 15
Frequentemente, em PC’s mais recentes e em notebooks, aparecemantes fichas DB9 macho para as ligações RS232, correspondendo aimplementações imcompletas.
Ficha macho tipo D de 9-Pinos Ficha fêmea tipo D de 9-PinosMacho na caixa dos DTE's Fêmea no topo DTE do caboFêmea na caixa dos DCE's Macho no topo DCE do cabo
Nos PC’s Apple aparece com frequência umaficha fêmea DIN de 5 pinos, correspondendode novo a uma implementação parcial da norma.
Ficha fêmea DIN de 5 pinos
2003/2004 Informatica Industrial BII 16
Como resultado de uma especificação mecânica imcompleta, têm sidoutilizados diferentes fichas para ligação de comunicaçõoes série deacordo com a norma RS232.
Os principais tipos de ficha são:
A ficha DB25 que permite a implementação completa da norma,sendo macho no computador (DTE) e fêmea no modem (DCE).(nota: há normalmente uma ficha DB25 fêmea nos computadores,mas corresponde a uma porta de comunicação paralelaCentronics / IEEE-1284C, usada para comunicação com aimpressora)
A ficha DB9 usada sobretudo após a generalização dos Pentium edos notebooks, igualmente macho no computador e fêmea nomodem.
2003/2004 Informatica Industrial BII 17
A Porta ParalelaA porta paralela foi incluída pela IBM no primeiro PC em 1981 com oobjectivo de aproveitar a maior velocidade das impressoras de matrizde então, em alternativa à porta série mais antiga.A porta paralela permite transferir 8 bits de cada vez ao contrário deum único bit transmitido pela porta série, permitindo assim ummáximo de 150 kbit/s.Com o tempo a porta centronics foi sofrendo melhoramentos(funcionamento bidereccional, aumento de velocidade) que levaramao estabelecimento da norma IEEE 1284C e das versões:
EPP (Enhanced Parallel Port) used primarily by non-printer peripherals,CD ROM, tape, hard drive, network adapters, etc....ECP (Extended Capability Port) used primarily by new generation ofprinters and scanners
2003/2004 Informatica Industrial BII 18
A porta paralela montada no PC consiste numa ficha DB25 fêmea,com 17 linhas de sinal e 8 linhas de terraOs sinais são de três tipos:
Controlo (4 linhas), Status (5 linhas), Dados (8 lines)7 6 5 4 3 2 1 0 Endereço I/O
Dados x x x x x x x x Base = 278/378/3BC HEXStatus x x x x x - - - Base + 1Controlo - - - - x x x x Base + 2
Sinal Bit Pino Direcção Sinal Bit Pino Direcção- Strobe C0 1 Output -Acknowledge S6 10 Input+dado bit 0 D0 2 Output +Busy S7 11 Input+dado bit 1 D1 3 Output +Paper end S5 12 Input+dado bit 2 D2 4 Output +Select in S4 13 Input+dado bit 3 D3 5 Output -Autofeed C1 14 Output+dado bit 4 D4 6 Output - Error S3 15 Input+dado bit 5 D5 7 Output - Initialize C2 16 Output+dado bit 6 D6 8 Output - Select C3 17 Output+dado bit 7 D7 9 Output Ground - 18-25 -
2003/2004 Informatica Industrial BII 19
A porta paralela original do PC tem 12 saídas digitais e 5 entradasdigitais, que utilizam 3 endereços consecutivos de I/OThe originalIBM-PC's Parallel Printer Port had a total of 12 digital
8 pinos de saída acedidos pelo endereço DATA5 pinos de saída acedidos pelo endereço STATUS4 pinos de saída acedidos pelo endereço CONTROL8 pinos ligados à terra(Os pinos S7, C0,C1,C3 têm polaridade invertida)
2003/2004 Informatica Industrial BII 20
Universal Serial Bus (USB)A porta USD constitui uma norma moderna projectada com oobjectivo de acabar com a “confusão” e a tentativa-erro que exigemhabitualmente as normas anteriores.Actualmente, na revisão 2.0, a norma cobre velocidades de 480 Mbps(HS), 12 Mbps (FS), and 1.5 Mbps (LS).A designação "Hi-Speed USB" refere-se à especificação a 480 Mbpsenquanto que "USB" se refere às velocidades de 12Mbps e 1.5Mbpsspeeds.O objectivo é de acabar com a necessidade decolocar placas específicas para cada periférico,através de uma porta única que permite ligar até127 periféricos.De acordo com a DataQuest, a base instalada dePC’s com porta USB deve crescer de cerca de 6milhões em 1996 para mais de 700 milhões no finalde 2003.
2003/2004 Informatica Industrial BII 21
Universal Serial Bus (USB)A porta USD constitui uma norma moderna projectada com oobjectivo de acabar com a “confusão” e a tentativa-erro que exigemhabitualmente as normas anteriores.Actaalmente, na revisão 2.0, a norma cobre velocidades de 480 Mbps,12 Mbps, and 1.5 Mbps.A designação "Hi-Speed USB" refere-se à especificação a 480 Mbpsenquanto que "USB" se refere às velocidades de 12Mbps e 1.5Mbpsspeeds.O objectivo é de acabar com a necessidade decolocar placas específicas para cada periférico,através de uma porta única que permite ligar até127 periféricos.De acordo com a DataQuest, a base instalada dePC’s com porta USB deve crescer de cerca de 6milhões em 1996 para mais de 700 milhões no finalde 2003.
2003/2004 Informatica Industrial BII 22
Goals for the Universal Serial BusThe USB is specified to be an industry-standard extension to the PCarchitecture with a focus on Computer Telephony Integration (CTI),consumer, and productivity applications. The following criteria wereapplied in defining the architecture for the USB:
• Ease-of-use for PC peripheral expansion• Low-cost solution that supports transfer rates up to 12Mb/s• Full support for real-time data for voice, audio, and compressed
video• Protocol flexibility for mixed-mode isochronous data transfers and
asynchronous messaging• Integration in commodity device technology• Comprehension of various PC configurations and form factors• Provision of a standard interface capable of quick diffusion into
product• Enablement of new classes of devices that augment the PC’s
capability.
2003/2004 Informatica Industrial BII 23
Easy to use for end user• Single model for cabling and connectors• Self-identifying peripherals, automatic mapping of function to
driver, and configuration• Dynamically attachable and reconfigurable peripherals
Wide range of workloads and applications• Suitable for device bandwidths ranging from a few kb/s to
several Mb/s• Supports isochronous as well as asynchronous transfer types
over the same set of wires• Supports concurrent operation of many devices (multiple
connections)• Supports up to 127 physical devices• Supports transfer of multiple data and message streams
between the host and devices• Allows compound devices (i.e., peripherals composed of many
functions)• Lower protocol overhead, resulting in high bus utilization
2003/2004 Informatica Industrial BII 24
Isochronous bandwidth• Guaranteed bandwidth and low latencies appropriate for
telephony, audio, etc.• Isochronous workload may use entire bus bandwidth
Flexibility• Supports a wide range of packet sizes, which allows a range of
device buffering options• Allows a wide range of device data rates by accommodating
packet buffer size and latencies• Flow control for buffer handling is built into the protocol
Robustness• Error handling/fault recovery mechanism is built into the
protocol• Dynamic insertion and removal of devices is identified in user-
perceived real-time• Supports identification of faulty devices
2003/2004 Informatica Industrial BII 25
Synergy with PC industry• Protocol is simple to implement and integrate• Consistent with the PC plug-and-play architecture• Leverages existing operating system interfaces
Low-cost implementation• Low-cost subchannel at 1.5Mb/s• Optimized for integration in peripheral and host hardware• Suitable for development of low-cost peripherals• Low-cost cables and connectors• Uses commodity technologies
Upgrade path• Architecture upgradeable to support multiple USB Host
Controllers in a system
2003/2004 Informatica Industrial BII 26
The USB architecture comprehends four basic types of datatransfers:
• Control Transfers: Used to configure a device at attach timeand can be used for other device-specific purposes, includingcontrol of other pipes on the device.
• Bulk Data Transfers: Generated or consumed in relativelylarge and bursty quantities and have wide dynamic latitude intransmission constraints.
• Interrupt Data Transfers: Used for characters or coordinateswith human-perceptible echo or feedback responsecharacteristics.
• Isochronous Data Transfers: Occupy a prenegotiated amountof USB bandwidth with a prenegotiated delivery latency. (Alsocalled streaming real time transfers).
A pipe supports only one of the types of transfers described abovefor any given device configuration.
2003/2004 Informatica Industrial BII 27
2003/2004 Informatica Industrial BII 28
2003/2004 Informatica Industrial BII 29
700 Million USB-Capable PCs by 2003!700 Million USB-Capable PCs by 2003!700 Million USB-Capable PCs by 2003!Source:Source: DataquestDataquest (April 1999)(April 1999)
In Mil
lions
In Mil
lions
0100200300400500600700800
1996 1997 1998 1999 2000 2001 2002 2003
Virtually All PCs Today Ship With USB Ports
Number of USB-capable PCsNumber of USB-capable PCsin Installed Basein Installed Base
2003/2004 Informatica Industrial BII 30
USB 2.0 Promoter Group
2003/2004 Informatica Industrial BII 31
2003/2004 Informatica Industrial BII 32
2003/2004 Informatica Industrial BII 33
System SWSystem SW
Client DriverClient Driver Client DriverClient Driver
USB 1.1 HubUSB 1.1 Hub
USB 1.1Device
USB 1.1USB 1.1DeviceDevice
HS HubHS HubHS Hub
USB 1.1 HubUSB 1.1 Hub
USB 1.1Device
USB 1.1USB 1.1DeviceDevice
HS DeviceHS DeviceHS Device
USB 2.0 HostController
USB 2.0 HostUSB 2.0 HostControllerController
Full/Low SpeedFull/Low Speed
High Speed OnlyHigh Speed Only
(2 x 12Mb/s(2 x 12Mb/sCapacity)Capacity)
Sample USB 2.0 Topology
• Hub provides high-speed expansion• Hub provides additional Full/Low speed bus(es)
2003/2004 Informatica Industrial BII 34
Compatibility
USB 2.0USB 2.0
\65\60m
m
USB 1.1USB 1.1Hub
USB 2.0USB 2.0Hub
2003/2004 Informatica Industrial BII 35
2003/2004 Informatica Industrial BII 36
2003/2004 Informatica Industrial BII 37
USB 2.0 Requirements
Ease of UseEase of Use
CompatibilityCompatibility
SpeedSpeed Faster than USB 1.1Faster than USB 1.1
Same as USB 1.1Same as USB 1.1
With USB 1.1With USB 1.1
2003/2004 Informatica Industrial BII 38
0%20%40%60%80%
100%
1999 2000 2001 2002 2003Perce
nt of
Marke
t Sha
rePe
rcent
of Ma
rket S
hare
USB 1.1 onlyUSB 1.1 only
End of YearEnd of Year
USB 2.0USB 2.0
Source:Source: DataquestDataquest (April 1999)(April 1999)
% of PCs Shipping with USB 2.0% of PCs Shipping with USB 2.0 vsvs USB 1.1 onlyUSB 1.1 only
2003/2004 Informatica Industrial BII 39
Supports Multiple High-Speed Peripherals Running SimultaneouslySupports Multiple High-Speed Peripherals Running SimultaneouslySupports Multiple High-Speed Peripherals Running Simultaneously
PeripheralPeripheral Desired BWDesired BW CommentsCommentsConferenceConference CamerasCameras 75-150Mbs75-150Mbs Allows up to MPEG-2 quality withoutAllows up to MPEG-2 quality without
compressioncompressionScannersScanners 50-100Mbs50-100Mbs++ Moves current flatbeds from SCSI to USBMoves current flatbeds from SCSI to USBPrintersPrinters 50-100Mbs+50-100Mbs+ Higher resolutions, more colors.Higher resolutions, more colors.
Or elimination of line/page buffersOr elimination of line/page buffersallows lower costallows lower cost
ExternalExternal StorageStorage Up to 240MbsUp to 240Mbs SCSI/IDE device performance levels.SCSI/IDE device performance levels.Supports ZIP, JAZ, hi-speed CD, CD-R, ...Supports ZIP, JAZ, hi-speed CD, CD-R, ...
BroadbandBroadband ConnectionConnection 10-100Mbs10-100Mbs Cable, DSL, Ethernet, HPNA, ...Cable, DSL, Ethernet, HPNA, ...
Supports High-Speed PC Peripherals