SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Computer Interfaces
Serial, Parallel, GPIB, CAMAC, Oh My!
Winter 2012
UCSD: Physics 121; 2012
2
Common Implementations of Interfaces
• Parallel port (8 bits per shot)
• Serial (RS-232, RS-485)
– usually asynchronous
• GPIB (IEEE-488) parallel
– General Purpose Interface (or Instrument) Bus
– originally HPIB; Hewlett Packard
• DAQ card (data acquisition)
– like national instruments A/D, D/A, digital I/O
• CAMAC
– Computer Automated Measurement And Control
• VME bus / VXI bus
– modern CAMAC-like bus
Winter 2012
UCSD: Physics 121; 2012
3
A quick note on hexadecimal
decimal value binary value hex value
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 a
11 1011 b
12 1100 c
13 1101 d
14 1110 e
15 1111 f
Winter 2012
UCSD: Physics 121; 2012
4
Hexadecimal, continued
• Once it is easy for you to recognize four bits at a
time, 8 bits is trivial:
– 01100001 is 0x61
– 10011111 is 0x9f
• Can be handy because the ASCII code is built
around hex:
– ‘A’ is 0x41, ‘B’ is 0x42, …, ‘Z’ is 0x5a
– ‘a’ is 0x61, ‘b’ is 0x62, …, ‘z’ is 0x7a
– ‘^A’ (control-A) is 0x01, ‘^B’ is 0x02, ‘^Z’ is 0x1A
– ‘0’ is 0x30, ‘9’ is 0x39
Winter 2012
UCSD: Physics 121; 2012
5
Exchanging Data
• Parallel: Fast and expensive
– devices A, B simple, but cabling
harder
– strobe alerts to “data valid” state
Device A
bit 0
bit 1
bit 2
bit 3
bit 4
bit 5
bit 6
bit 7
Device B
strobe
• Serial: Slow and cheap
– but devices A and must
convert between serial/parallel
Device A Device B
data
slide courtesy E. Michelsen
Winter 2012
UCSD: Physics 121; 2012
6
The Parallel Port
• Primarily a printer port on the PC
– goes by name LPTx: line printer
– usually LPT1
• 8 data bits
– with strobe to signal valid data
– can be fast (1 Mbit/sec)
• Other control and status bits for (printer) communication
data valid
data held static for some interval
see http://www.beyondlogic.org/index.html#PARALLEL
Winter 2012
UCSD: Physics 121; 2012
7
Parallel Port Pinout
Winter 2012
UCSD: Physics 121; 2012
8
Parallel Port Access
• Most PCs have a DB-25 female
connector for the parallel port
• Usually at memory address 0x378
• Windows 98 and before were easy
to talk to
– but after this, a hardware-
abstraction layer (HAL) which
makes access more difficult
– one option is to fool computer into
thinking you’re talking to a normal
LPT (printer) device
– involves tying pins 11 and 12 to
ground
• Straightforward on Linux
– direct access to all pins
serial port
parallel port
Winter 2012
UCSD: Physics 121; 2012
9
Serial Communications
• Most PCs have a DB9 male plug
for RS-232 serial asynchronous
communications
– we’ll get to these definitions later
– often COM1 on a PC
• In most cases, it is sufficient to
use a 2- or 3-wire connection
– ground (pin 5) and either or both
receive and transmit (pins 2 and
3)
• Other controls available, but
seldom used
• Data transmitted one bit at a time,
with protocols establishing how
one represents data
• Slow-ish (most common is 9600
bits/sec)
Winter 2012
UCSD: Physics 121; 2012
10
Time Is of the Essence
• With separate clock and data, the transmitter gives the receiver timing
on one signal, and data on another
• Requires two signals (clock and data): can be expensive
• Data values are arbitrary (no restrictions)
• Used by local interfaces: V.35, (synchronous) EIA-232, HSSI, etc.
• As distance and/or speed increase, clock/data skew destroys timing
time
sample times
centered in data bits
data
clock
sample on
rising edge
of clock
slide courtesy E. Michelsen
Winter 2012
UCSD: Physics 121; 2012
11
No Clock:
Do You Know Where Your Data Is?
• Most long-distance, high speed, or cheap signaling is self timed: it has
no separate clock; the receiver recovers timing from the signal itself
• Receiver knows the nominal data rate, but requires transitions in the
signal to locate the bits, and interpolate to the sample points
• Two General Methods:
– Asynchronous: data sent in short blocks called frames
– Synchronous: continuous stream of bits
• Receiver tracks the timing continuously, to stay in synch
• Tracking requires sufficient transition density throughout the data stream
• Used in all DSLs, DS1 (T1), DS3, SONET, all Ethernets, etc.
interpolated sample times (bit centers)
transitions locate data
time
data
slide courtesy E. Michelsen
Winter 2012
UCSD: Physics 121; 2012
12
Asynchronous: Up Close and Personal
• Asynchronous
– technical term meaning “whenever I feel like it”
• Start bit is always 0. Stop bit is always 1.
• The line “idles” between bytes in the “1” state.
• This guarantees a 1 to 0 transition at the start of every byte
• After the leading edge of the start bit, if you know the data rate,
you can find all the bits in the byte
interpolated sample times (bit centers)
transition
locates data
time
start
1
0
bit
0
bit
1
bit
2
bit
3
bit
4
bit
5
bit
6
bit
7
stop
idle idle
one byte
slide courtesy E. Michelsen
Winter 2012
UCSD: Physics 121; 2012
13
Can We Talk?
• If we agree on 4 asynchronous communication parameters:
– Data rate: Speed at which bits are sent, in bits per seconds (bps)
– Number of data bits: data bits in each byte; usually 8
• old stuff often used 7
– Parity: An error detecting method: None, Even, Odd, Mark, Space
– Stop bits: number of stop bits on each byte; usually 1.
• Rarely 2 or (more rarely) 1.5: just a minimum wait time: can be indefinite
start
bit
0
bit
1
bit
2
bit
3
bit
4
bit
5
bit
6
parity
stop
1
idle idle
9600, 7E2
start
bit
0
bit
1
bit
2
bit
3
bit
4
bit
5
bit
6
bit
7
stop
idle idle
ASCII “A” = 0x41
9600, 8N1
1 bit @ 9600 bps = 1/9600th sec
stop
2
slide courtesy E. Michelsen
Winter 2012
UCSD: Physics 121; 2012
14
RS-232: most common implementation
• RS-232 is an electrical (physical) specification for
communication
– idle, or “mark” state is logic 1;
• 5 to 15 V (usually about 12 V) on transmit
• 3 to 25 V on receive
– “space” state is logic 0;
• +5 to +15 V (usually ~12 V) on transmit
• +3 to +25 V on receive
– the dead zone is from 3 V to +3 V (indeterminate state)
• Usually used in asynchronous mode
– so idles at 12; start jumps to +12; stop bit at 12
– since each packet is framed by start/stop bits, you are guaranteed
a transition at start
– parity (if used) works as follows:
• even parity guarantees an even number of ones in the train
• odd parity guarantees an odd number of ones in the train
Winter 2012
UCSD: Physics 121; 2012
15
GPIB (IEEE-488)
• An 8-bit parallel bus allowing up to 15 devices
connected to the same computer port
– addressing of each machine (either via menu or dip-
switches) determines who’s who
– can daisy-chain connectors, each cable 2 m or less in length
• Extensive handshaking controls the bus
– computer controls who can talk and who can listen
• Many test-and-measurement devices equipped with
GPIB
– common means of controlling an experiment: positioning
detectors, measuring or setting voltages/currents, etc.
• Can be reasonably fast (1 Mbit/sec)
Winter 2012
UCSD: Physics 121; 2012
16
Data Acquisition
• A PCI-card for data acquisition is a
very handy thing
• The one pictured at right (National
Instruments PCI-6031E) has:
– 64 analog inputs, 16 bit
– 2 DACs, 16 bit analog outputs
– 8 digital input/output
– 100,000 samples per second
– on-board timers, counters
• Breakout box/board recommended
Winter 2012
UCSD: Physics 121; 2012
17
CAMAC
• This somewhat old interface provides a “crate” into
which one slides modules that perform specific tasks
– A/D conversion
– time-to-digital converters
– pulse generators
– charge measurement
– amplifiers
– delay generators
• Frequently used in timing experiments, like nuclear
physics: catch events in detector, generate signal,
measure strength, etc.
• Often the modules are highly multiplexed (16
channels per card common)
Winter 2012
UCSD: Physics 121; 2012
18
CAMAC crate (above) and inhabitants
(right) including two custom modules,
two commercial time-to-digital converters
(TDCs) and the crate controller (note
interface cable (50-pin SCSI-2 style)
Winter 2012
UCSD: Physics 121; 2012
19
CAMAC features
• 16-bit (newer are 24-bit) data words
• Full command cycle in 2 s  8 Mbit/sec
• Look-At-Me (LAM) interrupts computer when some
event happens
• Commands follow N.A.F. sequence: slot number,
address, function
– so address specific modules by name/position
– A and F values perform tasks that are defined by module
– A often refers to channel number on multiplexed device
– F might indicate a read, a write, a reset, or other action
Winter 2012
UCSD: Physics 121; 2012
20
Example Interface: APOLLO
• APOLLO is a lunar ranging apparatus that fires 20
laser pulses per second at a selected lunar reflector,
measuring the time-of-flight of photons making the
round trip
• Besides the essential function of data collection and
apparatus coordination, we wanted remote operation
capability
• We also required strict thermal control
Winter 2012
UCSD: Physics 121; 2012
21
Catalog of APOLLO Interfaces
• Uses a Linux PC (runs for a year at a time, no crashes)
• Two GPIB devices
– GPS-disciplined clock; actuated optics (mirror tilt, lens focus)
• 5 RS-232 devices
– motor that spins optic (8N1 @ 57600); laser control (8E1 @ 9600);
CCD camera control (8N1 @ 115200); laser power meter
(bolometer) (8N1 @ 9600); GPS clock (7E1 @ 9600)
• CAMAC crate with two devices
– TDC for 10 ps timing; custom module to control timing
– another device sits passively in crate, no access to dataway
• DAQ card for analog input, digital output
– analog inputs for RTDs (temperature); flow meters; pulse energy;
telescope tilt angle
– digital outputs for relay control: turning devices on and off
• Parallel port used for additional digital outputs for more relays
Winter 2012
UCSD: Physics 121; 2012
22
RTD Readout Scheme
Winter 2012
UCSD: Physics 121; 2012
23
Example Temperature Record
Winter 2012
UCSD: Physics 121; 2012
24
Reading
• Read 6.7.3; skim 6.7.5; read 6.7.7; 6.7.9

Weitere ähnliche Inhalte

Ähnlich wie 11_interface.ppt

Internetworking devices(networking)
Internetworking devices(networking)Internetworking devices(networking)
Internetworking devices(networking)
welcometofacebook
 

Ähnlich wie 11_interface.ppt (20)

serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptx
 
Serial Busses.pptx
Serial Busses.pptxSerial Busses.pptx
Serial Busses.pptx
 
Embedded networking
Embedded networkingEmbedded networking
Embedded networking
 
communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
 
CS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.pptCS553_ST7_Ch06-DigitalDataComm.ppt
CS553_ST7_Ch06-DigitalDataComm.ppt
 
Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacing
 
Ch09 system administration
Ch09 system administration Ch09 system administration
Ch09 system administration
 
lecture_I2C_SPI.pptx
lecture_I2C_SPI.pptxlecture_I2C_SPI.pptx
lecture_I2C_SPI.pptx
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication Protocol
 
Computer Interfaces
Computer Interfaces Computer Interfaces
Computer Interfaces
 
Class11
Class11Class11
Class11
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
EMBEDDED SYSTEM BASICS
EMBEDDED SYSTEM BASICSEMBEDDED SYSTEM BASICS
EMBEDDED SYSTEM BASICS
 
Idi 1300 Cut Sheet
Idi 1300 Cut SheetIdi 1300 Cut Sheet
Idi 1300 Cut Sheet
 
IDI 1300 Cut Sheet
IDI 1300 Cut SheetIDI 1300 Cut Sheet
IDI 1300 Cut Sheet
 
Internetworking devices(networking)
Internetworking devices(networking)Internetworking devices(networking)
Internetworking devices(networking)
 
3 STM32's ADC.ppt
3 STM32's ADC.ppt3 STM32's ADC.ppt
3 STM32's ADC.ppt
 
Lec08
Lec08Lec08
Lec08
 
I2C PRESENTATION.PPT
I2C PRESENTATION.PPTI2C PRESENTATION.PPT
I2C PRESENTATION.PPT
 

Mehr von ssuserfb92ae (9)

SoftwareSecurity.ppt
SoftwareSecurity.pptSoftwareSecurity.ppt
SoftwareSecurity.ppt
 
Data Annotation_Cars.pptx
Data Annotation_Cars.pptxData Annotation_Cars.pptx
Data Annotation_Cars.pptx
 
CIRA Labs - Secure Home Gateway Project 2019-03.pptx
CIRA Labs - Secure Home Gateway Project 2019-03.pptxCIRA Labs - Secure Home Gateway Project 2019-03.pptx
CIRA Labs - Secure Home Gateway Project 2019-03.pptx
 
TRUSTSeminar.ppt
TRUSTSeminar.pptTRUSTSeminar.ppt
TRUSTSeminar.ppt
 
ch13.ppt
ch13.pptch13.ppt
ch13.ppt
 
MicrocontrollersIII.ppt
MicrocontrollersIII.pptMicrocontrollersIII.ppt
MicrocontrollersIII.ppt
 
36_Cryptography.pdf
36_Cryptography.pdf36_Cryptography.pdf
36_Cryptography.pdf
 
2011_esc.pdf
2011_esc.pdf2011_esc.pdf
2011_esc.pdf
 
1_Introduction.pdf
1_Introduction.pdf1_Introduction.pdf
1_Introduction.pdf
 

Kürzlich hochgeladen

(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
motiram463
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
bbhul52a
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
amitlee9823
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
amitlee9823
 
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
amitlee9823
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
tufbav
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
amitlee9823
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
tufbav
 

Kürzlich hochgeladen (20)

(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power point
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
 
↑Top celebrity ( Pune ) Nagerbazar Call Girls8250192130 unlimited shot and al...
↑Top celebrity ( Pune ) Nagerbazar Call Girls8250192130 unlimited shot and al...↑Top celebrity ( Pune ) Nagerbazar Call Girls8250192130 unlimited shot and al...
↑Top celebrity ( Pune ) Nagerbazar Call Girls8250192130 unlimited shot and al...
 
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
 
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
 

11_interface.ppt

  • 2. Winter 2012 UCSD: Physics 121; 2012 2 Common Implementations of Interfaces • Parallel port (8 bits per shot) • Serial (RS-232, RS-485) – usually asynchronous • GPIB (IEEE-488) parallel – General Purpose Interface (or Instrument) Bus – originally HPIB; Hewlett Packard • DAQ card (data acquisition) – like national instruments A/D, D/A, digital I/O • CAMAC – Computer Automated Measurement And Control • VME bus / VXI bus – modern CAMAC-like bus
  • 3. Winter 2012 UCSD: Physics 121; 2012 3 A quick note on hexadecimal decimal value binary value hex value 0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 8 9 1001 9 10 1010 a 11 1011 b 12 1100 c 13 1101 d 14 1110 e 15 1111 f
  • 4. Winter 2012 UCSD: Physics 121; 2012 4 Hexadecimal, continued • Once it is easy for you to recognize four bits at a time, 8 bits is trivial: – 01100001 is 0x61 – 10011111 is 0x9f • Can be handy because the ASCII code is built around hex: – ‘A’ is 0x41, ‘B’ is 0x42, …, ‘Z’ is 0x5a – ‘a’ is 0x61, ‘b’ is 0x62, …, ‘z’ is 0x7a – ‘^A’ (control-A) is 0x01, ‘^B’ is 0x02, ‘^Z’ is 0x1A – ‘0’ is 0x30, ‘9’ is 0x39
  • 5. Winter 2012 UCSD: Physics 121; 2012 5 Exchanging Data • Parallel: Fast and expensive – devices A, B simple, but cabling harder – strobe alerts to “data valid” state Device A bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 Device B strobe • Serial: Slow and cheap – but devices A and must convert between serial/parallel Device A Device B data slide courtesy E. Michelsen
  • 6. Winter 2012 UCSD: Physics 121; 2012 6 The Parallel Port • Primarily a printer port on the PC – goes by name LPTx: line printer – usually LPT1 • 8 data bits – with strobe to signal valid data – can be fast (1 Mbit/sec) • Other control and status bits for (printer) communication data valid data held static for some interval see http://www.beyondlogic.org/index.html#PARALLEL
  • 7. Winter 2012 UCSD: Physics 121; 2012 7 Parallel Port Pinout
  • 8. Winter 2012 UCSD: Physics 121; 2012 8 Parallel Port Access • Most PCs have a DB-25 female connector for the parallel port • Usually at memory address 0x378 • Windows 98 and before were easy to talk to – but after this, a hardware- abstraction layer (HAL) which makes access more difficult – one option is to fool computer into thinking you’re talking to a normal LPT (printer) device – involves tying pins 11 and 12 to ground • Straightforward on Linux – direct access to all pins serial port parallel port
  • 9. Winter 2012 UCSD: Physics 121; 2012 9 Serial Communications • Most PCs have a DB9 male plug for RS-232 serial asynchronous communications – we’ll get to these definitions later – often COM1 on a PC • In most cases, it is sufficient to use a 2- or 3-wire connection – ground (pin 5) and either or both receive and transmit (pins 2 and 3) • Other controls available, but seldom used • Data transmitted one bit at a time, with protocols establishing how one represents data • Slow-ish (most common is 9600 bits/sec)
  • 10. Winter 2012 UCSD: Physics 121; 2012 10 Time Is of the Essence • With separate clock and data, the transmitter gives the receiver timing on one signal, and data on another • Requires two signals (clock and data): can be expensive • Data values are arbitrary (no restrictions) • Used by local interfaces: V.35, (synchronous) EIA-232, HSSI, etc. • As distance and/or speed increase, clock/data skew destroys timing time sample times centered in data bits data clock sample on rising edge of clock slide courtesy E. Michelsen
  • 11. Winter 2012 UCSD: Physics 121; 2012 11 No Clock: Do You Know Where Your Data Is? • Most long-distance, high speed, or cheap signaling is self timed: it has no separate clock; the receiver recovers timing from the signal itself • Receiver knows the nominal data rate, but requires transitions in the signal to locate the bits, and interpolate to the sample points • Two General Methods: – Asynchronous: data sent in short blocks called frames – Synchronous: continuous stream of bits • Receiver tracks the timing continuously, to stay in synch • Tracking requires sufficient transition density throughout the data stream • Used in all DSLs, DS1 (T1), DS3, SONET, all Ethernets, etc. interpolated sample times (bit centers) transitions locate data time data slide courtesy E. Michelsen
  • 12. Winter 2012 UCSD: Physics 121; 2012 12 Asynchronous: Up Close and Personal • Asynchronous – technical term meaning “whenever I feel like it” • Start bit is always 0. Stop bit is always 1. • The line “idles” between bytes in the “1” state. • This guarantees a 1 to 0 transition at the start of every byte • After the leading edge of the start bit, if you know the data rate, you can find all the bits in the byte interpolated sample times (bit centers) transition locates data time start 1 0 bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 stop idle idle one byte slide courtesy E. Michelsen
  • 13. Winter 2012 UCSD: Physics 121; 2012 13 Can We Talk? • If we agree on 4 asynchronous communication parameters: – Data rate: Speed at which bits are sent, in bits per seconds (bps) – Number of data bits: data bits in each byte; usually 8 • old stuff often used 7 – Parity: An error detecting method: None, Even, Odd, Mark, Space – Stop bits: number of stop bits on each byte; usually 1. • Rarely 2 or (more rarely) 1.5: just a minimum wait time: can be indefinite start bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 parity stop 1 idle idle 9600, 7E2 start bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 stop idle idle ASCII “A” = 0x41 9600, 8N1 1 bit @ 9600 bps = 1/9600th sec stop 2 slide courtesy E. Michelsen
  • 14. Winter 2012 UCSD: Physics 121; 2012 14 RS-232: most common implementation • RS-232 is an electrical (physical) specification for communication – idle, or “mark” state is logic 1; • 5 to 15 V (usually about 12 V) on transmit • 3 to 25 V on receive – “space” state is logic 0; • +5 to +15 V (usually ~12 V) on transmit • +3 to +25 V on receive – the dead zone is from 3 V to +3 V (indeterminate state) • Usually used in asynchronous mode – so idles at 12; start jumps to +12; stop bit at 12 – since each packet is framed by start/stop bits, you are guaranteed a transition at start – parity (if used) works as follows: • even parity guarantees an even number of ones in the train • odd parity guarantees an odd number of ones in the train
  • 15. Winter 2012 UCSD: Physics 121; 2012 15 GPIB (IEEE-488) • An 8-bit parallel bus allowing up to 15 devices connected to the same computer port – addressing of each machine (either via menu or dip- switches) determines who’s who – can daisy-chain connectors, each cable 2 m or less in length • Extensive handshaking controls the bus – computer controls who can talk and who can listen • Many test-and-measurement devices equipped with GPIB – common means of controlling an experiment: positioning detectors, measuring or setting voltages/currents, etc. • Can be reasonably fast (1 Mbit/sec)
  • 16. Winter 2012 UCSD: Physics 121; 2012 16 Data Acquisition • A PCI-card for data acquisition is a very handy thing • The one pictured at right (National Instruments PCI-6031E) has: – 64 analog inputs, 16 bit – 2 DACs, 16 bit analog outputs – 8 digital input/output – 100,000 samples per second – on-board timers, counters • Breakout box/board recommended
  • 17. Winter 2012 UCSD: Physics 121; 2012 17 CAMAC • This somewhat old interface provides a “crate” into which one slides modules that perform specific tasks – A/D conversion – time-to-digital converters – pulse generators – charge measurement – amplifiers – delay generators • Frequently used in timing experiments, like nuclear physics: catch events in detector, generate signal, measure strength, etc. • Often the modules are highly multiplexed (16 channels per card common)
  • 18. Winter 2012 UCSD: Physics 121; 2012 18 CAMAC crate (above) and inhabitants (right) including two custom modules, two commercial time-to-digital converters (TDCs) and the crate controller (note interface cable (50-pin SCSI-2 style)
  • 19. Winter 2012 UCSD: Physics 121; 2012 19 CAMAC features • 16-bit (newer are 24-bit) data words • Full command cycle in 2 s  8 Mbit/sec • Look-At-Me (LAM) interrupts computer when some event happens • Commands follow N.A.F. sequence: slot number, address, function – so address specific modules by name/position – A and F values perform tasks that are defined by module – A often refers to channel number on multiplexed device – F might indicate a read, a write, a reset, or other action
  • 20. Winter 2012 UCSD: Physics 121; 2012 20 Example Interface: APOLLO • APOLLO is a lunar ranging apparatus that fires 20 laser pulses per second at a selected lunar reflector, measuring the time-of-flight of photons making the round trip • Besides the essential function of data collection and apparatus coordination, we wanted remote operation capability • We also required strict thermal control
  • 21. Winter 2012 UCSD: Physics 121; 2012 21 Catalog of APOLLO Interfaces • Uses a Linux PC (runs for a year at a time, no crashes) • Two GPIB devices – GPS-disciplined clock; actuated optics (mirror tilt, lens focus) • 5 RS-232 devices – motor that spins optic (8N1 @ 57600); laser control (8E1 @ 9600); CCD camera control (8N1 @ 115200); laser power meter (bolometer) (8N1 @ 9600); GPS clock (7E1 @ 9600) • CAMAC crate with two devices – TDC for 10 ps timing; custom module to control timing – another device sits passively in crate, no access to dataway • DAQ card for analog input, digital output – analog inputs for RTDs (temperature); flow meters; pulse energy; telescope tilt angle – digital outputs for relay control: turning devices on and off • Parallel port used for additional digital outputs for more relays
  • 22. Winter 2012 UCSD: Physics 121; 2012 22 RTD Readout Scheme
  • 23. Winter 2012 UCSD: Physics 121; 2012 23 Example Temperature Record
  • 24. Winter 2012 UCSD: Physics 121; 2012 24 Reading • Read 6.7.3; skim 6.7.5; read 6.7.7; 6.7.9

Hinweis der Redaktion

  1. Lecture 11
  2. Lecture 11
  3. Lecture 11
  4. Lecture 11
  5. Lecture 11
  6. Lecture 11
  7. Lecture 11
  8. Lecture 11
  9. Lecture 11
  10. Lecture 11
  11. Lecture 11
  12. Lecture 11
  13. Lecture 11
  14. Lecture 11
  15. Lecture 11
  16. Lecture 11
  17. Lecture 11
  18. Lecture 11
  19. Lecture 11
  20. Lecture 11
  21. Lecture 11
  22. Lecture 11
  23. Lecture 11
  24. Lecture 11