Early Serial CommunicationLater Serial CommunicationRS-232RS-232 SignalsReceiving RS-232VariantsBaud RatePhysical VariantsThe I$^ extrm {2}$C BusI$^ extrm {2}$C Bus TransactionUSB: Universal Serial BusUSB ConnectorsUSB signalingUSB PacketsUSB Bus ProtocolUSB Data Flow TypesLayered ArchitectureUSB: Flash Card DeviceUSB: Mouse DevicePhilips ISP1362 USB 2.0 ControllerPhilips ISP1362 USB 2.0 ControllerSerial CommunicationProf. Stephen A. [email protected] UniversitySpring 2010Serial Communication – p.Early Serial CommunicationSerial Communication – p.Later Serial CommunicationData Terminal EquipmentDataCommunicationsEquipmentSerial Communication – p.RS-232Defined in early 1960sSerial, Asynchronous, Full-duplex,Voltage-based, point-to-point, 100 ft+ cabl es+12V+3VSPACE = 0−3V−12VMARK = 1TxHHHLLVVVVVVVVVVVVVVVVÆHHHIdleStart LSB B1 B2B3B4B5 B6MSBStopSerial Communication – p.RS-232 SignalsSignal DB-9 DTE ... Meaningpin DCERxD 2 ← Data received by DTETxD 3 → Data sent by DTESG 5 — GroundDSR 6 ← Data Set R eady (I’m alive)DTR 4 → Data Terminal Ready ( me, too)DCD 1 ← Carrier Detect (hear a carrier)RTS 7 → Request To Send (Yo?)CTS 8 ← Clear To Send (Yo!)RI 9 ← Ring IndicatorSerial Communication – p.Receiving RS-232RxHHHLLVVVVVVVVVVVVVVVVÆHHHIdleStart LSB B1 B2B3B4B5 B6MSBStopRxHHLLLLLLLLLLLLLLVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV4×ClkL HStartSample Sample SampleMost UARTs actually use 16× clocksSerial Communication – p.VariantsParity bit: (Even = true when even number of 1s)TxHHHLLVVVVVVVVVVVVVVVVÆHHHIdleStart LSB B1 B2B3B4B5 B6ParityStopTwo stop bits:TxHHHLLVVVVVVVVVVVVVVVVÆHHHHHHHIdleStart LSB B1 B2B3B4B5 B6MSBStop StopSerial Communication – p.Baud RateBaud: bits per secondBaud Application110 ASR-33 Teletype300 Earl y acoustic modems1200 Direct-coupled modems c. 19802400 Modems c. 19909600 Serial terminals1920038400 Typical maximumSerial Communication – p.Physical VariantsConnectors: DB-25, DB-9, Mini D IN -8RS-422: Differential signaling RS-485: Bus-likeSerial Communication – p.The I2C BusPhilips i nvented the Inter-IC bus c. 1980 as a verycheap way to communicate slowly among chipsE.g., good for setting control registers100, 400, and 3400 kHz bitratesSCL: Clock, generated by a single masterSDA: Data, controlled by either master or slavesSerial Communication – p. 10I2C Bus TransactionSCLSDAHHHHHH-HHHL-LL-LL-LLHH-HHHHHHHHHHHH-HLLL-LLLLLL-HH-LLLLLL-LLHHIdleStart“0”“1”AckStopSerial Communication – p. 11USB: Universal Serial Bus1.5 Mbps, 12 Mbps, and 480 Mbps (USB 2.0)Point-to-point, differential, tw i sted pair3–5m maximum cable lengthSerial Communication – p. 12USB ConnectorsSerial Communication – p. 13USB signalingNRZI: 0 = toggle, 1 = no changeBit stuffing: 0 automatically i nserted after sixconsecutive 1sEach packet prefixed by a SYNC field: 3 0sfoll owed by two 1sLow- vs. full-speed devices identified by differentpull-ups on D +/D- l i nesSerial Communication – p. 14USB PacketsAlways start with SYNCThen 4-bit type, 4-bit type complemented2 bits distinguish Token, D ata, Handshake, andSpecial, other two bits select sub-typesThen data, depending on packet typeData checked using a CRCAddresses (1-128) assigned by bus master, eachwith 16 possible endpointsSerial Communication – p. 15USB Bus ProtocolPolled bus: host initiates all transfers.Most transactions involve three packets:“Token” packet from host requesting dataData packet from targetAcknowledge from hostSupports both streams of bytes and structuredmessages (e.g., control changes).Serial Communication – p. 16USB Data Flow TypesControlFor configuration, etc.Bulk DataArbitrary data stream: burstyInterrupt DataTimely, reliable delivery of data. Usuallyevents.Isochronous DataFor str eaming real-time transfer:prenegotiated bandwidth and latencySerial Communication – p. 17Layered ArchitectureSerial Communication – p. 18USB: Flash Card DeviceBus 001 Device 002: ID 05e3:0760 Genesys Logic, Inc.bcdUSB 2.00bMaxPacketSize0 64idVendor 0x05e3 Genesys Logic, Inc.idProduct 0x0760bcdDevice 1.14iManufacturer 2 GenesysiProduct 3 Flash ReaderiSerial 4 002364Configuration Descriptor:bNumInterfaces 1MaxPower 300mAInterface Descriptor:bNumEndpoints 2bInterfaceClass 8 Mass StoragebInterfaceSubClass 6 SCSIbInterfaceProtocol 80 Bulk (Zip)Endpoint Descriptor:bEndpointAddress 0x81 EP 1 INbmAttributes 2Transfer Type BulkSynch Type nonewMaxPacketSize 64Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x02 EP 2 OUTbmAttributes 2Transfer Type BulkSynch Type nonewMaxPacketSize 64Language IDs: (length=4)0409 English(US)Serial Communication – p. 19USB: Mouse DeviceBus 002 Device 002: ID 04b4:0001 Cypress Semiconductor MouseDevice Descriptor:bcdUSB 1.00idVendor 0x04b4 Cypress SemiconductoridProduct 0x0001 MousebcdDevice 4.90iManufacturer 1 Adomax Sem.iProduct 2 USB MouseiSerial 0Configuration Descriptor:bNumInterfaces 1bmAttributes 0xa0Remote WakeupMaxPower 100mAInterface Descriptor:bNumEndpoints 1bInterfaceClass 3 Human Interface DevicesbInterfaceSubClass 1 Boot Interface SubclassbInterfaceProtocol 2 MouseiInterface 5 EndPoint1 Interrupt PipeHID Device Descriptor:bDescriptorType 34 ReportwDescriptorLength 52Endpoint Descriptor:bEndpointAddress 0x81 EP 1 INbmAttributes 3Transfer Type InterruptSynch Type nonewMaxPacketSize 4bInterval 10Language IDs: (length=4)0409 English(US)Serial Communication – p. 20Philips ISP1362 USB 2.0 ControllerSerial Communication – p. 21Philips ISP1362 USB 2.0 ControllerOn the D E2, one downstream port, one hostOperates at 12 or 480 Mbps speedsTwo control endpoints + 14 user endpoints4096 (host) + 2462 (device) bytes buffer memorySupports DMA data transfersMany c onfiguration and status registers150-page data “sheet” + 99-page embeddedprogramming guideSerial Communication – p.
View Full Document