======================PROTOCOLS_GPIB_USB_ETC============================== RS232 GPIB SCSI USB Firewire I2C ASCII TRANSMIT EYE_PATTERN JITTER DIGITAL_CODING RADIO_CONTROLLED BINARY FLOAT CD ======================PROTOCOLS_RS232============================= EIA Electronics Industry Association produced standards for RS485, RS422, RS232, and RS423 previously marked with prefix "RS" to indicate recommended standard; RS232 (single-ended) introduced in 1962, allows for up to 20K bits/second to 50Ft. @ Independent channels for two-way (full-duplex) idle state (MARK) signal negative to common, active state (SPACE) signal positive to common. _______ ___ _______ ___ ___ | S | D | D | D D | D D D | D | P | T |___| |___| |___________| |___| LSB MSB S=startBit D=data P=ParityBit 1=StopBit T=1/Baud 9600Baud=104.2us RS422 (differential) pair of converters from RS232 to RS422 (and back again) can be used to form "RS232 extension cord." up to 100K bits/second up to 4000 Ft. also specified for multi-drop (party-line) SPECIFICATIONS RS232 RS423 RS422 RS485 Mode of Operation SINGLE SINGLE DIFFER- DIFFER- ENDED -ENDED ENTIAL ENTIAL Number Drivers and 1 DRIVER 1 DRIVER 1 DRIVER 1 DRIVER Receivers One Line 1 RECVR 10 RECVR 10 RECVR 32 RECVR Maximum Cable Length 50 FT. 4000 FT. 4000 FT. 4000 FT. Maximum Data Rate 20kb/s 100kb/s 10Mb/s 10Mb/s Max Driver Output -0.25V to Voltage +/-25V +/-6V +6V -7V to +12V Driver Out Loaded +/-5V to +/-3.6V +/-2.0V +/-1.5V (Loaded Min.) +/-15V Driver Unloaded +/-25V +/-6V +/-6V +/-6V Driver Load Imped 3k to 7k >=450 100 54 IoutHigh Z Pwr On N/A N/A N/A +/-100uA IoutHigh Z Pwr Off +/-6mA @ +/-100uA +/-100uA +/-100uA State +/-2v Slew Rate (Max.) 30V/uS Adjustable N/A N/A Rec Input Range +/-15V +/-12V -10V to -7V to +12V 10V Receiver Sens +/-3V +/-200mV +/-200mV +/-200mV Receiver Res 3k to 7k 4k min. 4k min. >=12k ----------------------PROTOCOLS_RS232---------------------- RS232 Common names: EIA-232D (RS232-D), ITU-TSS (CCITT) V.24/V.28, ISO 2110 [25 PIN D-SUB MALE] (at the DTE) [25 PIN D-SUB FEMALE] (at the DCE) 25 PIN D-SUB MALE at the DTE (Computer). 25 PIN D-SUB FEMALE at the DCE (Modem). Pin Name RS232 V.24 Dir Description 1 GND n/a 101 [---]Shield Ground 2 TXD BA 103 [-->]Transmit Data 3 RXD BB 104 [<--]Receive Data 4 RTS CA 105 [-->]Request to Send 5 CTS CB 106 [<--]Clear to Send 6 DSR CC 107 [<--]Data Set Ready 7 GND AB 102 [---]System Ground 8 CD CF 109 [<--]Carrier Detect 9 - - RESERVED 10 - - RESERVED 11 STF 126 [-->]Select Transmit Channel 12 S.CD SCF 122 [<--]Secondary Carrier Detect 13 S.CTS SCB 121 [<--]Secondary Clear to Send 14 S.TXD SBA 118 [-->]Secondary Transmit Data 15 TCK DB 114 [<--]Trans Signal Element Timing 16 S.RXD SBB 119 [<--]Secondary Receive Data 17 RCK DD 115 [<--]Receiver Signal Element Timing 18 LL LL 141 [-->]Local Loop Control 19 S.RTS SCA 120 [-->]Secondary Request to Send 20 DTR CD 108.2 [-->]Data Terminal Ready 21 RL RL 140 [-->]Remote Loop Control 22 RI CE 125 [<--]Ring Indicator 23 DSR CH 111 [-->]Data Signal Rate Selector 24 XCK DA 113 [-->]Transmit Signal Element Timing 25 TI TM 142 [<--]Test Indicator Note: Direction is DTE (Computer) relative DCE (Modem). Note: RS232 column is RS232 circuit name. Note: ITU-T column is ITU-TSS V.24 circuit name. Note: Do not connect SHIELD(1) to GND(7). start bit requires gate senses falling edge during clock high. stop bit set to detect a rising edge. Usually customer has option of setting the lower 3 address bits externally. But this requires pins. ViH_min = 3V ViL_max = 1.5 at 5VCC min low time = 4.17uS min high time is 4us start data high = bus free max bus cap 400pf = 100kbits/sec less tan 10k ohms http://wombat.doc.ic.ac.uk/foldoc/index.html flow control stop sending data When buffer at "high water mark" resume at "low water mark" escape sequence ("escape code") (ASCII 27) from DEC vt100 video terminal perform special function , Hayes modem uses "+++" Device Control four ASCII characters, DC1, DC2, DC3, and DC4, once used to remotely control equipment paired,DC1/DC3 turning one device on/off,DC2/DC4 another null modem RS-232 cable, for two computers directly both computers transmit pin three and recieve pin two, It also needs male connectors at both ends to spec . TXD:Transmit data RXD:Receive data RTS:Request to send (Pc sets this when ready to send ) CTS:Clear to send (modem ready to transmit ) DTR:Data terminalready (PC tells modem ready to send ) DSR:Data set ready (modem tells PC ready to transmit) CD:Carrier detect (modem sets this when detects PC) DTE:Data Terminal Equipment (terminal) DCE:Data Circuit-terminating Equipment (modem,computer) _______ ___ _______ ___ ___ | S | D | D | D D | D D D | D | P | T |___| |___| |___________| |___| LSB MSB S=startBit D=data P=ParityBit 1=StopBit T=1/Baud 9600Baud=104.2us _________ RS232C DB25 Male | | \ \ |13_| \ \ | ()_) _\ \ 13 Clear2 Send2 |12_|()_)|25 | 25 Test Mode | ()_) _ | | 12 SignalDetect2 |11_|()_)|24 | 24 DTE source | ()_) _ | | |10_|()_)|23 | 23 Data signal Rate | ()_) _ | | | _|()_)|22 | 22 Ring Indicator |9()_) | | | _|()_)|21 | 21 Remote loop back |8()_) _ | | 8 CD CarrierDetect CD or DCD | _|()_)|20 | 20 DTR Data Termin ready DTE or DTR |7()_) _ | | 7 GND Signal Gnd | _|()_)|19 | 19 Request to Send2 |6()_) | | 6 DSR Dataset Ready MAC =5V | _|()_)|18 | 18 Local loop back |5()_) _ | | 5 CTS Clear to Send | _|()_)|17 | 17 DCE source(rec signtiming) |4()_) _ | | 4 Request2 Send | _|()_)|16 | 16 Receive Data2 |3()_) | | 3 RXD Receive Data | _|()_)|15 | 15 DCE source(xtm sig timing) |2()_) _ | | 2 Transmit Data | _|()_)|14 | 14 TXD Transmit Data2 |1()_) / / 1 GND Shield GND | | / / |___|_/___/ _________ RS232C DB25 FeMale | \ \ | \ \ |1() \ \ 1 GND Shield | () |14 | 14 RXD Receive Data2 ->TXD |2() | | 2 Receive Data | () |15 | 15 DCE source(xtm sig timing |3() | | 3 TXD Transmit Data ->RXD | () |16 | 16 Transmit Data2 |4() | | 4 CTS Clear to Send | () |17 | 17 DCE source(rec sign timing |5() | | 5 RTS Request2 Send | () |18 | 18 Local loop back |6() | | 6 Dataset Ready | () |19 | 19 Clear to Send2 |7() | | 7 GND Signal Gnd | () |20 | 20 DTE Rdy (Data Termin Equip) |8() | | 8 Receive Line Signal Detect | () |21 | 21 Remote loop back |9() | | | () |22 | 22 Ring Indicator | () | | |10 () |23 | 23 Data signal Rate | () | | |11 () |24 | 24 DTE source | () | | 12 SignalDetect2 |12 () |25 | 25 Test Mode | () / / 13 Request2Send2 |13 / / |_____/___/ RTS: Request to send CTS: Clear to send DTR: Data terminalready compsets high = ready to transmit DSR: Data set ready modem sets high = ready DCD: Data Carrier detect modem sets high = detect a carrier _________ Mac_2_RS232_printer | | \ \ |13_| \ \ | ()_) _\ \ |12_|()_)|25 | | ()_) _ | | |11_|()_)|24 | | ()_) _ | | |10_|()_)|23 | | ()_) _ | | | _|()_)|22 | |9()_) | | | _|()_)|21 | |8()_) _ | | | _|()_)|20 | |7()_) _ | | 7 Signal Gnd | _|()_)|19 | |6()_) | | 6 DSR MAC =5V | _|()_)|18 | |5()_) _ | | | _|()_)|17 | |4()_) _ | | | _|()_)|16 | |3()_) | | 3 Receive Data | _|()_)|15 | |2()_) _ | | 2 Transmit Data | _|()_)|14 | |1()_) / / 1 Shield GND | | / / |___|_/___/ _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 TXD ->RXD | _|()_)|9 | 9 RXD ->TXD |4()_) _ | | | _|()_)|8 | 9 -> p8 |3()_) _ | | 3 GND | _|()_)|7 | 7 -> p7 |2()_) _ | | 2 +5V | _|()_)|6 | 6 +12 DTR -> p8 |1()_) / / | | / / |___|_/___/ DTE DCE TX ____ ____ TX | | RV ___/|\__| __ RV |_____| RTS ___ ____ RTS | | CTS___/|\__| __ CTS |_____| GND _____________ GND Mac_2_Modem _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 TXD ->RXD | _|()_)|9 | 9 RXD ->TXD |4()_) _ | | | _|()_)|8 | 9 -> p8 |3()_) _ | | 3 GND | _|()_)|7 | 7 -> p7 |2()_) _ | | 2 +5V | _|()_)|6 | 6 +12 DTR -> p8 |1()_) / / | | / / |___|_/___/ _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 TXD ->RXD | _|()_)|9 | 9 RXD ->TXD |4()_) _ | | | _|()_)|8 | 9 -> p8 |3()_) _ | | 3 GND | _|()_)|7 | 7 -> p7 |2()_) _ | | 2 +5V | _|()_)|6 | 6 +12 DTR -> p8 |1()_) / / | | / / |___|_/___/ RS232_Reversal TX ____ ____ TX | | RV ___/|\__| __ RV |_____| DTR ____________ DTR RTS ___ | CTS____|________ DCD DCD ___ ____ RTS | | DSR___/|\__| __ DSR |_____| RTS: Request to send CTS: Clear to send DTR: Data terminalready DSR: Data set ready _________ RS232C DB9 Male | | \ \ | _| \ \ |5()_) _\ \ 5 GND Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE | _|()_)|8 | 8 CTS Clear to Send |3()_) | | 3 TXD Transmit Data | _|()_)|7 | 7 RTS Request to Send |2()_) _ | | 2 RXD Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 CD Carrier signal detect | | / / |___|_/___/ ________ | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd signal Gnd | / / |_____/__/ Gender_Change ________ | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd signal Gnd | / / |_____/__/ ________ | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd signal Gnd | / / |_____/__/ ________ COPS | \ \ RS232C DB9 FeMale port | \ \ |1() \ \ | ()6 | | |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | | ()9 | | |5() / / 5 Signal Gnd | / / |_____/__/ ________ CABLE_COPS | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd | / / |_____/__/ _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE Rdy | _|()_)|8 | 8 Clear to Send |3()_) | | 3 Transmit Data | _|()_)|7 | 7 Request to Send |2()_) _ | | 2 Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 Receive Line | | / / Signal Detect |___|_/___/ ________ CABLE1_mac | \ \ RS232C DB9 FeMale | \ \ |1() \ \ | ()6 | | |2() | | 2 is open | ()7 | | |3() | | | ()8 | | |4() | | | ()9 | | |5() / / | / / |_____/__/ ____ ____ / V \ Male / 4 0 8 \ / \ | 5 1,3 9 | | | \_ 6 7 _/ |_______| _________ CABLE2_mac | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE Rdy | _|()_)|8 | 8 Clear to Send |3()_) _ | | 3 Transmit Data | _|()_)|7 | 7 Request to Send |2()_) _ | | 2 Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 Receive Line | | / / |___|_/___/ ____ ____ / V \ Male / 8 7 4 \ / gnd \ | 9 1gnd 5 | | tx rx | \_ 7 6 _/ |_______| rts cts _________ RS232C DB9 Male | | \ \ | _| \ \ |5()_) _\ \ 5 Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE Rdy | _|()_)|8 | 8 Clear to Send |3()_) _ | | 3 Transmit Data | _|()_)|7 | 7 Request to Send |2()_) _ | | 2 Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 Receive Line | | / / |___|_/___/ ____ ____ / V \ FeMale / 0 - 5 \ / \ | 7 1 5 | | | \_ 3 2 _/ |_______| Blue Orange Red Yellow ____ ____ / V \ Male / R _ 5 \ / | | \ | O |_| B | | | \_ Y 2 _/ |_______| HX20_2_RS232-------------------------- _________ / _ TXD \ Cable _/ 2()_) _ \ CTS 5()_) _ 4()_) \ RTS _| ()_) _ | RXD 3()_) 6 1()_) | GND \_ DSR _ / DCD 8()_) 7()_) / DTR \________/ T? = Transmit? = DTR H! = Hold! = CTS shorted to RTS _________ | | \ \ RS232C DB9 Male | _| \ \ TXD->RXD |5()_) _\ \ | _|()_)|9 | RXD->TXD |4()_) _ | | | _|()_)|8 | GND |3()_) _ | | | _|()_)|7 | T? -> H! +5V |2()_) _ | | | _|()_)|6 | H! -> T? |1()_) / / | | / / |___|_/___/ TX ____ ____ TX | | RV ___/|\__| __ RV |_____| DTR ____________ DTR RTS ___ | CTS____|________ DCD DCD ___ ____ RTS | | DSR___/|\__| __ DSR |_____| RTS: Request to send CTS: Clear to send DTR: Data terminalready DSR: Data set ready _________ HX20 port / TXD \ HX20_2_RS232 / 2() \ RTS /4() 5()\ CTS | () | GND |1() 6 3()| RXD \ DSR / DTR \ 7() 8() /DCD \____^____/ Request to send RTS: high trans, high or low receive Clear to send CTS: must be high to trans.. norm = don't care Data terminalready DTR: must be high to tramsmit Data set ready DSR: Send out when ready to transmit Data Carrier detect DCD: High all the time HX20 port _________ / _ TXD \ ->p3_d25_RXD _/ 2()_) _ \ CTS->p8_d25_DCD 5()_) _ 4()_) \ RTS ->p8_d25_DCD _| ()_) _ | RXD->p2_d25_TXD 3()_) 6 1()_) | GND ->p7_d25_GND \_ DSR _ / DCD->p6_d25_DSR 8()_) ^ 7()_) /DTR ->p20_d25_DTR \_|______/ CTS shorted to RTS |__ ->p4_d25_RTS D-type connector so named because one side is shorter (with one less pin) (squarish) "D" shape.25-way(13+12 pins) a9-way(5+4 pins) UART Universal Asynchronous Receiver/Transmitter a transmitter (parallel-to-serial converter) a receiver each clocked separately. parallel side of a UART isconnected to bus of computer. computer writes to UART's transmit data register (TDR), UART start transmit on the serial line. UART's status register flag bit if ready for another byte. Another status register bit says UART has received a byte computer read it from receive data register (RDR). If another byte received before previous one read, UART signal an "overrun" error via another status bit. The UART set up to interrupt the computer format the UART by the UART's control register incorrectly formated signal "framing/"parity error". Often the clock will run at 16 times the baud rate to read each bit in middle of its allotted time period makes the UART more tolerant to "jitter" stop bit extra "1" bits which follow the data and any parity bit. mark end of a byte or character). start bit signals the start of transmission oon a serial line zero-one transition tells receiver when to start sampling the signal to extract the data bits. synchronous Two or more processes common timing signals. asynchronous Not synchronised by shared clock , execution independently loser An unexpectedly bad situation, program,programmer Someone who habitually loses. (Even winners can lose ) Someone who knows not and knows not that he knows not. Emphatic forms real loser,total loser,complete loser" (not "moby loser", which is a contradiction in terms). RS-232C The EIA RS-232C electrical signal unbalanced +/- 5 to +/- 12V, polar non return to zero speeds up to 19.2 kilobits per second. DTE Data Terminal Equipment controls communication channel (terminals, computers) DCE Data Communication Equipment ...typically a modem IF "straight-through" cable (p1 to p1, p2 to p2 etc.) DTE should a male connector + trans on p3 and rece p2. gender mender gender bender,gender blender,sex changer,homosexualadaptor two male/female connectors used to correct mismatch RS-232 Originally DCE was modem and DTE was computer/terminal DCE RS-232 have female connector and tran p2 and rec p3 DTE RS-232 have male connector and tran p3 and rec p2 http://wombat.doc.ic.ac.uk/foldoc/ foldoc.cgi?hardware+handshaking TX ____ ____ TX | | RV ___/|\__| __ RV |_____| GND _____________ GND DTE DCE DTE: Data Terminal Equipment (terminal) DCE: Data Circuit-terminating Equipment (modem,computer) RS232C Max 20Kbps @ 15meters unbalanced Logic_0 "space" Vout +3V -> +15B Logic_1 "mark" Vout -3V -> -15V RS422 twisted pair balanced 10Mbps @ 12 meters .1Mbps@1.2Km _______ ___ _______ ___ ___ | S | D | D | D D | D D D | D | P | T |___| |___| |___________| |___| LSB MSB S=startBit D=data P=ParityBit 1=StopBit T=1/Baud 9600Baud=104.2us DTE Rdy Trans Recv Sig Det _ ___ _______ ___ _________ | ST| D0| D1| D2 D2| D4 D5 D6| D7| P | SB| : |___| |___| |___________| |___| | LSB MSB startBit ST data D ParityBit P StopBit 1 T 1/Baud 9600Baud= 104.2us Software Handshake XON and XOFF Hardware DTE DCE TX ____ ____ TX | | RV ___/|\__| __ RV |_____| RTS ___ ____ RTS | | CTS___/|\__| __ CTS |_____| GND _____________ GND RTS: Request to send CTS: Clear to send DTR: Data terminalready compu sets space_Hi so printer recev DSR: Data set ready printer sets space_Hi to receive DCD: Data carrier detect must space_Hi for printer to receiv n=0 is Speaker always off, n=0 is Speaker always on, n=1 is Speaker on until carrier detected (default) n=3 is Speaker on after dial through CONNECT O Return to on-line state P Pulse Dial Qn n=0 is send Resun Codes, n-1 is do not send code R Reverse mode (Originate Only) S0=n n=0 to 255 rings before answer (sees switch 5) S1=n n=0 to 127, count rings S2=n n=0 to 127, 43 default , Set escape code character S3=n n=0 to 127, 13 default , Set cr character S4=n n=0 to 127, 10 default, Set Line Feed character S5=n n=0 to 127, 8 default, Set Backspace character S6=n n=2 to 255, Wait for dial tone seconds S7=n n=2 to 255, Wait carrier detect seconds S8=n n=0 to 255, Set duration pause seconds S9=n Carrier detect response time seconds/10 S1O=n Delay time carrier loss to hang-up 1/10sec. Sll=n Duration a ndspace of Touch Tones ( 50ms to 255ms) S12=n Escape code guard time 1-255 1/10 sec S13=n UART status bit map (reserved) S14-n Option Register, product code returned by AT10 S15=n Flag Register(reserved) S16=n Self test mod€. n=O is data mode (default), n-1 is Analog Loopback, n=2 is dial test n=4 is Test Pattern, n=5 is Analog Loopback and Test Pattern. Sn? Send contents of Register n (0 to 16) to Computer T Touch Tone Dial Vn n-O is send resun€u€eo€d€d€B€€-1 is wMds Xn n-B send basic result code 1 to 8 send extended resun codes B to 12 Z Somvare reset and reset to defaun values Hardware DTE DCE TX ____ ____ TX | | RV ___/|\__| __ RV |_____| RTS ___ ____ RTS ??????????? | | CTS___/|\__| __ CTS |_____| DTR ___ ____ DTR | | DSR___/|\__| __ DSR |_____| GND _____________ GND RTS: Request to send CTS: Clear to send DTR: Data terminalready DSR: Data set ready TXD: Transmit data RXD: Receive data RTS: Request to send (Pc sets this when ready to send ) CTS: Clear to send (modem ready to transmit ) DTR: Data terminalready (PC tells modem ready to send ) DSR: Data set ready (modem tells PC ready to transmit) CD: Carrier detect (modem sets this when detects PC) DTE: Data Terminal Equipment (terminal) DCE: Data Circuit-terminating Equipment (modem,computer) Half_dulplex data sent only in one direction at a time Full_dulplex data sent in both directions at a time Synchronous transmit data in blocks using sync characters 1baud one audio signal transitions per second FSK: Frequency_shift_Keying logic_0 = 1080Hz Logic_1 = 1750Hz 1baud =1bps PSK: Phase_shift_Keying logic_1/0 set by alternating carrier phase more bits per baud since phases are 0,90,180,270 QAM: Quadrature)_amplitude_modulation Both phase and frequency 1.7KHz or1.8Khz @ 2400baud only 4 bits usable per baud TCM: TCQAM or Trellic_coded quadrature_amplitude_modulation 6bits per baud. 14,400 bps modems use this CCITT V.XX Standards Consultative Committee InternalTelepho&Telegraph V.22 synch/asynch ,full duplex,2 wires, 1200bpsdata V.22bis synch/asynch ,full duplex,2 wires, 2400/1200bpsdata V.32 synch/asynch ,full duplex,2 wires, 9600bpsdata V.32bis synchs/asynch,full dupx,2wires,4.8K,7.2K,9.6K,12K,14.4Kbps V.34bis synchs/asynch,full dupx,2wires,28.8Kbps,speed<=line noise V.35 synchs/asynch ,full duplex,2 wires Bell stand : 0.3K,1.2K,2.4K,4.8Kbps TXD: Transmit data RXD: Receive data RTS: Request to send (Pc sets high when ready to send ) CTS: Clear to send (modem ready to transmit ) DTR: Data terminalready (PC tells modem ready to send ) DSR: Data set ready (modem tells PC ready to transmit) CD: Carrier detect (modem sets this when detects PC) DTE: Data Terminal Equipment (terminal) DCE: Data Circuit-terminating Equipment (modem,computer) ASCII American Standard Code for Information Interchange US-ASCII uses lower seven bits (character points 0 to 127) RS232 Common names: EIA-232D (RS232-D), ITU-TSS (CCITT) V.24/V.28, ISO 2110 [25 PIN D-SUB MALE] (at the DTE) [25 PIN D-SUB FEMALE] (at the DCE) 25 PIN D-SUB MALE at the DTE (Computer). 25 PIN D-SUB FEMALE at the DCE (Modem). Pin Name RS232 V.24 Dir Description 1 GND n/a 101 [---]Shield Ground 2 TXD BA 103 [-->]Transmit Data 3 RXD BB 104 [<--]Receive Data 4 RTS CA 105 [-->]Request to Send 5 CTS CB 106 [<--]Clear to Send 6 DSR CC 107 [<--]Data Set Ready 7 GND AB 102 [---]System Ground 8 CD CF 109 [<--]Carrier Detect 9 - - RESERVED 10 - - RESERVED 11 STF 126 [-->]Select Transmit Channel 12 S.CD SCF 122 [<--]Secondary Carrier Detect 13 S.CTS SCB 121 [<--]Secondary Clear to Send 14 S.TXD SBA 118 [-->]Secondary Transmit Data 15 TCK DB 114 [<--]Trans Signal Element Timing 16 S.RXD SBB 119 [<--]Secondary Receive Data 17 RCK DD 115 [<--]Receiver Signal Element Timing 18 LL LL 141 [-->]Local Loop Control 19 S.RTS SCA 120 [-->]Secondary Request to Send 20 DTR CD 108.2 [-->]Data Terminal Ready 21 RL RL 140 [-->]Remote Loop Control 22 RI CE 125 [<--]Ring Indicator 23 DSR CH 111 [-->]Data Signal Rate Selector 24 XCK DA 113 [-->]Transmit Signal Element Timing 25 TI TM 142 [<--]Test Indicator Note: Direction is DTE (Computer) relative DCE (Modem). Note: RS232 column is RS232 circuit name. Note: ITU-T column is ITU-TSS V.24 circuit name. Note: Do not connect SHIELD(1) to GND(7). start bit requires gate senses falling edge during clock high. stop bit set to detect a rising edge. Usually customer has option of setting the lower 3 address bits externally. But this requires pins. ViH_min = 3V ViL_max = 1.5 at 5VCC min low time = 4.17uS min high time is 4us start data high = bus free max bus cap 400pf = 100kbits/sec less tan 10k ohms http://wombat.doc.ic.ac.uk/foldoc/index.html flow control stop sending data When buffer at "high water mark" resume at "low water mark" escape sequence ("escape code") (ASCII 27) from DEC vt100 video terminal perform special function , Hayes modem uses "+++" Device Control four ASCII characters, DC1, DC2, DC3, and DC4, once used to remotely control equipment paired,DC1/DC3 turning one device on/off,DC2/DC4 another null modem RS-232 cable, for two computers directly both computers transmit pin three and recieve pin two, It also needs male connectors at both ends to spec . TXD:Transmit data RXD:Receive data RTS:Request to send (Pc sets this when ready to send ) CTS:Clear to send (modem ready to transmit ) DTR:Data terminalready (PC tells modem ready to send ) DSR:Data set ready (modem tells PC ready to transmit) CD:Carrier detect (modem sets this when detects PC) DTE:Data Terminal Equipment (terminal) DCE:Data Circuit-terminating Equipment (modem,computer) _______ ___ _______ ___ ___ | S | D | D | D D | D D D | D | P | T |___| |___| |___________| |___| LSB MSB S=startBit D=data P=ParityBit 1=StopBit T=1/Baud 9600Baud=104.2us _________ RS232C DB25 Male | | \ \ |13_| \ \ | ()_) _\ \ 13 Clear2 Send2 |12_|()_)|25 | 25 Test Mode | ()_) _ | | 12 SignalDetect2 |11_|()_)|24 | 24 DTE source | ()_) _ | | |10_|()_)|23 | 23 Data signal Rate | ()_) _ | | | _|()_)|22 | 22 Ring Indicator |9()_) | | | _|()_)|21 | 21 Remote loop back |8()_) _ | | 8 CD CarrierDetect CD or DCD | _|()_)|20 | 20 DTR Data Termin ready DTE or DTR |7()_) _ | | 7 GND Signal Gnd | _|()_)|19 | 19 Request to Send2 |6()_) | | 6 DSR Dataset Ready MAC =5V | _|()_)|18 | 18 Local loop back |5()_) _ | | 5 CTS Clear to Send | _|()_)|17 | 17 DCE source(rec signtiming) |4()_) _ | | 4 Request2 Send | _|()_)|16 | 16 Receive Data2 |3()_) | | 3 RXD Receive Data | _|()_)|15 | 15 DCE source(xtm sig timing) |2()_) _ | | 2 Transmit Data | _|()_)|14 | 14 TXD Transmit Data2 |1()_) / / 1 GND Shield GND | | / / |___|_/___/ _________ RS232C DB25 FeMale | \ \ | \ \ |1() \ \ 1 GND Shield | () |14 | 14 RXD Receive Data2 ->TXD |2() | | 2 Receive Data | () |15 | 15 DCE source(xtm sig timing |3() | | 3 TXD Transmit Data ->RXD | () |16 | 16 Transmit Data2 |4() | | 4 CTS Clear to Send | () |17 | 17 DCE source(rec sign timing |5() | | 5 RTS Request2 Send | () |18 | 18 Local loop back |6() | | 6 Dataset Ready | () |19 | 19 Clear to Send2 |7() | | 7 GND Signal Gnd | () |20 | 20 DTE Rdy (Data Termin Equip) |8() | | 8 Receive Line Signal Detect | () |21 | 21 Remote loop back |9() | | | () |22 | 22 Ring Indicator | () | | |10 () |23 | 23 Data signal Rate | () | | |11 () |24 | 24 DTE source | () | | 12 SignalDetect2 |12 () |25 | 25 Test Mode | () / / 13 Request2Send2 |13 / / |_____/___/ RTS: Request to send CTS: Clear to send DTR: Data terminalready compsets high = ready to transmit DSR: Data set ready modem sets high = ready DCD: Data Carrier detect modem sets high = detect a carrier _________ Mac_2_RS232_printer | | \ \ |13_| \ \ | ()_) _\ \ |12_|()_)|25 | | ()_) _ | | |11_|()_)|24 | | ()_) _ | | |10_|()_)|23 | | ()_) _ | | | _|()_)|22 | |9()_) | | | _|()_)|21 | |8()_) _ | | | _|()_)|20 | |7()_) _ | | 7 Signal Gnd | _|()_)|19 | |6()_) | | 6 DSR MAC =5V | _|()_)|18 | |5()_) _ | | | _|()_)|17 | |4()_) _ | | | _|()_)|16 | |3()_) | | 3 Receive Data | _|()_)|15 | |2()_) _ | | 2 Transmit Data | _|()_)|14 | |1()_) / / 1 Shield GND | | / / |___|_/___/ _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 TXD ->RXD | _|()_)|9 | 9 RXD ->TXD |4()_) _ | | | _|()_)|8 | 9 -> p8 |3()_) _ | | 3 GND | _|()_)|7 | 7 -> p7 |2()_) _ | | 2 +5V | _|()_)|6 | 6 +12 DTR -> p8 |1()_) / / | | / / |___|_/___/ DTE DCE TX ____ ____ TX | | RV ___/|\__| __ RV |_____| RTS ___ ____ RTS | | CTS___/|\__| __ CTS |_____| GND _____________ GND Mac_2_Modem _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 TXD ->RXD | _|()_)|9 | 9 RXD ->TXD |4()_) _ | | | _|()_)|8 | 9 -> p8 |3()_) _ | | 3 GND | _|()_)|7 | 7 -> p7 |2()_) _ | | 2 +5V | _|()_)|6 | 6 +12 DTR -> p8 |1()_) / / | | / / |___|_/___/ _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 TXD ->RXD | _|()_)|9 | 9 RXD ->TXD |4()_) _ | | | _|()_)|8 | 9 -> p8 |3()_) _ | | 3 GND | _|()_)|7 | 7 -> p7 |2()_) _ | | 2 +5V | _|()_)|6 | 6 +12 DTR -> p8 |1()_) / / | | / / |___|_/___/ RS232_Reversal TX ____ ____ TX | | RV ___/|\__| __ RV |_____| DTR ____________ DTR RTS ___ | CTS____|________ DCD DCD ___ ____ RTS | | DSR___/|\__| __ DSR |_____| RTS: Request to send CTS: Clear to send DTR: Data terminalready DSR: Data set ready _________ RS232C DB9 Male | | \ \ | _| \ \ |5()_) _\ \ 5 GND Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE | _|()_)|8 | 8 CTS Clear to Send |3()_) | | 3 TXD Transmit Data | _|()_)|7 | 7 RTS Request to Send |2()_) _ | | 2 RXD Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 CD Carrier signal detect | | / / |___|_/___/ ________ | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd signal Gnd | / / |_____/__/ Gender_Change ________ | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd signal Gnd | / / |_____/__/ ________ | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd signal Gnd | / / |_____/__/ ________ COPS | \ \ RS232C DB9 FeMale port | \ \ |1() \ \ | ()6 | | |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | | ()9 | | |5() / / 5 Signal Gnd | / / |_____/__/ ________ CABLE_COPS | \ \ RS232C DB9 FeMale | \ \ |1() \ \ 1 CD | ()6 | | 6 DSR |2() | | 2 RXD | ()7 | | 7 RTS |3() | | 3 TXD | ()8 | | 8 CTS |4() | | 4 DTR | ()9 | | 9 Ring Indicator |5() / / 5 Gnd | / / |_____/__/ _________ | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE Rdy | _|()_)|8 | 8 Clear to Send |3()_) | | 3 Transmit Data | _|()_)|7 | 7 Request to Send |2()_) _ | | 2 Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 Receive Line | | / / Signal Detect |___|_/___/ ________ CABLE1_mac | \ \ RS232C DB9 FeMale | \ \ |1() \ \ | ()6 | | |2() | | 2 is open | ()7 | | |3() | | | ()8 | | |4() | | | ()9 | | |5() / / | / / |_____/__/ ____ ____ / V \ Male / 4 0 8 \ / \ | 5 1,3 9 | | | \_ 6 7 _/ |_______| _________ CABLE2_mac | | \ \ RS232C DB9 Male | _| \ \ |5()_) _\ \ 5 Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE Rdy | _|()_)|8 | 8 Clear to Send |3()_) _ | | 3 Transmit Data | _|()_)|7 | 7 Request to Send |2()_) _ | | 2 Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 Receive Line | | / / |___|_/___/ ____ ____ / V \ Male / 8 7 4 \ / gnd \ | 9 1gnd 5 | | tx rx | \_ 7 6 _/ |_______| rts cts _________ RS232C DB9 Male | | \ \ | _| \ \ |5()_) _\ \ 5 Signal Gnd | _|()_)|9 | 9 Ring Indicator |4()_) _ | | 4 DTE Rdy | _|()_)|8 | 8 Clear to Send |3()_) _ | | 3 Transmit Data | _|()_)|7 | 7 Request to Send |2()_) _ | | 2 Receive Data | _|()_)|6 | 6 DCE Ready |1()_) / / 1 Receive Line | | / / |___|_/___/ ____ ____ / V \ FeMale / 0 - 5 \ / \ | 7 1 5 | | | \_ 3 2 _/ |_______| Blue Orange Red Yellow ____ ____ / V \ Male / R _ 5 \ / | | \ | O |_| B | | | \_ Y 2 _/ |_______| HX20_2_RS232-------------------------- _________ / _ TXD \ Cable _/ 2()_) _ \ CTS 5()_) _ 4()_) \ RTS _| ()_) _ | RXD 3()_) 6 1()_) | GND \_ DSR _ / DCD 8()_) 7()_) / DTR \________/ T? = Transmit? = DTR H! = Hold! = CTS shorted to RTS _________ | | \ \ RS232C DB9 Male | _| \ \ TXD->RXD |5()_) _\ \ | _|()_)|9 | RXD->TXD |4()_) _ | | | _|()_)|8 | GND |3()_) _ | | | _|()_)|7 | T? -> H! +5V |2()_) _ | | | _|()_)|6 | H! -> T? |1()_) / / | | / / |___|_/___/ TX ____ ____ TX | | RV ___/|\__| __ RV |_____| DTR ____________ DTR RTS ___ | CTS____|________ DCD DCD ___ ____ RTS | | DSR___/|\__| __ DSR |_____| RTS: Request to send CTS: Clear to send DTR: Data terminalready DSR: Data set ready _________ HX20 port / TXD \ HX20_2_RS232 / 2() \ RTS /4() 5()\ CTS | () | GND |1() 6 3()| RXD \ DSR / DTR \ 7() 8() /DCD \____^____/ Request to send RTS: high trans, high or low receive Clear to send CTS: must be high to trans.. norm = don't care Data terminalready DTR: must be high to tramsmit Data set ready DSR: Send out when ready to transmit Data Carrier detect DCD: High all the time HX20 port _________ / _ TXD \ ->p3_d25_RXD _/ 2()_) _ \ CTS->p8_d25_DCD 5()_) _ 4()_) \ RTS ->p8_d25_DCD _| ()_) _ | RXD->p2_d25_TXD 3()_) 6 1()_) | GND ->p7_d25_GND \_ DSR _ / DCD->p6_d25_DSR 8()_) ^ 7()_) /DTR ->p20_d25_DTR \_|______/ CTS shorted to RTS |__ ->p4_d25_RTS D-type connector so named because one side is shorter (with one less pin) (squarish) "D" shape.25-way(13+12 pins) a9-way(5+4 pins) UART Universal Asynchronous Receiver/Transmitter a transmitter (parallel-to-serial converter) a receiver each clocked separately. parallel side of a UART isconnected to bus of computer. computer writes to UART's transmit data register (TDR), UART start transmit on the serial line. UART's status register flag bit if ready for another byte. Another status register bit says UART has received a byte computer read it from receive data register (RDR). If another byte received before previous one read, UART signal an "overrun" error via another status bit. The UART set up to interrupt the computer format the UART by the UART's control register incorrectly formated signal "framing/"parity error". Often the clock will run at 16 times the baud rate to read each bit in middle of its allotted time period makes the UART more tolerant to "jitter" stop bit extra "1" bits which follow the data and any parity bit. mark end of a byte or character). start bit signals the start of transmission oon a serial line zero-one transition tells receiver when to start sampling the signal to extract the data bits. synchronous Two or more processes common timing signals. asynchronous Not synchronised by shared clock , execution independently loser An unexpectedly bad situation, program,programmer Someone who habitually loses. (Even winners can lose ) Someone who knows not and knows not that he knows not. Emphatic forms real loser,total loser,complete loser" (not "moby loser", which is a contradiction in terms). RS-232C The EIA RS-232C electrical signal unbalanced +/- 5 to +/- 12V, polar non return to zero speeds up to 19.2 kilobits per second. DTE Data Terminal Equipment controls communication channel (terminals, computers) DCE Data Communication Equipment ...typically a modem IF "straight-through" cable (p1 to p1, p2 to p2 etc.) DTE should a male connector + trans on p3 and rece p2. gender mender gender bender,gender blender,sex changer,homosexualadaptor two male/female connectors used to correct mismatch RS-232 Originally DCE was modem and DTE was computer/terminal DCE RS-232 have female connector and tran p2 and rec p3 DTE RS-232 have male connector and tran p3 and rec p2 http://wombat.doc.ic.ac.uk/foldoc/ foldoc.cgi?hardware+handshaking TX ____ ____ TX | | RV ___/|\__| __ RV |_____| GND _____________ GND DTE DCE DTE: Data Terminal Equipment (terminal) DCE: Data Circuit-terminating Equipment (modem,computer) RS232C Max 20Kbps @ 15meters unbalanced Logic_0 "space" Vout +3V -> +15B Logic_1 "mark" Vout -3V -> -15V RS422 twisted pair balanced 10Mbps @ 12 meters .1Mbps@1.2Km _______ ___ _______ ___ ___ | S | D | D | D D | D D D | D | P | T |___| |___| |___________| |___| LSB MSB S=startBit D=data P=ParityBit 1=StopBit T=1/Baud 9600Baud=104.2us DTE Rdy Trans Recv Sig Det _ ___ _______ ___ _________ | ST| D0| D1| D2 D2| D4 D5 D6| D7| P | SB| : |___| |___| |___________| |___| | LSB MSB startBit ST data D ParityBit P StopBit 1 T 1/Baud 9600Baud= 104.2us Software Handshake XON and XOFF Hardware DTE DCE TX ____ ____ TX | | RV ___/|\__| __ RV |_____| RTS ___ ____ RTS | | CTS___/|\__| __ CTS |_____| GND _____________ GND RTS: Request to send CTS: Clear to send DTR: Data terminalready compu sets space_Hi so printer recev DSR: Data set ready printer sets space_Hi to receive DCD: Data carrier detect must space_Hi for printer to receiv n=0 is Speaker always off, n=0 is Speaker always on, n=1 is Speaker on until carrier detected (default) n=3 is Speaker on after dial through CONNECT O Return to on-line state P Pulse Dial Qn n=0 is send Resun Codes, n-1 is do not send code R Reverse mode (Originate Only) S0=n n=0 to 255 rings before answer (sees switch 5) S1=n n=0 to 127, count rings S2=n n=0 to 127, 43 default , Set escape code character S3=n n=0 to 127, 13 default , Set cr character S4=n n=0 to 127, 10 default, Set Line Feed character S5=n n=0 to 127, 8 default, Set Backspace character S6=n n=2 to 255, Wait for dial tone seconds S7=n n=2 to 255, Wait carrier detect seconds S8=n n=0 to 255, Set duration pause seconds S9=n Carrier detect response time seconds/10 S1O=n Delay time carrier loss to hang-up 1/10sec. Sll=n Duration a ndspace of Touch Tones ( 50ms to 255ms) S12=n Escape code guard time 1-255 1/10 sec S13=n UART status bit map (reserved) S14-n Option Register, product code returned by AT10 S15=n Flag Register(reserved) S16=n Self test mod€. n=O is data mode (default), n-1 is Analog Loopback, n=2 is dial test n=4 is Test Pattern, n=5 is Analog Loopback and Test Pattern. Sn? Send contents of Register n (0 to 16) to Computer T Touch Tone Dial Vn n-O is send resun€u€eo€d€d€B€€-1 is wMds Xn n-B send basic result code 1 to 8 send extended resun codes B to 12 Z Somvare reset and reset to defaun values Hardware DTE DCE TX ____ ____ TX | | RV ___/|\__| __ RV |_____| RTS ___ ____ RTS ??????????? | | CTS___/|\__| __ CTS |_____| DTR ___ ____ DTR | | DSR___/|\__| __ DSR |_____| GND _____________ GND RTS: Request to send CTS: Clear to send DTR: Data terminalready DSR: Data set ready TXD: Transmit data RXD: Receive data RTS: Request to send (Pc sets this when ready to send ) CTS: Clear to send (modem ready to transmit ) DTR: Data terminalready (PC tells modem ready to send ) DSR: Data set ready (modem tells PC ready to transmit) CD: Carrier detect (modem sets this when detects PC) DTE: Data Terminal Equipment (terminal) DCE: Data Circuit-terminating Equipment (modem,computer) Half_dulplex data sent only in one direction at a time Full_dulplex data sent in both directions at a time Synchronous transmit data in blocks using sync characters 1baud one audio signal transitions per second FSK: Frequency_shift_Keying logic_0 = 1080Hz Logic_1 = 1750Hz 1baud =1bps PSK: Phase_shift_Keying logic_1/0 set by alternating carrier phase more bits per baud since phases are 0,90,180,270 QAM: Quadrature)_amplitude_modulation Both phase and frequency 1.7KHz or1.8Khz @ 2400baud only 4 bits usable per baud TCM: TCQAM or Trellic_coded quadrature_amplitude_modulation 6bits per baud. 14,400 bps modems use this CCITT V.XX Standards Consultative Committee InternalTelepho&Telegraph V.22 synch/asynch ,full duplex,2 wires, 1200bpsdata V.22bis synch/asynch ,full duplex,2 wires, 2400/1200bpsdata V.32 synch/asynch ,full duplex,2 wires, 9600bpsdata V.32bis synchs/asynch,full dupx,2wires,4.8K,7.2K,9.6K,12K,14.4Kbps V.34bis synchs/asynch,full dupx,2wires,28.8Kbps,speed<=line noise V.35 synchs/asynch ,full duplex,2 wires Bell stand : 0.3K,1.2K,2.4K,4.8Kbps TXD: Transmit data RXD: Receive data RTS: Request to send (Pc sets high when ready to send ) CTS: Clear to send (modem ready to transmit ) DTR: Data terminalready (PC tells modem ready to send ) DSR: Data set ready (modem tells PC ready to transmit) CD: Carrier detect (modem sets this when detects PC) DTE: Data Terminal Equipment (terminal) DCE: Data Circuit-terminating Equipment (modem,computer) ASCII American Standard Code for Information Interchange US-ASCII uses lower seven bits (character points 0 to 127) NUL Null DLE Data Link Escape SOH StartHeading DC1 Device Control 1 STX Start Text DC2 Device Control 2 ETX End Text DC3 Device Control 3 EOT End Trans DC4 Device Control 4 ENQ Enquiry EM End of Medium ACK Acknowledge SUB Substitute BEL Bell ESC Escape BS BackSpace FS File Separator HT Horizontal Tab GS Group Separator LF Line Feed RS Recorder Separator VT Vertical Tab US Unit Separator FF Form Feed DEL Delete CR Carriage Return SO Shift Out SI Shift In NAK Negative Ackno SYN Synch s Idle ETB End Trans Block CAN Cancel Give me a break! the canonical humorous response is "Control C". SOH Null ASCII_0 SOH Start Of Header ASCII_1 STX Start Of Text ASCII_2 ETX End Of Text ASCII_3 control-C Unix_interrupt EOT End Of Transmis ASCII_4 ENQ ENQuire. ASCII_5 ACK ACKnowledge ASCII_6 BEL sound bell ASCII_7 BS Backspace ASCII_8 HT tab ASCII_9 Control-I Unix => "\t" LF line feed ASCII_10 control-J Unix => "\n" VT Vertical Tab ASCII_11 FF form feed ASCII_12 Control-L CR CursReturn2Left ASCII_13 Control-M Unix => "\r" SO ShiftOut AltChars ASCII_14 Control-N SI ShiftIn AltChars ASCII_15 Control-O DLE Data Link Escape ASCII_16 DC1 resume output ASCII_17 control-Q XON DeviceControl1 DC2 DeviceControl2 ASCII_18 DC3 suspend output ASCII_19 control-S XOFF DeviceControl3 DC4 DeviceControl4 ASCII_20 NAK Neg Acknowledge ASCII_21 SYN Synchronous idle ASCII_22 ETB End Transm Block ASCII_23 CAN Cancel ASCII_24 Control-X EM End of Medium ASCII_25 SUB Substitute ASCII_26 ESC escape ASCII_27 ESCAPE FS File Separator ASCII_28 GS Group Separator ASCII_29 RS Record Separator ASCII_30 US Unit Separator ASCII_31 Hex Dec Char Hex Dec Char Hex Dec Char Hex Dec Char 00 00 NUL 20 32 space 40 64 @ 60 96 ` 01 01 SOH 21 33 ! 41 65 A 61 97 a 02 02 STX 22 34 " 42 66 B 62 98 b 03 03 ETX 23 35 # 43 67 C 63 99 c 04 04 EOT 24 36 $ 44 68 D 64 100 d 05 05 ENQ 25 37 % 45 69 E 65 101 e 06 06 ACK 26 38 & 46 70 F 66 102 f 07 07 EEL 27 39 ' 47 71 G 67 103 g 08 08 BS 28 40 ) 48 72 H 68 104 h 09 09 HT 29 41 ( 49 73 I 69 105 i GA 10 L 2A 42 * 4A 74 J 6A 106 j OB 11 VT 2B 43 + 4B 75 K 6B 107 k GC 12 FF 2C 44 , 4C 76 L 6C 108 I OD 13 CR 2D 45 - 4D 77 M 60 109 m GE 14 SO 2E 46 . 4E 78 N 6E 110 n OF 15 SI 2F 47 / 4F 79 O 6F 111 o 10 16 DLE 30 48 0 50 80 P 70 112 p 11 17 DC1 31 49 1 51 81 Q 71 113 q 12 18 DC2 32 50 2 52 82 R 72 114 r 13 19 DC3 33 51 3 53 83 S 73 115 s 14 20 DC4 34 52 4 54 84 T 74 116 t 15 21 NAK 35 53 5 55 85 U 75 117 u 16 22 SYN 36 54 6 56 86 V 76 118 v 17 23 ETB 37 55 7 57 87 W 77 119 w 18 24 CAN 38 56 8 58 88 X 78 120 x 19 25 EM 39 57 9 59 89 Y 79 121 y 1A 26 SUB 3A 58 : 5A 90 Z 7A 122 z 1E 27 ESC 3B 59 ; 5B 91 [ 7B 123 { 1C 28 FS 3C 60 < 5C 92 \ 7C 124 | 1D 29 GS 3D 61 = 5D 93 ] 70 125 } 1E 30 RS 3E 62 > 5E 94 ^ 7E 126 ~ 1F 31 US 3F 63 ? 5F 95 _ 7F 127 DE RS422 BALANCED DIFFERENTIAL DRIVERS Electronics Industry Association (EIA) has produced standards for RS485, RS422, RS232, and RS423 that deal with data communications. Compatibility With Other Interfaces Both RS-422 and RS-485 use a twisted-pair wire (i.e. 2 wires) for each signal. They both use the same differential drive with identical voltage swings: 0 to +5V. The main difference between RS-422 and RS-485 is that while RS-422 is strictly for point-to-point communications (and the driver is always enabled), RS-485 can be used for multidrop systems (and the driver has a tri-state capability). SPECIFICATIONS RS423 RS422 Mode of Operation SINGLE - ENDED DIFFERENTIAL Total Number of Drivers and Receivers on One Line 1 DRIVER 1 DRIVER 10 RECVR 10 RECVR Maximum Cable Length 4000 FT. 4000 FT. Maximum Data Rate 100kb/s 10Mb/s Maximum Driver Output Voltage +/-6V -0.25V to +6V Driver Output Signal Level (Loaded Min.) Loaded +/-3.6V +/-2.0V Driver Output Signal Level (Unloaded Max) Unloaded +/-6V +/-6V Driver Load Impedance (Ohms) >450 100 Max. Driver Current in High Z State Power On N/A N/A Max. Driver Current in High Z State Power Off +/-100uA +/-100uA Slew Rate (Max.) Adjustable N/A Receiver Input Voltage Range +/-12V -10V to +10V Receiver Input Sensitivity +/-200mV +/-200mV Receiver Input Resistance (Ohms) 4k min. 4k min. Characteristic Impedance (Ohms): A value based on the inherent conductance, resistance, capacitance and inductance of a cable that represents the impedance of an infinitely long cable. When the cable is out to any length and terminated with this Characteristic Impedance, measurements of the cable will be identical to values obtained from the infinite length cable. That is to say that the termination of the cable with this impedance gives the cable the appearance of being infinite length, allowing no reflections of the transmitted signal. If termination is required in a system, the termination impedance value should match the Characteristic Impedance of the cable. Shunt Capacitance (pF/ft): The amount of equivalent capacitive load of the cable, typically listed in a per foot basis One of the factors limiting total cable length is the capacitive load. Systems with long lengths benefits from using low capacitance cable. Propagation velocity (% of c): The speed at which an electrical signal travels in the cable. The value given typically must be multiplied by the speed of light (c) to obtain units of meters per second. For example, a cable that lists a propagation velocity of 78% gives a velocity of 0.78 X 300 X 106 - 234 X 106 meters per second. Plenum cable Plenum rated cable is fire resistant and less toxic when burning than non-plenum rated cable. Check building and fire codes for requirements. Plenum cable is generally more expensive due to the sheathing material used. The RS-422 specification recommends 24AWG twisted pair cable with a shunt capacitance of 16 pF per foot and 100 ohm characteristic impedance. While the RS-485 specification does not specify cabling, these recommendations should be used for RS485 systems as well. It can be difficult to quantity whether shielding is required in a particular system or not, until problems arise. We recommend erring on the safe side and using shielded cable. Shielded cable is only slightly more expensive than unshielded. There are many cables available meeting the recommendations of RS-422 and RS-485, made specifically for that application. Another choice is the same cable commonly used in the misted pair Ethernet cabling. This cable, commonly referred to as Category 5 cable, is defined by the ElA/TIA/ANSI 568 specification The extremely high volume of Category 5 cable used makes it widely available and very inexpensive, often less than half the price of specialty RS422/485 cabling. The cable has a maximum capacitance of 17 pF/ft (14.5 pF typical) and characteristic impedance of 100 ohms. Category 5 cable is available as shielded twisted pair (STP) as well as unshielded twisted pair (UTP) and generally exceeds the recommendations for RS-422 making it an excellent choice for RS-422 and RS-485 systems. ======================PROTOCOLS_GPIB============================== IFC Interface Clear controller initialize all devices REN Remote Enable controller enables remote control ATN Attention controller placing addr or control NRFD Not ready for data listener holds down until ready NDAC Not Data Accepted listener holds down until has data DAV Data valid Talker holds down says data here DIOX DIO1_lsb ->DIO8_m Talker supplies data EOI End of Identify Talker says last data SRQ Service request any device can interrupt GPIB 1 controller 15 devices @ 500kbps 20m Max distance or number of devices*2meters 00 Command Address 20 Listen Address 40 Talk Address 60 Second Address LF 10 terminate CR LF X 88 CR 12 Number Talk Listen 0 @ space 1 A_65 !_33 2 B " 3 C # : : : : : : 31 _ ? <= untalk bus is TTL active low ( open collector ) 5V at 7mA 0 = false > 2.0v ^ 5V 1 = true < 0.8V /_\ ___/\ __| ___ | \/ 3.1K | |___| |\ |___| |___________________| \/\____ | | /\/ |___/\ ____ |/ \/ _|_ 6.2K /// _ | |__________________________________________ ATN : ________ ________ : TRI STAT | | | | : ..........| D1->D8 |.........| D1->D8 |... . DATA : .-->|________| .-->|________| : : : ^ : : ^ : __:______v :_____:______v :____ : | : | | : | | DAV : ___| : |_____| : |_____| : ^ : : ^ : : ^ : : :________v : :________v : : : | | : | | : | NRFD : __:__| |___:_____| |___:_____| : ^ : : ^ : : ^ ___ If both : :___: : :___: | low -->| | -->| | NDAC |_____v_______________| |______________| |___ _____________ GPIB Male | | \ \ | | _____ \ \ DIO1 | 1(| |)_)|13 | DIO5 | | | |_| | | DIO2 | 2(| |)_)|14 | DIO6 | | | |_| | | DIO3 | 3(| |)_)|15 | DIO7 | | | |_| | | DIO4 | 4(| |)_)|16 | DIO8 | | | |_| | | EOI | 5(| |)_)|17 | REN | | | |_| | | DAV | 6(| |)_)|18 | GND | | | |_| | | NRFD | 7(| |)_)|19 | GND | | | |_| | | NDAC | 8(| |)_)|20 | GND | | | |_| | | IFC | 9(| |)_)|21 | GND | | | |_| | | SQ |10(| |)_)|22 | GND | | | |_| | | ATN |11(| |)_)|23 | GND | | | |_| | | GND |12(| |)_)|24 | GND Logic | | |__|_| | | | | / / |_|______/___/ _____________ GPIB Female | \ \ | _____ \ \ | | _| | | | GND |12|)_) (|24| | GND Logic | | _| | | | ATN |11|)_) (|23| | GND | | _| | | | SQ |10|)_) (|22| | GND | | _| | | | IFC | 9|)_) (|21| | GND | | _| | | | NDAC | 8|)_) (|20| | GND | | _| | | | NRFD | 7|)_) (|19| | GND | | _| | | | DAV | 6|)_) (|18| | GND | | _| | | | EOI | 5|)_) (|17| | REN | | _| | | | DIO4 | 4|)_) (|16| | DIO8 | | _| | | | DIO3 | 3|)_) (|15| | DIO7 | | _| | | | DIO2 | 2|)_) (|14| | DIO6 | | _| | | | DIO1 | 1|)_) (|13| | DIO5 | |__|__| / / | / / |_________/___/ GPIB I/0 INTERFACE (IEEE-488) HPIB/GPIB/IEEE-488 standard Up to 15 devices. GPIB 24 Line Bus Pin Signal Number Description Function 1 DATA 1/O 1 Dateline 1/O bus 2 DATA 1/O 2 Dateline 1/O bus 3 DATA 1/O 3 Data line 1/O bus 4 DATA 1/O 4 Data line 1/O bus 5 EIO End or identity 6 DAV Dalavalid 7 NRFD Not Ready For Data 8 NDAC Data Not Accepted 9 SRQ Service Request 10 IFC InterfaceClear 11 ATN Attention 12 Shield or wire ground 13 DATA 1/O 5 Data line 1/O bus 14 DATA 1/O 6 Data line 1/O bus 15 DATA 1/O 7 Data line 1/O bus 16 DATA 1/O 8 Data line 1/O bus 17 REN Remote Enable 18 Ground Ground 19 Ground Ground 20 Ground Ground 21 Ground Ground 22 Ground Ground 23 Ground Ground 29 Logic Ground Logic Ground Devices can be set up in star, linear or other combinations using male/female stackable connectors. ======================PROTOCOLS_SCSI============================================ Apple SCSI HDI-30 30 PIN UNKNOWN CONNECTOR Pin Name Dir Description 1 n/c Reserved for SCSI disk mode. 2 /DB0 [<->] Bit 0 of SCSI data bus 3 GND [---] Ground 4 /DB1 [<->] Bit 1 of SCSI data bus 5 TPWR [<->] Termination power 6 /DB2 [<->] Bit 2 of SCSI data bus 7 /DB3 [<->] Bit 3 of SCSI data bus 8 GND [---] Ground 9 /ACKS [<--] Handshake signal. When low acknowledges a request for data transfer 10 GND [---] Ground 11 /DB4 [<->] Bit 4 of SCSI data bus 12 GND [---] Ground 13 GND [---] Ground 14 /DB5 [<->] Bit 5 of SCSI data bus 15 GND [---] Ground 16 /DB6 [<->] Bit 6 of SCSI data bus 17 GND [---] Ground 18 /DB7 [<->] Bit 7 of SCSI data bus 19 /DBP [<->] SCSI data bus parity bit 20 GND [---] Ground 21 /REQ [-->] Request for a data transfer 22 GND [---] Ground 23 /BSY [<->] When active (low) indicates that SCSI data bus is busy 24 GND [---] Ground 25 /ATN [<--] When active (low) indicates an attention condition 26 /C/D [-->] When active (low) indicates that data is on SCSI bus. When high, indicates that control signals are on the bus 27 /RST [<->] SCSI bus reset 28 /MSG [-->] Indicates the message phase 29 /SEL [<->] SCSI select 30 /I/O [-->] Controls direction of data output. When high, data is input author: Tomi Engdahl SCSI Background It all started back in 1979 when the diskdrive manufacturer come with the bright idea to make a new transfer protocol. The protocol was named Shugart Associates Systems Interface, SASI. This protocol wasn't an ANSI standard, so NCR join Shugart and the ANSI committee X3T9.2 was formed. The new name for the protocol was, Small Computer Systems Interface, SCSI. Common Command Set, CCS, was added in 1985. ANSI finished the SCSI standard in 1986. SCSI-II devices was released in 1988 and was an official standard in 1994. SCSI-III is currently not yet official. Usage SCSI is used to connect peripherals to an computer. It allows you to connect harddisks, tape devices, CD-ROMs, CD-R units, DVD, scanners, printers and many other devices. SCSI is in opposite to IDE/ATA very flexible. Today SCSI is most often used servers and other computers which require very good performance. IDE/ATA is more popular due to the fact that IDE/ATA devices tend to be cheaper. Definitions SCSI Short for Small Computer Systems Interface. The original CSI protocol. ANSI standard X3.131-1996. Busspeed 5 MHz. Datawidth 8 bits. SCSI-II adds support for CD-ROM's, scanners /tapedrives. ----------------------PROTOCOLS_SCSI---------------------- Apple SCSI HDI-30 30 PIN UNKNOWN CONNECTOR Pin Name Dir Description 1 n/c Reserved for SCSI disk mode. 2 /DB0 [<->] Bit 0 of SCSI data bus 3 GND [---] Ground 4 /DB1 [<->] Bit 1 of SCSI data bus 5 TPWR [<->] Termination power 6 /DB2 [<->] Bit 2 of SCSI data bus 7 /DB3 [<->] Bit 3 of SCSI data bus 8 GND [---] Ground 9 /ACKS [<--] Handshake signal. When low acknowledges a request for data transfer 10 GND [---] Ground 11 /DB4 [<->] Bit 4 of SCSI data bus 12 GND [---] Ground 13 GND [---] Ground 14 /DB5 [<->] Bit 5 of SCSI data bus 15 GND [---] Ground 16 /DB6 [<->] Bit 6 of SCSI data bus 17 GND [---] Ground 18 /DB7 [<->] Bit 7 of SCSI data bus 19 /DBP [<->] SCSI data bus parity bit 20 GND [---] Ground 21 /REQ [-->] Request for a data transfer 22 GND [---] Ground 23 /BSY [<->] When active (low) indicates that SCSI data bus is busy 24 GND [---] Ground 25 /ATN [<--] When active (low) indicates an attention condition 26 /C/D [-->] When active (low) indicates that data is on SCSI bus. When high, indicates that control signals are on the bus 27 /RST [<->] SCSI bus reset 28 /MSG [-->] Indicates the message phase 29 /SEL [<->] SCSI select 30 /I/O [-->] Controls direction of data output. When high, data is input author: Tomi Engdahl SCSI Background It all started back in 1979 when the diskdrive manufacturer come with the bright idea to make a new transfer protocol. The protocol was named Shugart Associates Systems Interface, SASI. This protocol wasn't an ANSI standard, so NCR join Shugart and the ANSI committee X3T9.2 was formed. The new name for the protocol was, Small Computer Systems Interface, SCSI. Common Command Set, CCS, was added in 1985. ANSI finished the SCSI standard in 1986. SCSI-II devices was released in 1988 and was an official standard in 1994. SCSI-III is currently not yet official. Usage SCSI is used to connect peripherals to an computer. It allows you to connect harddisks, tape devices, CD-ROMs, CD-R units, DVD, scanners, printers and many other devices. SCSI is in opposite to IDE/ATA very flexible. Today SCSI is most often used servers and other computers which require very good performance. IDE/ATA is more popular due to the fact that IDE/ATA devices tend to be cheaper. Definitions SCSI Short for Small Computer Systems Interface. The original CSI protocol. ANSI standard X3.131-1996. Busspeed 5 MHz. Datawidth 8 bits. SCSI-II adds support for CD-ROM's, scanners /tapedrives. SCSI Pronounced "scuzzy," small computer system interface is a method of adding additional devices, such as hard drives or scanners, to the computer. AGP Accelerated Graphics Port high-speed connection used by graphics card to interface with the computer. Sound card - used by the computer to record and play audio by converting analog sound into digital information Graphics card translates image data from the computer into a format that can be displayed by the monitor. No matter how powerful components inside your computer are, you need a way to interact with them. This interaction is called input/output (I/O). The most common types of I/O in PCs are: Monitor monitor is primary device for displaying information Keyboard - keyboard is the primary device for entering information into the computer. Mouse mouse is the primary device for navigating and interacting with computer Removable storage Removable-storage devices allow you to add new information to your computer very easily, as well as save information that you want to carry to different location. Floppy disk most common form of removable storage, floppy disks are extremely inexpensive and easy to save information to. CD-ROM CD-ROM (compact disc, read-only memory) a popular form of distribution of commercial software. Many systems now offer CD-R (recordable) and CD-RW (rewritable), can also record. Flash memory Based on a type of ROM called electrically erasable programmable read-only memory (EEPROM), Flash memory provides fast, permanent storage. CompactFlash, SmartMedia and PCMCIA cards are all types of Flash memory. DVD-ROM DVD-ROM (digital versatile disc, read-only memory) is similar to CD-ROM but is capable of holding much more information. Ports Parallel port is commonly used to connect a printer. Serial port is typically used to connect an external modem. Universal Serial Bus (USB) - Quickly becoming the most popular external connection, USB ports offer power and versatility and are incredibly easy to use. Firewire (IEEE 1394) Firewire is a very popular method of connecting digital-video devices, such as camcorders or digital cameras, to your computer. Internet/network connection Modem This is standard method of connecting to the Internet. Local area network (LAN) card - This is used by many computers, particularly those in an Ethernet office network, to connected to each other. Cable modem Some people now use the cable-television system in their home to connect to the Internet. Digital Subscriber Line (DSL) modem - This is a high-speed connection that works over a standard telephone line. Very high bit-rate DSL (VDSL) modem - A newer variation of DSL, VDSL requires that your phone line have fiber-optic cables. ======================PROTOCOLS_USB===================================== USB Universal Serial Bus developed by Compaq, DEC, IBM, Intel, Microsoft, NEC, for low- to mid-speed peripherals. allow Plug and Play computer peripherals new peripherals configured automatically upon attachment allow up to 127 devices USB has a 12 Mbps bandwidth USB is host-centric, allow it to use host PC's resources to detect when a device is added or removed. Windows 9x based Dual speed: 1.5 & 12 Mbps 5 meter max connection 4-wire serial bus Up to 127 devices 2-wire differential signaling Supports isochronous transactions All transactions originate from host 8/16/32/64-byte max data packet sizes 4 packets: Token, Data, Handshake, Special Token packet sets up transactions 1 USB Overview, http://www.usb.org/ 2 USB Overview, http://www.usb.org/ 3 USB Overview, http://www.usb.org/ 4 "RTC Bus Directory: USB", RTC, August 1997, p. 39. FireWire IEEE 1394 may be seen as usurpers to the USB throne; provide a high speed connection to the PC and suited for digital camcorders,(DVD) players. USB? standardized, easy-to-use way to connect up to 127 devices to a computer. maximum of 6 megabits per second of bandwidth, "A" connectors head "upstream" toward computer, "B" connectors head "downstream" to individual devices. it is impossible to ever get confused typical USB 4-port hub accepts 4 "A" connections mice and digital cameras get their power from the bus (up to 500 milliamps at 5 volts) comes from the computer. USB cable has two wires for power (+5 volts and Ground) twisted pair of wires to carry the data. up to 500 milliamps of power at 5 volts. (+5 volts (red) a nd Ground (brown)) twisted pair (yellow and blue) of wires to carry data. The cable is also shielded. powers up, queries all of devices connected to bus and assigns each one an address (a process called enumeration -- devices are also enumerated when they connect to the bus). also what type of data transfers it wishes to perform: Interrupt - a device like a mouse or a keyboard, Bulk - A device like a printer, Isochronous - a streaming device (e.g. - speakers) host can also send commands or query parameters with control packets. As devices are enumerated, host is keeping track of total bandwidth of isochronous and interrupt devices are requesting. They can have up to 90% of 12 megabits per sec available. After 90% is used up, host denies access to other devices Control packets and packets for bulk transfers use any bandwidth left over (at least 10%). Universal Serial Bus divides the available bandwidth into frames, and the host controls the frames. Frames contain 1,500 bytes a new frame starts every millisecond. During a frame, isochronous and interrupt devices get a slot so they are guaranteed bandwidth they need. Bulk and control transfers use whatever space is left. SCSI Pronounced "scuzzy," small computer system interface is a method of adding additional devices, such as hard drives or scanners, to the computer. AGP Accelerated Graphics Port high-speed connection used by graphics card to interface with the computer. Sound card - used by the computer to record and play audio by converting analog sound into digital information Graphics card translates image data from the computer into a format that can be displayed by the monitor. No matter how powerful components inside your computer are, you need a way to interact with them. This interaction is called input/output (I/O). The most common types of I/O in PCs are: Monitor monitor is primary device for displaying information Keyboard - keyboard is the primary device for entering information into the computer. Mouse mouse is the primary device for navigating and interacting with computer Removable storage Removable-storage devices allow you to add new information to your computer very easily, as well as save information that you want to carry to different location. Floppy disk most common form of removable storage, floppy disks are extremely inexpensive and easy to save information to. CD-ROM CD-ROM (compact disc, read-only memory) a popular form of distribution of commercial software. Many systems now offer CD-R (recordable) and CD-RW (rewritable), can also record. Flash memory Based on a type of ROM called electrically erasable programmable read-only memory (EEPROM), Flash memory provides fast, permanent storage. CompactFlash, SmartMedia and PCMCIA cards are all types of Flash memory. DVD-ROM DVD-ROM (digital versatile disc, read-only memory) is similar to CD-ROM but is capable of holding much more information. Ports Parallel port is commonly used to connect a printer. Serial port is typically used to connect an external modem. Universal Serial Bus (USB) - Quickly becoming the most popular external connection, USB ports offer power and versatility and are incredibly easy to use. ======================PROTOCOLS_Firewire======================= Firewire (IEEE 1394) Firewire is a very popular method of connecting digital-video devices, such as camcorders or digital cameras, to your computer. Internet/network connection Modem This is standard method of connecting to the Internet. Local area network (LAN) card - This is used by many computers, particularly those in an Ethernet office network, to connected to each other. Cable modem Some people now use the cable-television system in their home to connect to the Internet. Digital Subscriber Line (DSL) modem - This is a high-speed connection that works over a standard telephone line. Very high bit-rate DSL (VDSL) modem - A newer variation of DSL, VDSL requires that your phone line have fiber-optic cables. ======================PROTOCOLS_I2C======================== I2C bus developed by Valvo/Philips as two wire two way serial bus One IC will assume the roll of a Master and will take over the line. The Other ICs will assume the roll of a Slave and will recieve the masters signal. ___ _____ ______ ___.. ___ ____ \|/ / A7 \/ A6 \/ ACK\ /|\ |__/______/\______/\___.. ..___ ...\___| DATA 4u 4.7u _____ ___ ___ ___ __. .._ ____ | /|\ | /|\ | /|\ | /|\ | | |___| |___| |___| |___| |___| CLOCK 0) Both clock and data high (open/free) 1) Master starts by pulling data low while clock high a) failing edge + data high =slaves read address 2) Master now controls clock a) Masters lowers clock after 4us b) Master tries to raise clock. i) if Clock stays down , yield to other master c) Data is to be read at rising clock edge. 3) Master first sends out address and read write mode bit. a) First 7 bits are a slave's address b) Last bit @ 0 means slave will read 4) After each byte, Master expects a acknowledge. a) Master lets the data line go high. b) Slave that receives single pulls data line low on falling edge. c) Abort with stop condition if no acknowledge 5) Then the Master sends data bytes 6) After last ackn, Master goes high while clock is high a) Clock goes high then in 4.7us the data goes high. 7) Wait at least 4.7us for next cycle __ ____________________ ____________________________ |ST|A7|A6|A5|A4|A3|A2|A1|RW|AK|D7|D6|D5|D4|D3|D2|D1|D0|AK| |__|__|__|__|__|__|__|__|__| |__|__|__|__|__|__|__|__| |. ___________________________ _______________________ . ^ | | | | SLAVE /|\|__| SLAVE |__| READS ADDRESS | ^ READS DATA ^ IS IT MINE? 0=SLAVE /|\ /|\ WILL READ |DATA RECEIVER ACKNOWLEDGE | ======================PROTOCOLS_TRANSMIT===================================== V.32bis synchs/asynch,full dupx,2wires,4.8K,7.2K,9.6K,12K,14.4Kbps Line drivers and receivers used to exchange data between nodes on a network a transmission line if rise and/or fall time greater than half time for signal to travel from the transmitter to receiver. a "bus" of up to 10 receivers. Quasi multi-drop networks (4-wire) constructed using RS422 devices.in half-duplex mode, single master sends to one "slave" Typically one device (node) addressed by host a response is received from that device. 4-wire, half-duplex constructed to avoid "data collision" RS485 up to 32 drivers and 32 receivers on a single (2-wire) bus. introduction of "automatic" repeaters and high-impedance drivers / receivers can be extended to hundreds (or even thousands) of nodes both drivers and receivers in the "tri-state" mode drivers are able to withstand "data collisions" hardware units (converters, repeaters, micro-processor controls) remain in receive mode until ready to transmit Single master systems initiates a communications request to "slave node" by addressing that unit. hardware detects start-bit of transmission and automatically enables (on the fly) RS485 transmitter Once character sent reverts back to receive mode in about 1-2 microseconds transmitter will automatically re-trigger with each new character Once a "slave" unit is addressed able to respond immediately because of the fast transmitter turn-off time of the automatic device. utilize bandwidth with up to 100% through put. ======================PROTOCOLS_ASCII============================== Give me a break! the canonical humorous response is "Control C". SOH Null ASCII_0 SOH Start Of Header ASCII_1 STX Start Of Text ASCII_2 ETX End Of Text ASCII_3 control-C Unix_interrupt EOT End Of Transmis ASCII_4 ENQ ENQuire. ASCII_5 ACK ACKnowledge ASCII_6 BEL sound bell ASCII_7 BS Backspace ASCII_8 HT tab ASCII_9 Control-I Unix => "\t" LF line feed ASCII_10 control-J Unix => "\n" VT Vertical Tab ASCII_11 FF form feed ASCII_12 Control-L CR CursReturn2Left ASCII_13 Control-M Unix => "\r" SO ShiftOut AltChars ASCII_14 Control-N SI ShiftIn AltChars ASCII_15 Control-O DLE Data Link Escape ASCII_16 DC1 resume output ASCII_17 control-Q XON DeviceControl1 DC2 DeviceControl2 ASCII_18 DC3 suspend output ASCII_19 control-S XOFF DeviceControl3 DC4 DeviceControl4 ASCII_20 NAK Neg Acknowledge ASCII_21 SYN Synchronous idle ASCII_22 ETB End Transm Block ASCII_23 CAN Cancel ASCII_24 Control-X EM End of Medium ASCII_25 SUB Substitute ASCII_26 ESC escape ASCII_27 ESCAPE FS File Separator ASCII_28 GS Group Separator ASCII_29 RS Record Separator ASCII_30 US Unit Separator ASCII_31 Hex Dec Char Hex Dec Char Hex Dec Char Hex Dec Char 00 00 NUL 20 32 space 40 64 @ 60 96 ` 01 01 SOH 21 33 ! 41 65 A 61 97 a 02 02 STX 22 34 " 42 66 B 62 98 b 03 03 ETX 23 35 # 43 67 C 63 99 c 04 04 EOT 24 36 $ 44 68 D 64 100 d 05 05 ENQ 25 37 % 45 69 E 65 101 e 06 06 ACK 26 38 & 46 70 F 66 102 f 07 07 EEL 27 39 ' 47 71 G 67 103 g 08 08 BS 28 40 ) 48 72 H 68 104 h 09 09 HT 29 41 ( 49 73 I 69 105 i GA 10 L 2A 42 * 4A 74 J 6A 106 j OB 11 VT 2B 43 + 4B 75 K 6B 107 k GC 12 FF 2C 44 , 4C 76 L 6C 108 I OD 13 CR 2D 45 - 4D 77 M 60 109 m GE 14 SO 2E 46 . 4E 78 N 6E 110 n OF 15 SI 2F 47 / 4F 79 O 6F 111 o 10 16 DLE 30 48 0 50 80 P 70 112 p 11 17 DC1 31 49 1 51 81 Q 71 113 q 12 18 DC2 32 50 2 52 82 R 72 114 r 13 19 DC3 33 51 3 53 83 S 73 115 s 14 20 DC4 34 52 4 54 84 T 74 116 t 15 21 NAK 35 53 5 55 85 U 75 117 u 16 22 SYN 36 54 6 56 86 V 76 118 v 17 23 ETB 37 55 7 57 87 W 77 119 w 18 24 CAN 38 56 8 58 88 X 78 120 x 19 25 EM 39 57 9 59 89 Y 79 121 y 1A 26 SUB 3A 58 : 5A 90 Z 7A 122 z 1E 27 ESC 3B 59 ; 5B 91 [ 7B 123 { 1C 28 FS 3C 60 < 5C 92 \ 7C 124 | 1D 29 GS 3D 61 = 5D 93 ] 70 125 } 1E 30 RS 3E 62 > 5E 94 ^ 7E 126 ~ 1F 31 US 3F 63 ? 5F 95 _ 7F 127 DE NUL Null DLE Data Link Escape SOH Startof Heading DC1 Device Control 1 STX Start of Text DC2 Device Control 2 ETX End of Text DC3 Device Control 3 EOT End Trans DC4 Device Control 4 ENQ Enquiry EM End of Medium ACK Acknowledge SUB Substitute BEL Bell ESC Escape BS BackSpace FS File Separator HT Horl Tab GS Group Separator LF Line Feed RS Recorder Separator VT Vertical Tab US Unit Separator FF Form Feed DEL Delete CR Carriage Ret SO Shift Out SI Shift In NAK Negat Acknow SYN Synchron Idle ETB End Trans Block CAN Cancel Sig Det NUL Null DLE Data Link Escape SOH Start Heading DC1 Device Control 1 STX Start of Text DC2 Device Control 2 ETX End of Text DC3 Device Control 3 EOT End of Transn DC4 Device Control 4 ENQ Enquiry EM End of Medium ACK Acknowledge SUB Substitute BEL Bell ESC Escape BS BackSpace FS File Separator HT Horizontal Tab GS Group Separator LF Line Feed RS Recorder Separator VT Vertical Tab US Unit Separator FF Form Feed DEL Delete CR Carriage Return SO Shift Out SI Shift In NAK Negative Acknowledge SYN Synchronous Idle ETB End of Transmission Block CAN Cancel ASCII American Standard Code for Information Interchange US-ASCII uses lower seven bits (character points 0 to 127) NUL Null DLE Data Link Escape SOH StartHeading DC1 Device Control 1 STX Start Text DC2 Device Control 2 ETX End Text DC3 Device Control 3 EOT End Trans DC4 Device Control 4 ENQ Enquiry EM End of Medium ACK Acknowledge SUB Substitute BEL Bell ESC Escape BS BackSpace FS File Separator HT Horizontal Tab GS Group Separator LF Line Feed RS Recorder Separator VT Vertical Tab US Unit Separator FF Form Feed DEL Delete CR Carriage Return SO Shift Out SI Shift In NAK Negative Ackno SYN Synch s Idle ETB End Trans Block CAN Cancel Give me a break! the canonical humorous response is "Control C". SOH Null ASCII_0 SOH Start Of Header ASCII_1 STX Start Of Text ASCII_2 ETX End Of Text ASCII_3 control-C Unix_interrupt EOT End Of Transmis ASCII_4 ENQ ENQuire. ASCII_5 ACK ACKnowledge ASCII_6 BEL sound bell ASCII_7 BS Backspace ASCII_8 HT tab ASCII_9 Control-I Unix => "\t" LF line feed ASCII_10 control-J Unix => "\n" VT Vertical Tab ASCII_11 FF form feed ASCII_12 Control-L CR CursReturn2Left ASCII_13 Control-M Unix => "\r" SO ShiftOut AltChars ASCII_14 Control-N SI ShiftIn AltChars ASCII_15 Control-O DLE Data Link Escape ASCII_16 DC1 resume output ASCII_17 control-Q XON DeviceControl1 DC2 DeviceControl2 ASCII_18 DC3 suspend output ASCII_19 control-S XOFF DeviceControl3 DC4 DeviceControl4 ASCII_20 NAK Neg Acknowledge ASCII_21 SYN Synchronous idle ASCII_22 ETB End Transm Block ASCII_23 CAN Cancel ASCII_24 Control-X EM End of Medium ASCII_25 SUB Substitute ASCII_26 ESC escape ASCII_27 ESCAPE FS File Separator ASCII_28 GS Group Separator ASCII_29 RS Record Separator ASCII_30 US Unit Separator ASCII_31 Hex Dec Char Hex Dec Char Hex Dec Char Hex Dec Char 00 00 NUL 20 32 space 40 64 @ 60 96 ` 01 01 SOH 21 33 ! 41 65 A 61 97 a 02 02 STX 22 34 " 42 66 B 62 98 b 03 03 ETX 23 35 # 43 67 C 63 99 c 04 04 EOT 24 36 $ 44 68 D 64 100 d 05 05 ENQ 25 37 % 45 69 E 65 101 e 06 06 ACK 26 38 & 46 70 F 66 102 f 07 07 EEL 27 39 ' 47 71 G 67 103 g 08 08 BS 28 40 ) 48 72 H 68 104 h 09 09 HT 29 41 ( 49 73 I 69 105 i GA 10 L 2A 42 * 4A 74 J 6A 106 j OB 11 VT 2B 43 + 4B 75 K 6B 107 k GC 12 FF 2C 44 , 4C 76 L 6C 108 I OD 13 CR 2D 45 - 4D 77 M 60 109 m GE 14 SO 2E 46 . 4E 78 N 6E 110 n OF 15 SI 2F 47 / 4F 79 O 6F 111 o 10 16 DLE 30 48 0 50 80 P 70 112 p 11 17 DC1 31 49 1 51 81 Q 71 113 q 12 18 DC2 32 50 2 52 82 R 72 114 r 13 19 DC3 33 51 3 53 83 S 73 115 s 14 20 DC4 34 52 4 54 84 T 74 116 t 15 21 NAK 35 53 5 55 85 U 75 117 u 16 22 SYN 36 54 6 56 86 V 76 118 v 17 23 ETB 37 55 7 57 87 W 77 119 w 18 24 CAN 38 56 8 58 88 X 78 120 x 19 25 EM 39 57 9 59 89 Y 79 121 y 1A 26 SUB 3A 58 : 5A 90 Z 7A 122 z 1E 27 ESC 3B 59 ; 5B 91 [ 7B 123 { 1C 28 FS 3C 60 < 5C 92 \ 7C 124 | 1D 29 GS 3D 61 = 5D 93 ] 70 125 } 1E 30 RS 3E 62 > 5E 94 ^ 7E 126 ~ 1F 31 US 3F 63 ? 5F 95 _ 7F 127 DE ----------------------PROTOCOLS_EYE_PATTERN--------------------- Eye-Pattern ________________ \/ \/ Eye Pattern SONET OC-3 ____/\____/\____ Eye-Pattern digital data transmissions SONET, SDH fiber channel used to evaluate determine the health of the DUT and conduct compliance testing to industry standards ________________ \/ \/ Eye Pattern ____/\____/\____ ___________ / ____/ 1 _ __ \ / \__________/ 2 ____ \ \_________ 3 __________ / \ _/ \__ 4 ____ ____ \ / \____/ 5 ____ / __________/ 6 ____ / \ ____/ \____ 7 ___________ \ \____ 8 eye diagram a cumulative graphical portrait edge placement due to noise of jitter can locate tIme reference edge examine the jitter on subsequent edges. Jitter Degrees intervals (Uls) intervals (Uls) power Peak-to-peak jitterpsec peak-to-peak peak-to-peak. rms units.(dBui (6.43 nsec=1 cycle) normalized normalize normalize 100 5.6 0.015552 0.0022217 ‹53.07 200 1.12 0.003110 0.0004443 ‹67.05 Notes: RMS UI calculation uses 1/7th of peak-to-peak jitter approxim. dBui means dedbels relative to one unit interval. Low-freq High-frequency Frequency Cost jitter jitter generation 1 lowest 1 best 1 best. techniques 3 highest 3 worst 3 worst Comments Type Direct clock/TCXO 1 2 1 or 2 Very good jitter A Direct VCXO 2 1 1 or 2 Very good jitter B Direct oven 3 1 1 Exceflent jItter C Tuned Multipily 2 1 1 or 2 periodic jitter D DiscretePLL 2 2 2or3 Goodjitter E MonolightPLL 1 3 2or3 close in poor F TCXO temperature-compensated crystal oscillator. VCXO voltage-controlled crystal oscillator. Close-in jitter is typically jitter with a frequency V.32bis synchs/asynch,full dupx,2wires,4.8K,7.2K,9.6K,12K,14.4Kbps Line drivers and receivers used to exchange data between nodes on a network a transmission line if rise and/or fall time greater than half time for signal to travel from the transmitter to receiver. EIA Electronics Industry Association produced standards for RS485, RS422, RS232, and RS423 previously marked with prefix "RS" to indicate recommended standard; RS232 (single-ended) introduced in 1962, allows for up to 20K bits/second to 50Ft. @ Independent channels for two-way (full-duplex) idle state (MARK) signal negative to common, active state (SPACE) signal positive to common. RS422 (differential) pair of converters from RS232 to RS422 (and back again) can be used to form "RS232 extension cord." up to 100K bits/second up to 4000 Ft. also specified for multi-drop (party-line) a "bus" of up to 10 receivers. Quasi multi-drop networks (4-wire) constructed using RS422 devices.in half-duplex mode, single master sends to one "slave" Typically one device (node) addressed by host a response is received from that device. 4-wire, half-duplex constructed to avoid "data collision" RS485 up to 32 drivers and 32 receivers on a single (2-wire) bus. introduction of "automatic" repeaters and high-impedance drivers / receivers can be extended to hundreds (or even thousands) of nodes both drivers and receivers in the "tri-state" mode drivers are able to withstand "data collisions" hardware units (converters, repeaters, micro-processor controls) remain in receive mode until ready to transmit Single master systems initiates a communications request to "slave node" by addressing that unit. hardware detects start-bit of transmission and automatically enables (on the fly) RS485 transmitter Once character sent reverts back to receive mode in about 1-2 microseconds transmitter will automatically re-trigger with each new character Once a "slave" unit is addressed able to respond immediately because of the fast transmitter turn-off time of the automatic device. utilize bandwidth with up to 100% through put. SPECIFICATIONS RS232 RS423 RS422 RS485 Mode of Operation SINGLE SINGLE DIFFER- DIFFER- ENDED -ENDED ENTIAL ENTIAL Number Drivers and 1 DRIVER 1 DRIVER 1 DRIVER 1 DRIVER Receivers One Line 1 RECVR 10 RECVR 10 RECVR 32 RECVR Maximum Cable Length 50 FT. 4000 FT. 4000 FT. 4000 FT. Maximum Data Rate 20kb/s 100kb/s 10Mb/s 10Mb/s Max Driver Output -0.25V to Voltage +/-25V +/-6V +6V -7V to +12V Driver Out Loaded +/-5V to +/-3.6V +/-2.0V +/-1.5V (Loaded Min.) +/-15V Driver Unloaded +/-25V +/-6V +/-6V +/-6V Driver Load Imped 3k to 7k >=450 100 54 IoutHigh Z Pwr On N/A N/A N/A +/-100uA IoutHigh Z Pwr Off +/-6mA @ +/-100uA +/-100uA +/-100uA State +/-2v Slew Rate (Max.) 30V/uS Adjustable N/A N/A Rec Input Range +/-15V +/-12V -10V to -7V to +12V 10V Receiver Sens +/-3V +/-200mV +/-200mV +/-200mV Receiver Res 3k to 7k 4k min. 4k min. >=12k ======================PROTOCOLS_JITTER===================================== Eye-Pattern ________________ \/ \/ Eye Pattern SONET OC-3 ____/\____/\____ Eye-Pattern digital data transmissions SONET, SDH fiber channel used to evaluate determine the health of the DUT and conduct compliance testing to industry standards ________________ \/ \/ Eye Pattern ____/\____/\____ ___________ / ____/ 1 _ __ \ / \__________/ 2 ____ \ \_________ 3 __________ / \ _/ \__ 4 ____ ____ \ / \____/ 5 ____ / __________/ 6 ____ / \ ____/ \____ 7 ___________ \ \____ 8 eye diagram a cumulative graphical portrait edge placement due to noise of jitter can locate tIme reference edge examine the jitter on subsequent edges. Jitter Degrees intervals (Uls) intervals (Uls) power Peak-to-peak jitterpsec peak-to-peak peak-to-peak. rms units.(dBui (6.43 nsec=1 cycle) normalized normalize normalize 100 5.6 0.015552 0.0022217 ‹53.07 200 1.12 0.003110 0.0004443 ‹67.05 Notes: RMS UI calculation uses 1/7th of peak-to-peak jitter approxim. dBui means dedbels relative to one unit interval. Low-freq High-frequency Frequency Cost jitter jitter generation 1 lowest 1 best 1 best. techniques 3 highest 3 worst 3 worst Comments Type Direct clock/TCXO 1 2 1 or 2 Very good jitter A Direct VCXO 2 1 1 or 2 Very good jitter B Direct oven 3 1 1 Exceflent jItter C Tuned Multipily 2 1 1 or 2 periodic jitter D DiscretePLL 2 2 2or3 Goodjitter E MonolightPLL 1 3 2or3 close in poor F TCXO temperature-compensated crystal oscillator. VCXO voltage-controlled crystal oscillator. Close-in jitter is typically jitter with a frequency ============================================================= jitter calulations 15MHz = 66.66nsec= 33.33n per half cycle 7uA 1.97 to 2.16 400fF cap 17.5V/us wil no 1/2 volt in 33us a facto of two off Freq = I/V*C*2 shot noise = sqrt(2*q+Idc*freq) shot noise = sqrt(2*q+Idc*Idc/V*C*2) = Idc*sqrt(q/Q) tolerance =Inoise/Idc sqrt(Q/q) = = sqrt(N) tolerance = Idc/(2*Q)/( (sqrt(q)/sqrt(Q)) = 1/sqrt(q*Q) Q = 800fF*.2V = 160E-15 N = 1E6 eclectorn = 60dB down. ======================DIGITAL_CODING============================ content less than 10 kHL 0 1 0 0 1 1 1 0 1 1 0 : _:_ : : _:_ _:_ _:_ : _:_ _:_ : RZ _ : _| : |_ : _ : _| : |_| : |_| : |_ : _| : |_| : |_ : |_:_| : |_:_| |_:_| : : : |_:_| : : |_:_| : _:_ : : _:_ _:_ _:_ : _:_ _:_ : Pulse ___:___| : |___:_____:___| : |_| : |_| : |___:___| : |_| : |___:__ Recording : : : : : : : : : : : : _:_ : : _:_ _:_ _:_ : _:_ _:_ : RB .......|.:.|...:.....:...| : |.| : |.| : |...:...| : |.| : |...:.. ___:___| : |___:_____:___| : |_| : |_| : |___:___| : |_| : |___:__ : __:__ : : __:_____:_____:__ : __:__ : : NRZ ...:..|..:..|..:.....:..|..:.....:.....:..|..:..|..:..|..:.....:.. ___:__| : |__:_____:__| : : : |__:__| : |__:_____:__ : : : : : : : : : : : : __:_____:_____:__ : __:__ : : __:__ : : NZRI ...:..|........:.....:..|..:..|.....|..:.....:..|..:..|..:.....:.. ___:__| : : : |__:__| : |__:_____:__| : |__:_____:__ : : : : : : : : : : : :_____: :__ :_____: __: __: :_____: __: :__ MANCHESTER ...|.....|.....|..|..|.....|..|..|..|..|.....|.....|..|..|.....|.. (PM) ___| |_____| |__| |__| |__| |_____| |__| |_____| : : : : : : : : : : : HARVARD _!_:_ _!_:_!_ _:_!_ _:_!_ _:_ _!_:_!_ _:_ _!_:_ _!_:_!_ _:_ _!_:_ _ (FM) : ! : ! : ! : ! : ! : ! : ! : ! : ! : ! : ! Digital Magnetic Tape RZ return to zero) and pulse recording, the tape is normally tmumagnetizcd and pcmlses correspociclimig to the data are recorded on tape. RB (return to bias) modulation is the same as litmlse recording except that the tape is nominally biased or magmietizccl in onedirection. NRZ (nonreturn to zero) VRZI (nonreturn to zero inverted), PM (phase modulation the tape fully magnetized in one direction ------------------------------------------------------------- hamming code P1 P2 X3 P4 X5 X6 X7 gray code 000 001 1 011 2 010 3 MANCHESTER CODE ZERO = CLOCK IN PHASE ONE = CLOCK INVERT PHASE __ __ __ __ __ __ __ __ __ | | | | | | | | | | | | | | | | | | CLOCK | | | | | | | | | | | | | | | | | | _| |__| |__| |__| |__| |__| |__| |__| |__| |__ __ __ __ __ __ __ __ __ __ | | : | | | : | | | : | : | | | | | DATA | | : | | | : | | | : | : | | | | | _| |__:__| |__| : |__| |__:__| : |__| |__| |__ _______ ___ _______ ___ ___ | S | D | D | D D | D D D | D | P | T |___| |___| |___________| |___| LSB MSB S=startBit D=data P=ParityBit 1=StopBit T=1/Baud 9600Baud=104.2us DTE Rdy Trans Recv ======================RADIO_CONTROLLED============================================ RC servo controlling RC Servo motors have built in motor, gearbox, position feedback mechanism and controlling electronics. controlled using simple pulse controlling. 3 wire interface for control and power supply. wires are colored using following color code: BLACK Ground WHITE Control pin RED +4.8V power supply (+5V works well in this) pulse is positive going pulse with length of 1 to 2 ms which is repeated about 50-60 times a second. : ____ ____ _+4.8V | | | | | | | | ____| |_____________________________| |____ _GND |<-->| 1..2 ms |<-------------------------------->| 18-25 ms 1 ms pulses sets servo to one end position sending 2 ms pulses sets it to other end position. Sending 1.5 ms pulse sets servo motor to center position _______ ___ _______ ___ ___ | S | D | D | D D | D D D | D | P | T |___| |___| |___________| |___| LSB MSB S=startBit D=data P=ParityBit 1=StopBit T=1/Baud 9600Baud=104.2us ======================PROTOCOLS_BINARY======================================= n States LSB LSB LSB_% S/N_dB DynRgn 2^n 1/2^n in ppm full scale Quantiz dB 0 1 1.000 i,ooo,ooo loo 1.76 O.OO 1 2 0.500 500,000 50 7.78 6.02 2 4 0.250 250,000 25 13.80 12.04 3 8 0.125 125,000 12.5 19.82 18.06 4 16 0.062500 62,500 6.25 25.84 24.08 5 32 0.031250 31,250 3.125 31.86 30.10 6 64 0.015625 15,625 1.5625 37.88 36.12 7 128 0.007812500 7,812.500 0.781250 43.90 42.14 8 256 0.003906250 3,906.250 0.390625 49.92 48.16 9 512 0.001953125 1,953.125 0.195312 55.95 54.19 10 1,024 0.000976562500 976.562 0.097656 61.97 60.21 11 2,048 0.000488281250 488.281 0.048828 67.99 66.23 12 4,096 0.000244140625 244.141 0.024414 74.01 72.25 13 8.192 0.000122070313 122.070 0.012207 80.03 78.27 14 16.384 0.000061035156 61.035 0.006104 86.05 84.29 15 32.768 0.000030517578 30.518 0.003052 92.07 90.31 16 65,536 0.000015258789 15.259 0.001526 98.09 96.33 17 131,072 0.000007629395 7.6€9 0.000763 104.11 102.35 18 262,144 0.000003814697 3.815 0.000381 110.13 108.37 19 524,288 0.000001907349 1.907 0.000191 116.15 114.39 20 1,048,576 0.000000953674 0.954 0.000095 122.17 120.41 Scale Offset Binary Two's Compl. One's Compl. Sign Mag. +FS-lLSB 1111... 1111 0111... 1111 0111... 1111 1111... 1111 +3/4 FS 1110... 0000 0110... 0000 0110... 0000 1110... 0000 +l/2 FS 1100... 0000 0100... 0000 0100... 0000 1100... 0000 +1/4 FS 1010... 0000 0010... 0000 0010... 0000 1010... 0000 +0 1000... 0000 0000... 0000 0000... 0000 1000... 0000 -0 ----... ---- ----... ---- 1111... 1111 0000... 0000 -1/4 FS 0110... 0000 1110... 0000 1101... 1111 0010... 0000 FS 0100... 0000 1100... 0000 1011... 1111 O1OO... 0000 -3/4 FS 0010... 0000 1010... 0000 1001... 1111 0110... 0000 -FS+1LSB 0000... 0001 1000... 0001 1000... 0000 0111... 0000 -FS 0000... 0000 1000... 0000 ----... ---- ----... --- ------------------------------------------------------------- Straight Binary or Natural Binary - A positive weighted code in which a number is represented by N= a0*2^0 +a1*2^1 +a2*2^2 +... an*2^n Each coefficient "a" has a value of 0 or 1. Data Converters use the fractional form of this code: N= a1/2^1 +a2/2^2 +... an/2^n ; 0 1 END AROUND CARRY OPEnATION ------- 00011011 l's complement binary subtraction doesnot require any borrows but does require an end-around carry. STANDARD SUBTRACTION 57_10 ‹ 30_10 = 27_10 00111001 -00011110 -------- =00011011 2s COMPLEMENT EQUIVALENT 100000000 - 00011110 -------- =11100010 TAKE 2's COMPLEMENT 00111001 +11100010 -------- =100011011 DROP ANY CARRY --------- 00011011 2s complement binary subtraction requires borrows but does not require an endaround carry. ======================PROTOCOLS_FLOATING_POINT============================ IEEE-754 single-precision float format, a 32-bit number is descobed by a 23-bit mantissa, m; an 8-bit exponent, e; and a single sign bit, s. The value of the number is given by the formula (tgnoring the special cases described in the standard). Since fixed-point fonnats have no exponent, they can represent numbers with more significant bits than floating-point fonnats of the same overall size. In this typical example [bottom), there are 31 significant bits, f, compared with 23 bits for the IEEE-754 floating-point format of the top figure. Note that, althaugh this jormLtt can represent the number ‹1, it cannot represent + 1 exactly. 31 30-23 22-0 x =((-1)^s)*( 2^(e-127))*(1 +0.m) _________________________ |s| e | m | |_|_______|_______________| 31 30-0 x =( (-1)^s )*( 0.f ) _________________________ |s| f | |_|_______________________| ======================PROTOCOLS_CD=========================== 74 minutes chosen as the standard length? general belief is that it was chosen because the CD designers wanted to have a format that could hold Beethoven's ninth symphony. They were trying to figure out what diameter to use, and the length of certain performances settled it. BURN-Proof (or BurnProof) unfortunate abbreviation of "Buffer-Under-Run Proof". T he technology allows you to avoid buffer underruns by suspending and restarting the write process when the recorder's buffer is about to empty. common sampling rate of 44.1KHz was derived for both NTSC and PAL formats sampling rate for "professional" audio, 48KHz, was chosen because it's an easy multiple of frequencies used for other common formats, e.g. 8KHz for telephones. fairly difficult to do a good conversion from 48KHz to 44.1KHz, which makes it There is relatively little difference in audible quality between 44.1KHz and 48KHz, since the slight increase in frequency response is outside the range of human hearing. Some inaudible tones produce "beats" with audible tones and thus have a noticeable impact, but the improvement from 44.1 to 48 is marginal at best. DD-R and DD-RW Sony standards "double-density" recordable and rewritable discs. The discs hold 1.3GB of data, and are relatively inexpensive,but aren't compatible with CD or DVD players. can only read the discs in a DD-R/DD-RW drive. Andrew S. Tanenbaum "The nice thing about standards is that you have so many to choose from." bootable CD-ROM? On a Mac, CD bootable if a bootable system folder on it. Tell the recording software that you want to make the CD bootable; this usually involves clicking in a checkbox before burning the first session. Then, copy a bootable system folder onto the disc. An easy way to create an appropriate system folder is to launch the system installer, tell it you want to do a "Custom" install, choose the "Universal System" option, and then install it onto the CD source volume. One caveat: any control panels or extensions that want to write to their preferences files will fail. You may need to write from a system folder that has been booted at least once. make a CD without that two-second gap between tracks? Most CD recorders are capable of doing this, given the right software. The key is to use disc-at-once recording instead of track-at-once. Most CD players can only handle uncompressed audio in "Red Book" format. Some newer player, can play MP3 files from a CD-ROM. Such discs should be written in ISO-9660 with 8+3 filenames, ought to use 128Kbps and "plain" stereo for broadest compatibility. (http://www.ijamworld.com/) recommends putting no more than 50 MP3 files in a directory. MP3 is a "lossy" compression format, meaning that it gets its exceptional compression ratios by throwing some of the data away. (MP3 can get a 10:1 reduction with hardly any degradation in audible quality; RTFM (Read The Fine Manual) CD recording process can't be interrupted in mid-session. Once the laser starts writing, recorder must always have data to write, makers of CD recorders put write buffer in drive, usually between 512K and 4MB in size. Data read from the hard drive, tape, or another CD is stored in the buffer, and pulled out as needed by the recorder. If recorder requests data from the write buffer, but there's none there, it's called a buffer underrun. disc is still spinning, but there's no data to write, so the recording process aborts. preventing buffer underruns Use a fast, AV-friendly hard drive Record at a slow speed - 1x. Don't do anything else with the computer while recording. Also watch out for things like anti-virus programs that wake up, virtual memory settings that cause swapping, screen savers that activate during the CD creation process, unusual network activity, and background downloads of data or faxes. Seven Rules of Successful CD Recording" 1.Defragment Your Disk 2.Use a Partition for Staging Input 3.Create a Real Image 4.Test before writing 5.Stabilize Your System for CD-R 6.Shut Down Other Applications 7.After the Burn: Label and Test Write process keeps failing N minutes in speed set to 1x. getting worse over time, may just need to defragment your hard drive. basic building blocks of CD-R media cyanine dye cyan blue in color, phthalocyanine dye faint aqua tinge, metalized azo dark blue. reflective layer is either a silvery alloy, exact composition of which is proprietary, or 24K gold. Taiyo Yuden produced the original gold/green CDs, which were used during the development of CD-R standards.Mitsui Toatsu Chemicals invented the process for gold/gold CDs. Mitsubishi developed the metalized azo dye. Silver/blue CD-Rs, manufactured with a process patented by Verbatim, first became widely available in 1996. According to the Ricoh web site, the silver/silver "Platinum" discs, based on "advanced phthalocyanine dye", were introduced by them in 1997. They didn't really appear on the market until mid-1998 though. The top (label) side of the CD is the part to be most concerned about, since that's where the data lives, and it's easy to damage on a CD-R. Applying a full circular CD label will help prevent scratches. CD-Rs CD-RWs last? manufacturers claim 75 yrs (cyanine dye, in "green"discs), 100 years (phthalocyanine dye, used in "gold" discs), or even 200 years("advanced" phthalocyanine dye, used in "platinum" discs) once the disc has been written. shelf life of an unrecorded disc has been estimated at between 5 and 10 years. excessive heat, humidity, or to direct sunlight greatly reduce lifetime. easiest way to make CD-R unusable is to scratch the top surface. Keep them in a cool, dark, dry place, they will probably live longer than you do By some estimates, pressed CD-ROMs may only last for 10 to 25 years, because aluminum reflective layer starts to corrode after a while. 74 minutes == 333,000 sectors == 650.3MB CD-ROM == 746.9MB CD-DA 80 minutes == 360,000 sectors == 703.1MB CD-ROM == 807.4MB CD-DA Whatever you do, don't try to peel a label off once it's on. You will almost certainly pull part of the recording layer off with the label. CD-R for "CD-Recordable". are WORM (Write Once, Read Multiple) CDs you buy in a store are pressed from a mold. CD-Rs are burned with a laser. less tolerant of extreme temperatures and sunlight, more susceptible to physical damage. CD-Rs or pressed CDs last longer difficult to answer. About 74 minutes of audio, or about 650MB of data. DVD, try http://www.dvddemystified.com/dvdfaq.html. "Write-once media is manufactured similarly to conventional playback-only discs. As with CDs, employ a polycarbonate substrate, reflective layer, and a protective top layer. Sandwiched between the substrate and reflective layer, is a recording layer composed of an organic dye. .... Unlike regular CDs, a pre-grooved spiral track is used to guide the recording laser along the spiral track; greatly simplifies recorder hardware design and ensures disc compatibility." basic CD-R is layered like this, from top to bottom: [optional] label [optional] scratch-resistant and/or printable coating UV-cured lacquer Reflective layer (24K gold or a silver-colored alloy) Organic polymer dye Polycarbonate substrate (the clear plastic part) real gold in "green" and "gold" CDs, but if you hold to it's thin enough to see through gold layer is between 50 and 100nm thick). data is closest to the label side of the CD, not the clear plastic side that the data is read from. If the CD-R doesn't have a hard top coating such as Kodak's "Infoguard", it's fairly easy to scratch the top surface and render the CD-R unusable. A pressed CD has raised and lowered areas, referred to as "lands" and "pits", respectively. A laser in the CD recorder creates marks in the disc's dye layer that have the same reflective properties. The pattern of pits and lands on the disc encodes the information and allows it to be retrieved on an audio or computer CD player. Discs are written from the inside of the disc outward. On a CD-R you can verify this by looking at the disc after you've written to it. The spiral track makes 22,188 revolutions around the CD, with roughly 600 track revolutions per millimeter as you move outward. If you "unwound" the spiral, it would be about 3.5 miles long. The construction of a CD-RW is different: [optional] label [optional] scratch-resistant and/or printable coating UV-cured lacquer Reflective layer Upper dielectric layer Recording layer (the part that changes form) Lower dielectric layer Polycarbonate substrate (the clear plastic part) See the net references section for pointers to more data (especially http://www.cd-info.com/). You can find some nice drawings at http://www.nswc.navy.mil/cosip/nov97/cots1197-2.shtml and http://www.pctechguide.com/09cdr-rw.htm. CD-ROM copy protection work? A simple and commonly seen technique is to increase length of files on CD so appear to be hundreds of megabytes long.by setting file length in disc image to be much larger than it really is. One possible implementation, given sufficient control over reader and mastering software, is to write faulty data into ECC portion of a data sector. Standard CD-ROM hardware will automatically correct "errors", writing different set of data onto target disc. reader then loads the entire sector as raw data, without doing error correction. If it can't find the original uncorrected data, it knows that it's reading a "corrected" duplicate. This is really only viable on systems like game consoles, where the drive mechanism and firmware are well defined. A less sophisticated but nonetheless effective method is to press a silver CD with data out beyond where a 74-minute CD can write. Copying the disc would then require special CD-R blanks, moving data and hacking the disc to compensate, or pressing silver discs with the pirated data. If taken too far, though, the disc can become unreadable on some drives. An overburned 80-minute blank (sections (3-8-1) and (3-8-3)) can hold about as much as you can reliably fit on a disc anyway. The approach PC software houses have taken lately is to use nonstandard gaps between audio tracks and leave index marks in unexpected places. discs are uncopyable by most software, and it may be impossible to duplicate them on drives that don't support disc-at-once recording Another method gaining popularity is non-standard discs with a track shorter than 4 seconds. Most recording software, and in fact some recorders, will either refuse to copy a disc with such a track, or will attempt to do so and fail. A protected application would check for the presence and size of the track in question. Some recorders may succeed, however, so this isn't foolproof. (In one case, a recorder could write tracks that were slightly over three seconds, but refused to write tracks that were only one second. There may be a limit below which no recorder will write. When you put a data CD into your CD-ROM drive, the OS finds the last closed session on the disc and reads the directory from it. (Well, that's how it's supposed to work. Depending on your operating system and CD-ROM drive, you may get different results.) If CD is ISO-9660 format - which it almost certainly is unless it's a Macintosh CD written in HFS - the directory entries can point at any file on the CD, no matter which session it was written in. Most of the popular CD creation programs allow you to "link" one or more earlier sessions to the session currently being burned. This allows the files from the previous sessions to appear in the last session without taking up any additional space on the CD (except for the directory entry). You can also "remove" or "replace" files, by putting a newer version into the last session, and not including a link to the older version. In contrast, when you put an audio CD into a typical CD player, it only looks at the first session. For this reason, multisession writes don't work for audio CDs, but as it happens this limitation can be turned into an advantage. See section (3-14) for details. This limitation does *not* mean you have to write an entire audio CD all at once; see section (2-9) for an overview of track-at-once writing. Disc-at-once (DAO) writes the entire CD in one pass, possibly writing multiple tracks. The entire burn must complete without interruption, no further information may be added. Track-at-once (TAO) allows the writes to be done in multiple passes. There is a minimum track length of 300 blocks (600K for typical data CDs), and a maximum of 99 tracks per disc, as well as a slight additional overhead associated with stopping and restarting the laser. Because the laser is turned off and on for every track, recorder leaves a couple of blocks between tracks, called run-out and run-in blocks. done correctly, blocks will be unnoticeable. CDs with tracks that run together will have a barely noticeable "hiccup". leaving you 2-second gaps even if original didn't have them. A few recorders, such as the Philips CDD2000, allow "session-at-once" (SAO) recording. This gives you disc-at-once control over the gaps between tracks, and allows you to write in more than one session. This can be handy when writing CD Extra discs (see section CDserror correction? CDs use all 2352 bytes per block for sound samples, while CD-ROMs use only 2048 bytes per block, with most of the rest going to ECC (Error Correcting Code) data. CD uses CIRC (Cross-Interleaved Reed-Solomon Code) encoding. Every CD has two layers of error correction, C1 corrects bit errors at the lowest level, C2 applies to bytes in a frame (24 bytes per frame, 98 frames per block). In addition, data is interleaved and spread over large arc. (This is why you should always clean CDs from center out, not in a circular motion.) If too many errors, CD player will interpolate samples to get a reasonable value. This way you don't get nasty clicks and pops in your music, even if the CD is dirty and the errors are uncorrectable. Interpolating adjacent data bytes on CD-ROM wouldn't work very well, hence need for additional ECC and EDC (Error Detection Codes). disc that you can add data to "open". changing from "open" to "closed" called "finalizing", "fixating", or just plain "closing" the session. When you close last session, you have finalized, fixated, or closed the disc. single-session disc has lead-in, which has Table of Contents (or TOC); program area, with the data and/or audio tracks; lead-out,which doesn't have anything meaningful in it. "open"single-session doesn't lead-in or lead-out written. you write data to a disc and leave session open, TOC --is written into a separate area PMA called the Program Memory Area, or PMA. CD recorders are only devices know to look at PMA, which is why you can't see data in an open session on a standard playback device. CD players won't find any audio tracks, and CD-ROM drives won't see a data track. When the session is finalized, the TOC is written in the lead-in area, enabling other devices to recognize the disc. (Something to try: write an audio track to a blank CDand leave the session open. Put disc in a CD player. Some players will deny the existence of disc, some will spin disc up to an incredible speed and won't even brake spindle when you eject disc, others will perform equally random acts. TOC is important!) If you close the current session and open a new one, the lead-in and lead-out of the current session will be written. A TOC will be written in the current lead-in that points to the eventual TOC of the next session. This process is repeated for every closed session, resulting in a chain of links from one lead-in area to the next. The CD player in your car or stereo system doesn't know about chasing TOC links, so it can only see tracks in the first session. Your CD-ROM drive, unless it's broken or fairly prehistoric, will know about multisession discs and will happily return the first session, last session, or one somewhere in between, depending on what the OS tells it and what it is capable of. DAO If you use disc-at-once (DAO) recording, lead-in is written at very start of process, contents of the TOC are known ahead of time. Drives that allow you to leave the disc open are said to do "session-at-once" recording, or SAO. If Win95 or WinNT, Auto Insert Notification feature will "discover" CD-R as soon as TOC is written. can cause write process to fail. Many of current CD recording software packages will automatically disable AIN for this reason. In track-at-once mode, it will fail during finalization; in disc-at-once mode, it will fail near the beginning of the write process. In both cases, test writes will succeed, because the TOC doesn't get written during a test pass. Packet-written discs follow same rules with regard to open and closed sessions, which is why they have to be finalized before they can be read on a CD-ROM drive. "Packet Writing - Intermediate" document the primer at http://www.mrichter.com/cdr/primer/primer.htm goes into a little more detail on this subject. (Some people like to refer to packet writing as "PAO", for packet-at-once.) SCMS is Serial Copy Management System. goal is to allow consumers to make copy of an original, but not a copy of a copy. SCMS will affect you if you use consumer-grade audio equipment.Professional-grade equipment and recorders that connect to your computer aren't restricted. system works by encoding whether or not material is protected, and whether or not disc is an original. encoding is done with a single bit either on, off, or alternating on/off every five frames. value is handled as follows: Unprotected material: copy allowed.data written is also marked unprotected. Protected material, original disc: copy allowed. data written will be identified as a duplicate. Protected material, duplicate: copy not allowed. There are hardware "SCMS strippers", primarily used in conjunction with a DAT deck, that strip SCMS bits out of an S/PDIF connection. Some of these reportedly introduce unacceptable artifacts into audio. It's possible to "wash" audio by converting it to and from analog format, but again the quality will suffer. TOC (Table Of Contents) identifies start position and length of tracks on a disc. ISO" is a file that contains the complete image of a disc. Such files often used transferring CD-ROM images over Internet. "ISO" is created by copying an entire disc, f rom sector 0 to the end, into a file. Because the image file contains "cooked" 2048-byte sectors and nothing else, it isn't possible to store anything but a single data track in this fashion. .DAT" file could be most anything, usually it's a video file pulled off of a VideoCD. program at http://www.vcdgear.com/ can convert .DAT to .MPG, and recording programs like Nero can record them directly. A ".ISO" file that contains an image of an ISO-9660 filesystem can be manipulated in a number of ways: it can be written to a CD-ROM; mounted as a device with the Linux "loopback" filesystem (e.g. "mount ./cdimg.iso /mnt/test -t iso9660 -o loop"); copied to a hard drive partition and mounted under UNIX; or viewed with WinImage (section (6-2-2)). There is no guarantee, however, that a ".ISO" file contains ISO-9660 filesystem data. And it is quite common to hear people refer to things as "ISO" which aren't. "ISOBuster", from http://www.ping.be/vcd/isobuster.html, can work with some non-ISO-9660 formats, including .BIN. CD-RW CD-Rewritable. CD-R discs are write-once. used just like CD-R discs. CD-RW drives use phase-change technology. Instead of creating "bubbles" and deformations in recording dye layer, state of material in the recording layer changes from crystalline to amorphous form. different refractive indicies, and so can be optically distinguished. These discs are not writable by standard CD-R drives, nor readable by most older CD readers (the reflectivity of CD-RW is far below CD and CD-R, so an Automatic Gain Control circuit is needed to Most new CD-ROM drives do support CD-RW media, but not all them will read CD-RW discs at full speed. CD-R was designed to be read by an infrared 780nm laser. DVD uses a visible red 635nm or 650nm laser, which aren't reflected sufficiently by the organic dye polymers used in CD-R media. Some DVD players come with two lasers so that they can read CD-R. Data Storage: DVD vs. CD DVDs can store more data than CDs for a few reasons: Higher density data storage Less overhead, more area Multi-layer storage Higher Density Data Storage Single-sided, single-layer DVDs can store about seven times more data than CDs. A large part of this increase comes from the pits and tracks being smalleron DVDs. Specification CD DVD Track Pitch 1600nm 740nm Minimum Pit Length (single-layer DVD) 830nm 400nm Minimum Pit Length (double-layer DVD) 830nm 440nm On a CD, a lot of extra information encoded on disc to allow for error correction -- this information is really just a repetition of information that is already on the disc. error correction scheme that a CD uses is quite old and inefficient compared to method used on DVDs. DVD format doesn't waste as much space on error correction, enabling it to store much more real information. Another way that DVDs achieve higher capacity is by encoding data onto a slightly larger area of disc than is done on a CD. Multi-Layer Storage To increase storage capacity even more, DVD can have up to four layers, two on each side.laser that reads the disc can actually focus on second layer through first layer. Here is a list of the capacities of different forms of DVDs: Format Capacity Approximate. Movie Length Single Sided/Single Layer 4.38 GB 2 hours Single Sided/Double Layer 7.95 GB 4 hours Double Sided/Single Layer 8.75 GB 4.5 hours Double Sided/Double Layer 15.9 GB Over 8 hours You may be wondering why the capacity of a DVD doesn't double when you add a whole second layer to the disc. is because when a disc is made with two layers, pits have to be a little longer, on both layers, than when a single layer is used. This helps to avoid interference between the layers, which would cause errors when the disc is played. movies put onto DVDs, encoded in MPEG-2 format The MPEG-2 Format and Data Size Reduction movie is filmed at a rate o 24 frames per second. NTSC,displays 30 frames per second; in a sequence of 60 fields, PAL format, displays at 50 fields per second, but at a higher resolution MPEG encoder that creates the compressed movie file analyzes each frame and decides how to encode it. eliminate redundant or irrelevant data. also uses information from other frames Each frame can be encoded in one of three ways: intraframe, contains complete image data for frame. predicted frame contains just enough information to tell DVD player how to display frame based on most recently displayed intraframe or predicted frame. data of how picture has changed from previous frame. bidirectional frame. uses interpolation, to calculate the position and color of each pixel. newscast lot more predicted frames scene is unaltered from one frame to the next. fast action scene more intraframes would have to be encoded. MPEG Moving Picture Experts Group (MPEG) a working group of ISO/IEC in charge of the development of standards for coded representation of digital audio and video. Established in 1988, the group has produced MPEG-1, standard on which such products as Video CD and MP3 are based, MPEG-2 the standard on which such products as Digital Television set top boxes and DVD are based and MPEG-4, the standard for multimedia for the web and mobility. current thrust is MPEG-7 "Multimedia Content Description Interface whose completion is scheduled for July 2001. Work on the new standard MPEG-21 "Multimedia Framework" has started in June 2000 and has already produced a Draft Technical Report. S DVD Audio difference in sound quality should be noticeable. will need a DVD player with a 192kHz/24-bit digital to analog converter. Most DVD players have only a 96kHz/24-bit digital to analog converter. CDs can hold 74 minutes of music. DVD audio discs can hold 74 minutes of music at 192kHz/24-bit audio. DVD audio disc can hold almost 7 hours of CD quality audio. CD Audio DVD Audio Sampling Rate 44.1 kHz 192 kHzSamples Per Second 44,100 192,000 Sampling Accuracy 16-bit 24-bit of Possible Output Levels 65,536 16,777,216 CD Reading pits polycarbonate itself is part of optical system for reading pits. index of refraction is 1.55. Laser light incident on polycarbonate surface will be refracted at a greater angle into surface. Thus, original incident spot of around 800 microns (entering polycarbonate) will be focused down to about 1.7 microns (at metal surface). This is a major win, as it minimizes effects of dust and scratches on surface. The laser used for CD player is typically an AlGaAs laser diode with a wavelength in air of 780 nm. (Near infrared -- your vision cuts out at about 720 nm). The wavelength inside polycarbonate is a factor of n=1.55 smaller -- or about 500 nm. [Lost in maze of pages-Reload Imagemap] Laser Pickup System The digital data on a CD is represented by bumps, where edge of each bump represents a one. The bumps are read by a laser that is part of laser pickup system. (See section on Optical Train) The laser pickup system includes thelaser diode, mirrors and lenses, and photodetectors. The laser beam (which is produced by laser diode) is directed on to CD via mirrors and lenses. When beam strikes CD, beam is reflected and directed to photodetectors. Photodetectors are transducers that convert light into an electric signal. So information reflected off of CD is converted to an electrical signal and sent to servo and data decoding systems via photodetectors. [Lost in maze of pages-Reload Imagemap] History In 1983 compact disc (CD) players entered consumer market. By 1986, CD players were selling at rate of over one million per year, making CD player fastest growing consumer electronic product ever introduced. So whose idea was it to reproduce music digitally on a CD? The design and development of CD player was a collaboration of two companies: Philips and Sony. Philips was first to come up with idea of optical-disc audio reproduction. They had developed a laser-scanned videodisk player called LaserVision -- which lead them to idea of developing a similar kind of system to reproduce sound. Philips decided to produce a prototype and present it to manufacturers. In process of building their prototype, they found that error detection and correction was imperative but they did not know an efficient way of implementing it. They decided to present their prototype, anyway, to several manufactures in Japan. Of five manufacturers present at demonstration, Sony was only manufacturer who decided to work with Philips on compact disc player. Sony was leader in magnetic-tape recording and digital conversion techniques. Because of complimentary knowledge between two companies, they where able to solve error correction and detection problem along with developing an industry standard for format of compact discs. In 1981, thirty-five electronics manufacturers agreed on Philips/Sony standard, and race was on to produce first compact disc player. Do you know who won? With Philips struggling on implementation of digital electronics, Sony's expertise in that area allowed them to produce first CD player one month earlier than Philips. fundamental ideas underlying compact disk player The basic ideas behind a compact disc player are quite fundamental, but true marvel is in engineering and manufacturing of this consumer electronic product. Music stored on a CD is in digital form. When music is stored digitally, it requires a tremendous amount of storage space. For example, one second of sound takes up over a million bits of digital information. If you were to try and store this information on a floppy disk it would hold less than three seconds of music! A very dense digital storage medium is needed to store digital music. The problem of dense storage media was solved by using a laser to read off data bits on an optical disc. Data can be crammed much tighter on a CD than on a magnetic floppy or hard drive because a laser beam can be focused to a much smaller point than magnetic heads. One second of music can now be stored on a CD in an area size of a pin head! Actually, a total of 15 billion bits of information can be stored on a music CD which equates to about 74 minutes of continuous stereo music. It would take over 1,480 floppy disks to store that much information and you certainly wouldn't get continuous stereo music! [Lost in maze of pages-Reload Imagemap] 3-beam auto focusing If objective lens is closer to compact disk than focal length of object lens, then cylindrical lens creates an elliptical image on photodetector array. If objective lens is further away from compact disk than focal length of object lens, then cylindrical lens again creates an elliptical image on photodetector array. However, this elliptical image is perpendicular to first image. Of course, if disk is right at focal length of objective lens, then cylindrical lens does not affect image and it is perfectly circular. So, if disk is too far away -- then quadrants D and B will get more light than quadrants A and C. Similarly, if disk is too close -- then quadrants A and C will get more light than D and B. A simple circuit generates an autofocus signal based upon output of photodetector. The output of this correction signal can be used to drive a simple auto-focus servo. A typical example of such a servo is illustrated below. [Lost in maze of pages-Reload Imagemap] Data Decoding System When photodetectors translate reflected light to an electrical signal, signal represents a string of ones and zeros that is encoded and modulated. The job of decoding system is to demodulate and decode data string and convert it to music. The data decoding system entails several subsystems: demodulator, error detection and correction (EDC), demultiplexor, and digital-to-analog converters. The demodulator circuit performs opposite function as EFM circuit. It demodulates data string before EDC circuitry begins decoding. After data is demodulated, subcode is available to control system. Subcode contains information such as track number, time left on track, and time left on CD. The EDC circuits decode CIRC code that is embedded in digital music. The decoding process detects and corrects errors that are found on CD. Types of errors found on CD's are random types and burst types. Random errors entail a couple of damaged bumps at a time and usually occur during manufacturing process of CD. Burst errors are many consecutive damaged bumps that can span up to a couple thousand bumps. An example of these are scratches, animal hair, or finger prints. The error detection and correction circuits can correct, conceal , or in extreme circumstances mute errors on CD. After EDC circuits, data is almost in its original music form. At this point, both right and left channels are in same continuous stream of data. This stream is sent to a demultiplexor where two channels are separated and each one is sent to a digital-to-analog converter (DAC). Some system have only one DAC so demultiplexor is after DAC. The DAC is a circuit that converts a digital signal to an analog signal. This is final circuit in CD player, and it outputs electrical signal to your stereo, headphone, or speakers. [Lost in maze of pages-Reload Imagemap] Simple Error Detection and Correction Codes Error detection and correction codes are fundamental to operation of any digital storage system. There are literally thousands of such codes. These codes typically rely on using additional bits (usually called parity bits) to carry error detection and correction information. In a simple binary parity check, a parity bit is a single bit that represents whether total number of "1s" in a particular data stream is even (1) or odd (0). (Modulo two addition). For example, assume that you are setting a parity bit over all digits of following word. 1101 0000 The total number of "1s" is odd, so parity bit would be 1. The word might then be written as 1101 0000 1 where last digit is parity bit. Even simple binary parity checks can become quite complex if more than one parity bit is used. For example, you may elect to have two parity bits -- one on first four bits of word and one on last four. 1 1 0 1 0 0 0 0 P1 P2 x x x x 1 x x x x 0 If enough parity bits are used, then error can not only be detected -- they can also be corrected. For example, consider what happens if you use four parity bits. The first one is on first four bits, second one is on second four bits, third one is on 1,2,5,6 bits and fourth one is on 2,3,6,7 bits. 1 1 0 1 0 0 0 0 P1 P2 P3 P4 x x x x 1 x x x x 0 x x x x 0 x x x x 1 Now, assume that there was an error in final bit. 1 2 3 4 5 6 7 8 P1 P2 P3 P4 1 1 0 1 0 0 0 1 1 0 0 1 x x x x 1 x x x x 1 x x x x 0 x x x x 1 Parity bit P1 would agree with parity bit in transmitted word, P2 would NOT agree, P3 and P4 would agree. Since P2 is only parity bit not agreeing with transmitted word -- then error must be in 8th bit. Unfortunately, majority of error-detection and correction algorithms used in CD players are not as simple as binary check codes discussed above. Although an overview of these codes will be presented, in-depth analysis of codes is beyond scope of this course. (Interested students should consult more advanced references, such a W. Peterson, Error-Correcting Codes, MIT Press) Interpolation: In this technique, some average is constructed using valid data around an error. This average is then substituted in for erroneous data. Since most music (with possible exception of heavy metal!) is continuous -- this method works well for concealing relatively short errors. Muting: Muting is a last ditch technique -- as it effectively creates a brief period of silence in audio train. However, it is not effective to simply set all binary digits to zero --as this produces exactly click that we are trying to avoid! Instead, volume is faded out and then back in again to conceal error. [Lost in maze of pages-Reload Imagemap] EFM modulation EFM means Eight to Fourteen Modulation and is an incredibly clever way of reducing errors. The idea is to minimize number of 0 to 1 and 1-0 transitions -- thus avoiding small pits. In EFM only those combinations of bits are used in which more than two but less than 10 zeros appear continuously. For example, a digital 10 given as a binary 0000 1010 is an EFM 1001 0001 0000 00 (See attached table for complete list of EFM codes[1].) Click here for Table 1 Click here for Table 2 The use of EFM coding means that pits come in discrete lengths ranging from 3 bits long (often written 3T) to 11 bits long (11T). As laser beam scans across these pits, a very distinct RF signal is formed. The shortest wavelength in this signal (highest frequency) is produced by 3T pits. The longest wavelength in signal (lowest frequency) is produced by 11T pits. The zero crossings of RF signal represent edges of pits -- and thus binary "1s" in data stream[2]. (Notice that longer wavelength, larger amplitude of signal.) It is common to display photodetector output on a scope with a conventional trigger. This results in a display where nine possible frequencies (3T to 11T) all add up on top of each other. This type of display is termed an "eye" pattern and provides valuable information about various alignment parameters of CD player. Notice that relationship between size and wavelength is very distinct in eye pattern[3]. The RF output is converted to a square wave, and then phase locks a clock with period T. The CD player then begins to hunt for characteristic start of frame symbol, which is three transitions separated by 11T. (100000000001000000000010 + 3 merge bits) Then, player isolates 33 17T symbols, and then kicks off 3T merge bits -- leaving 33 14T active symbols. [Lost in maze of pages-Reload Imagemap] Subcodes The 8-bit subcode is a very peculiar creature. Each 588 bit frame has an eight bit subcode. These bits are named P-Q-R-S-T-U-V-W. So, for each 588 bit frame, there is one P bit (not same as P parity), one Q bit (not same as Q parity), one R bit, one S bit and so on[5]. Now, P-Q-R-S-T-U-V-W bits from 98 consecutive frames are collected together. These 98 bits are called a subcoding channel or just channel. Thus, there is a P-channel of 98 bits (no relation to P parity), a Q-channel of 98 bits (no relation to Q parity), an R-channel of 98 bits and so on. Unfortunately (just to maximize confusion with P and Q parity bits) only P and Q subcode channels are used. The R-W subcode channels are not yet assigned -- being held for later expansion of standard. [Lost in maze of pages-Reload Imagemap] P Channel The P channel simply designates starting and stopping of tracks. Music data is denoted by all zeros, start flag before musical selection by 2-3 seconds of "1's". The lead out at end of disk is a 2 Hz alternating 1 and 0[6]. [Lost in maze of pages-Reload Imagemap] Q channel The Q channel contains majority of program and timing information. The first two bits (S0 and S1) are synchronization bits. The next four (bits 3-6) are control bits. Bit 3 controls number of channels (2 or 4), bit 4 is unassigned, bit 5 is copy protect and bit 6 is pre-emphasis bit. The next four bits control mode (three defined modes). The next 72 bits are data -- and last 16 are a cyclic redundancy check on channel data. Mode 1 contains primary selection timing information. In lead-in area, this information consists of number of tracks and absolute starting time of each track. This information is continually repeated in lead-in area, and allows CD player to build table of contents[7]. In program and lead-out areas, Mode 1 information is track number, index numbers within a track, time within a track, and absolute time[8]. Mode 2 contains a catalog number of disk -- plus a continuation of absolute time count[9]. Mode 3 contains IRSC codes for identifying each track -- allowing for such things as automatic copyright logging. Mode 3 also contains a continuation o f absolute time count. Mode 3 is irregularly used at this time[10]. [Lost in maze of pages-Reload Imagemap] Q channel The Q channel contains majority of program and timing information. The first two bits (S0 and S1) are synchronization bits. The next four (bits 3-6) are control bits. Bit 3 controls number of channels (2 or 4), bit 4 is unassigned, bit 5 is copy protect and bit 6 is pre-emphasis bit. The next four bits control mode (three defined modes). The next 72 bits are data -- and last 16 are a cyclic redundancy check on channel data. Mode 1 -- contains primary selection timing information. In lead-in area, this information consists of number of tracks and absolute starting time of each track. This information is continually repeated in lead-in area, and allows CD player to build table of contents[7]. In program and lead-out areas, Mode 1 information is track number, index numbers within a track, time within a track, and absolute time[8]. Mode 2 contains a catalog number of disk -- plus a continuation of absolute time count[9]. Mode 3 contains IRSC codes for identifying each track -- allowing for such things as automatic copyright logging. Mode 3 also contains a continuation o f absolute time count. Mode 3 is irregularly used at this time[10]. [Lost in maze of pages-Reload Imagemap] IEC-908 The BIG picture The encoding of digital audio on CD player is governed by IEC 908. This standard is available in library for your perusal. (Notice that every other page is missing -- this is because standard is written in both French and English and I took out French pages!) This information is also covered more generally in Chapter 3 of Ken Pohlman's book The Compact Disk Handbook, (A-R Editions, 1992). CD players use parity and interleaving techniques to minimize effects of an error on disk. In theory, combination of parity and interleaving in a CD player can detect and correct a burst error of up to 4000 bad bits -- or a physical defect 2.47 mm long. Interpolation can conceal errors up to 13,700 or physical defects up to 8.5 mm long. The entire error detection and correction algorithm is summarized on following table. This is Figure 12 from IEC 908 standard. This table will be described in more detail below. The original musical signal is a waveform in time. A sample of this waveform in time is taken and "digitized" into two 16-bit words, one for left channel and one for right channel. For example, a single sample of musical signal might look like: L1 = 0111 0000 1010 1000 R1 = 1100 0111 1010 1000 Six samples (six of left and six of right for a total of twelve) are taken to form a frame. L1 R1 L2 R2 L3 R3 L4 R4 L5 R5 L6 R6 The frame is then encoded in form of 8-bit words. Each 16-bit audio signal turns into two 8-bit words. L1 LI R1 R1 L2 L2 R2 R2 L3 L3 R3 R3 L4 L4 R4 R4 L5 L5 R5 R5 L6 L6 R6 R6 This gives a grand total of 24 8-bit words. This is column two on IEC 908 table. The even words are then delayed by two blocks and resulting "word" scrambled. This delay and scramble is first part of interleaving process. The resulting 24 byte word (remember, it has an included two block delay -- so some symbols in this word are from blocks two blocks behind) has 4 bytes of parity added. This particular parity is called "Q" parity. Parity errors found in this part of algorithm are called C1 errors. More on Q parity later. Now, resulting 24 + 4Q = 28 bytes word is interleaved. Each of 28 bytes is delayed by a different period. Each period is an integral multiple of 4 blocks. So first byte might be delayed by 4 blocks, second by 8 blocks, third by 12 blocks and so on. The interleaving spreads word over a total of 28 x 4 = 112 blocks. The resulting 28 byte words are again subjected to a parity operation. This generates four more parity bytes called P bytes which are placed at end of 28 bit data word. The word is now a total of 28 + 4 = 32 bytes long. Parity errors found in this part of algorithm are called C2 errors. More on P parity later too. Finally, another odd-even delay is performed -- but this time by just a single block. Both P and Q parity bits are inverted (turning "1s" into "0s") to assist data readout during muting. An 8-bit subcode is then added to front end of word. The subcode specifies such things as total number of selections on disk, their length, and so on. More on this later. Next data words are converted to EFM format. EFM means Eight to Fourteen Modulation and is an incredibly clever way of reducing errors. The idea is to minimize number of 0 to 1 and 1-0 transitions -- thus avoiding small pits. In EFM only those combinations of bits are used in which more than two but less than 10 zeros appear continuously. For example, a digital 10 given as a binary 0000 1010 is an EFM 1001 0001 0000 00 Each frame finally has a 24-bit synchronization word attached to very front end -- (just for completeness word is (100000000001000000000010) and each group of 14 symbols is then coupled by three merge bits. These merge bits are chosen to meet two goals: 1. No adjacent 1's from neighboring EFM encoded words Remember that there are lots of EFM words which end in "1" -- as one example, all eight-bit binary words from 128 to 152 end in "1". Similarly, there are EFM words that start in "1". Thus, it is relatively straightforward to have to have adjacent EFM words that create adjacent "1s". For example -- binary 128 and binary 57 10000000 in EFM is 00111001 in EFM is 01001000100001 10000000001000 2. The digital sum value is kept near zero Minimizing digital sum value is just an attempt to keep average number of "0's" and "1's" about same. The value of +1 is assigned to "1" states and value of -1 is assigned to "0" states. Then, value of merge bit is chosen to maintain average near zero. SO! The final frame (which started at 6*16*2 = 192 data bits) now contains: 1 sync word 24 bits 1 subcode signal 14 bits 6*2*2*14 data bits 336 bits 8*14 parity bits 112 bits 34*3 merge bits 102 bits GRAND TOTAL 588 bits [Lost in maze of pages-Reload Imagemap] Simple interleaving Interleaving is a very simple and powerful idea. To illustrate interleaving, assume that you have a frame consisting of several characters of information, U N I V E R S I T Y O F W A S H I N G T O N Assume that you spit on disk and destroy several of characters. R S I T Y O F W A S H I N G T O N The first word is then very hard to reconstruct! However, you can take original frame and scramble it as, U N I V E R S I T Y O F W A S H I N G T O N O N S T H U G R F S I I O T W N N V E I Y A Then you can damage it, U G R F S I I O T W N N V E I Y A Then you can unscramble it, U N I V E R I Y O F W A S I G T N It is much easier to "interpolate" or "guess" missing letters. (A bit like later stages of "hangman"!) [Lost in maze of pages-Reload Imagemap] P and Q parity The eight parity symbols are calculated from following equations: Hp . Vp = 0 Hq . Vq = 0 Definitions for H and V are as follows. V is pretty straightforward, just being shifted and interleaved data bits in data word (including parity bits). However, H is more complex. H is defined on Galois field GF (28) by polynomial: (The 's in definitions for H vector come from field elements of Galois field.) Unfortunately, Galois field of 28 elements of GF (28) defined by is a set of 255 's. However, to illustrate principle, Galois field of 24 elements of GF (24) formed as field of polynomials over GF(2) modulo is given on next page[4]. 0 = 1 = 0001 1 = 1 = 0010 2 = 2 = 0100 3 = 3 = 1000 4 = 1 + 1 = 0011 5 = 2 + 1 = 0110 6 = 3 + 2 = 1100 7 = 3 + 1 + 1 = 1011 8 = 2 + 1 = 0101 9 = 3 + 1 = 1010 10 = 2 + 1 + 1 = 0111 11 = 3 + 2 + 1 = 1110 12 = 3 + 2 + 1 + 1 = 1111 13 = 3 + 2 + 1 = 1101 14 = 3 + 1 = 1001 15 = 1 = 0 [Lost in maze of pages-Reload Imagemap] Pit Edges A CD disk contains a long string of pits written helically on disk. The edges of pits correspond to binary "1"s. [Lost in maze of pages-Reload Imagemap] The CD disk The CD disk is a 120 mm diameter disk of polycarbonate. The center contains a hole 15 mm in diameter. The innermost part of disk does not hold data. The active data area starts at 46 mm diameter location and ends at 117 mm diameter location. The 46-50 mm range is lead in area and 116-117 range is lead out area. Disks are written from center to outside (this increases manufacturing yield, and also allows for changes in disk size). [Lost in maze of pages-Reload Imagemap] Fabrication The fabrication of a CD disk is a fascinating process. This process is discussed in some detail in The Compact Disk Handbook, Chapter 7 and only high points are summarized here. The process begins by making "glass master". To do this, a glass plate about 300 mm in diameter is lapped flat and polished. The plate is coated with photoresist. A mastering tape is made containing information to be written on disk. A laser then writes pattern from master tape into photoresist. The photoresist is developed. A layer of metal (typically silver over a nickel flash) is evaporated over photoresist. The master is then checked for accuracy by playing disk. The master is then subject to an electroforming process. In this electrochemical process, additional metal is deposited on silver layer. When metal is thick enough (typically a few mm's) metal layer is separated from glass master. This results in a metal negative impression of disk -- called a father. The electroplating process is then repeated on father. This typically generates 3-6 positive metal impressions from father before quality of father degrades unacceptably. These impressions are called "mothers". The electroplating process is repeated again on mothers. Each mother typically makes 3-6 negative metal impressions called sons or stampers. The sons are suitable as molds for injection molding. Polycarbonate is used to injection mold CD disks. Once disks are molded, a metal layer is used to coat disks. Aluminum, gold, copper and silver are all reflective enough to be optically acceptable. Gold is typically too expensive and copper has a peculiar appearance. Thus, aluminum and silver are most commonly used metals. Following metal deposition, a thin plastic layer (1-30 microns) is spin-coated on over metal. This can be a nitrocellulose layer suitable for air drying, or an acrylic plastic that is cured in UV. Finally, logo and other information is silk screened on top. [Lost in maze of pages-Reload Imagemap] Servo System The servo system is responsible for thefocusing and tracking of laser beam on CD. This is not an easy task since distance between pits is extremely small (1.6 micrometers) and beam must be focused to a tiny point of 0.7 millimeters. Also, CD is not completely flat -- so when it is spinning CD wobbles. So how does laser pickup system stay on track and in focus? As mentioned before, signal from photodetectors goes to both data decoder system and servo system. The photodetectors provide feedback to laser pickup system via servo system. The servo system uses servomechanisms (servos) to make minute changes in tracking or focusing. The servos are typically moving-coil actuators. These actuators can be found in laser pickup system. The actuators move objective lens either toward or away from CD for focusing, and sideways for tracking. As you listen to music from CD player, servo system is continuously making minute adjustments to tracking and focusing so that you can hear error free music. [Lost in maze of pages-Reload Imagemap] 3-beam tracking When laser beam goes through diffraction grating, it is split up into a central bright beam plus a number of side beams. The central beam and one beam on each side are used by CD for tracking system. Consider a segment of CD player containing several tracks. If optical head is on track, then primary beam will be centered on a track (with pits and bumps) and two secondary beams will be centered on land. The three spots are deliberately offset approximately 20 microns with respect to each other. Two additional detectors are placed alongside main quadrant detector in order to pick up these subsidiary beams. If three beams are on track, then two subsidiary photodetectors have equal amounts of light and will be quite bright because they are only tracking on land. The central beam will be reduced in brightness because it is tracking on both land and pits. However, if optical head is off track, then center spot gets more light (because there are fewer pits off track) and side detectors will be misbalanced. [Lost in maze of pages-Reload Imagemap] Pits and land Each pit is approximately 0.5 microns wide and 0.83 microns to 3.56 microns long. (Remember that wavelength of green light is approximately 0.5 micron) Each track is separated from next track by 1.6 microns. The area between pits is termed "land". So, a highly magnified section of track might look something like: [Lost in maze of pages-Reload Imagemap] Pits and common object sizes Pits are formed in polycarbonate disk by an injection molding process. As such, they represent some of smallest mechanically fabricated objects made by humans. The width of a CD pit is approximately wavelength of green light. The tracks are separated by approximately three times wavelength of green light. Diffraction from these features (so very close to wavelength of light) is what gives CD disks their beautiful colors. A thin layer (50-100 nm) of metal (aluminum, gold or silver) covers pits. An additional thin layer (10-30 microns) of polymer covers metal. Finally, a label is silk-screened on top. Notice that pits are far closer to silk screened side of disk (20 microns) than they are to read-side of disk (1.55 mm). Thus, it is easier to permanently damage a disk by scratching top -- than bottom! For more on fabrication, click here [Lost in maze of pages-Reload Imagemap] 3-beam pickup The most common optical train in modern CD players is three beam pick-up, depicted below. The light is emitted by laser diode and enters a diffraction grating. The grating converts light into a central peak plus side peaks. The main central peak and two side peaks are important in tracking mechanism. The three beams go through a polarizing beam splitter. This only transmits polarizations parallel to page. The emerging light (now polarized parallel to page) is then collimated. The collimated light goes through a 1/4 wave plate. This converts it into circularly polarized light. The circularly polarized light is then focused down onto disk. If light strikes "land" it is reflected back into objective lens. (If light strikes pit, now a bump, it is not reflected.) The light then passes through 1/4 wave plate again. Since it is going reverse direction, it will be polarized perpendicular to original beam (in other words, light polarization is now vertical with respect to paper). When vertically polarized light hits polarizing beam splitter this time, it will be reflected (not transmitted as before). Thus, it will reflect though focusing lens and then cylindrical lens and be imaged on photodetector array. The cylindrical lens is important in auto-focusing mechanism. [Lost in maze of pages-Reload Imagemap] Control and Display System The control system processes subcode that is encoded on CD. The subcode tells information like: how many tracks are on CD, what track it is presently on, time left on song, or time left on CD. With this information, control can send speed up or slow down commands to disc drive motor. Because of subcode information, CD player has many features that simply cannot be accomplished on record players or tape decks. Some examples of various features are following: random memory programming, manual searches (skipping forward or backward with touch of a button), random playback, and pausing. The control system can display quite a bit of information also: what present track is, time left on track, time left on CD, and time left in memory program (if you did memory programming). Finally, control system provides an interface with control buttons and knobs on CD player. When a user presses 'skip' button, control system senses command and sends control signals to various subsystems to perform 'skip' command. It also displays requested task at hand. If you want to learn more about CD player look in Further Reading section. All of these books can be found at public libraries. You can also call publisher to purchase your own book. You might call University of Washington bookstore first. Chances are they may have it, or be able to order it for you. [Lost in maze of pages-Reload Imagemap] Quarter-wavelength Pits The CD disk is actually read from bottom. Thus, from viewpoint of laser beam reading disk, "pit" in CD is actually a "bump". The pit/bump is carefully fabricated so that it is a quarter of a wavelength (notice a wavelength INSIDE polycarbonate) high. The idea here is that light striking land travels 1/4 + 1/4 = 1/2 of a wavelength further than light striking top of pit. The light reflected from land is then delayed by 1/2 a wavelength -- and so is exactly out of phase with light reflected from pit. These two waves will interfere destructively -- so effectively no light has been reflected. [Lost in maze of pages-Reload Imagemap]