资源预览内容
第1页 / 共22页
第2页 / 共22页
第3页 / 共22页
第4页 / 共22页
第5页 / 共22页
第6页 / 共22页
第7页 / 共22页
第8页 / 共22页
第9页 / 共22页
第10页 / 共22页
亲,该文档总共22页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Serial CommunicationStephen A. EdwardsColumbia UniversitySpring 2012Early Serial CommunicationLater Serial CommunicationData Terminal EquipmentData Communication EquipmentRS-232Defined in early 1960s Serial, Asynchronous, Full-duplex, Voltage-based, point-to-point, 100 ft+ cables+12V+3VSPACE = 03V12VMARK = 1Idle Start LSBB1B2B3B4B5B6 MSB StopRS-232 SignalsSignalDTE . Meaning pinDCE RxD2Data received by DTE TxD3Data sent by DTE SG5Ground DSR6Data Set Ready (Im alive) DTR4Data Terminal Ready (me, too) DCD1Carrier Detect (hear a carrier) RTS7Request To Send (Yo?) CTS8Clear To Send (Yo!) RI9Ring IndicatorReceiving RS-232Idle Start LSBB1B2B3B4B5B6 MSB StopRxClkStart SampleSampleSampleSampleMost UARTs actually use 16 clocksVariantsParity bit: (Even = true when even number of 1s)Idle Start LSBB1B2B3B4B5B6MSB Parity StopTwo stop bits:Idle Start LSBB1B2B3B4B5B6MSB Stop StopBaud RateBaud: bits per secondBaudApplication110ASR-33 Teletype 300Early acoustic modems 1200Direct-coupled modems c. 1980 2400Modems c. 1990 9600Serial terminals 19200 38400Typical maximumPhysical VariantsConnectors: DB-25, DB-9, Mini DIN-8RS-422: Differential signalingRS-485: Bus-likeThe I2C BusPhilips invented the Inter-IC bus c. 1980 as a very cheap 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 slavesI2C Bus TransactionSCLSDAIdleStart01AckStopUSB: Universal Serial Bus 1.5 Mbps, 12 Mbps, and 480 Mbps (USB 2.0) Point-to-point, differential, twisted pair 35m maximum cable lengthUSB ConnectorsUSB signalingNRZI: 0 = toggle, 1 = no changeBit stuffing: 0 automatically inserted after six consecutive 1sEach packet prefixed by a SYNC field: 3 0s followed by two 1sLow- vs. full-speed devices identified by different pull-ups on D+/D- linesUSB PacketsAlways start with SYNCThen 4-bit type, 4-bit type complemented2 bits distinguish Token, Data, Handshake, and Special, other two bits select sub-typesThen data, depending on packet typeData checked using a CRCAddresses (1-128) assigned by bus master, each with 16 possible endpointsUSB Bus ProtocolPolled bus: host initiates all transfers.Most transactions involve three packets:?“Token” packet from host requesting data?Data packet from target?Acknowledge from hostSupports both streams of bytes and structured messages (e.g., control changes).USB Data Flow Types?ControlFor configuration, etc.?Bulk Data Arbitrary data stream: bursty?Interrupt Data Timely, reliable delivery of data. Usually events.?Isochronous Data For streaming real-time transfer: prenegotiated bandwidth and latencyLayered ArchitectureUSB: Flash Card DeviceBus 001 Device 002: ID 05e3:0760 Genesys Logic, Inc. bcdUSB2.00 bMaxPacketSize064 idVendor0x05e3 Genesys Logic, Inc. idProduct0x0760 bcdDevice1.14 iManufacturer2 Genesys iProduct3 Flash Reader iSerial4 002364 Configuration Descriptor: bNumInterfaces1 MaxPower300mA Interface Descriptor: bNumEndpoints2 bInterfaceClass8 Mass Storage bInterfaceSubClass6 SCSI bInterfaceProtocol80 Bulk (Zip) Endpoint Descriptor: bEndpointAddress0x81EP 1 IN bmAttributes2 Transfer TypeBulk Synch Typenone wMaxPacketSize64 Endpoint Descriptor: bLength7 bDescriptorType5 bEndpointAddress0x02EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Typenone wMaxPacketSize64 Language IDs: (length=4) 0409 English(US)USB: Mouse DeviceBus 002 Device 002: ID 04b4:0001 Cypress Semiconductor Mouse Device Descriptor: bcdUSB1.00 idVendor0x04b4 Cypress Semiconductor idProduct0x0001 Mouse bcdDevice4.90 iManufacturer1 AdomaxSem. iProduct2 USB Mouse iSerial0 Configuration Descriptor: bNumInterfaces1 bmAttributes0xa0 Remote Wakeup MaxPower100mA Interface Descriptor: bNumEndpoints1 bInterfaceClass3 Human Interface Devices bInterfaceSubClass1 Boot Interface Subclass bInterfaceProtocol2 Mouse iInterface5 EndPoint1 Interrupt Pipe HID Device Descriptor: bDescriptorType34 Report wDescriptorLength52 Endpoint Descriptor: bEndpointAddress0x81EP 1 IN bmAttributes3 Transfer TypeInterrupt Synch Typenone wMaxPacketSize4 bInterval10 Language IDs: (length=4) 0409 English(US)Philips ISP1362 USB 2.0 ControllerPhilips ISP1362 USB 2.0 ControllerOn the DE2, 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 configuration and status registers150-page data “sheet” + 99-page embedded programming guide
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号