Computer Interfaces - Experimental Techniques - Lecture Slides, Slides of Electrical Engineering

These are the key points discussed in the given Slides : Computer Interfaces, Interfaces, Parallel Port, Asynchronous, Parallel, Interface, Data Acquisition, National Instruments, Automated Measurement, Control

Typology: Slides

2012/2013

Uploaded on 07/24/2013

bulla.baba
bulla.baba 🇮🇳

5

(7)

87 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer Interface 02/21/2007
Lecture 11 1
Computer Interfaces
Serial, Parallel, GPIB, CAMAC, Oh My!
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
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
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
Docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Computer Interfaces - Experimental Techniques - Lecture Slides and more Slides Electrical Engineering in PDF only on Docsity!

Computer Interfaces

Serial, Parallel, GPIB, CAMAC, Oh My!

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

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

Hexadecimal, continued

•^

Once it is easy for you to recognize four bits at atime, 8 bits is trivial:– 01100001 is 0x61– 10011111 is 0x9f

•^

Can be handy because the ASCII code is builtaround 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 0x

Docsity.com

Exchanging Data

•^

Parallel: Fast and expensive–

devices A, B simple, but cablingharder– strobe alerts to “data valid” state

Device A

bit 0bit 1bit 2bit 3bit 4bit 5bit 6bit 7

Device B

strobe

•^

Serial: Slow and cheap–

but devices A and mustconvert between serial/parallel

Device A

Device B

data

slide courtesy E. Michelsen

The Parallel Port

•^

Primarily a printer port on the PC– goes by name LPTx: line printer– usually LPT

•^

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

Parallel Port Pinout

Parallel Port Access

•^

Most PCs have a DB-25 femaleconnector for the parallel port

-^

Usually at memory address 0x

-^

Windows 98 and before were easyto talk to–

but after this, a hardware-abstraction layer (HAL) whichmakes access more difficult– one option is to fool computer intothinking you’re talking to a normalLPT (printer) device– involves tying pins 11 and 12 toground

-^

Straightforward on Linux–

direct access to all pins

serial port

parallel port

Docsity.com

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, 7E

start

bit 0

bit 1

bit 2

bit 3

bit 4

bit 5

bit 6

bit 7

stop

idle

idle

ASCII “A” = 0x

9600, 8N

1 bit @ 9600 bps = 1/

th^

sec

stop 2

slide courtesy E. Michelsen

RS-232: most common implementation

•^

RS-232 is an electrical (physical) specification forcommunication–

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

–^

since each packet is framed by start/stop bits, you are guaranteeda 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

GPIB (IEEE-488)

•^

An 8-bit parallel bus allowing up to 15 devicesconnected 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 withGPIB– common means of controlling an experiment: positioning

detectors, measuring or setting voltages/currents, etc.

•^

Can be reasonably fast (1 Mbit/sec)

Data Acquisition

•^

A PCI-card for data acquisition is avery handy thing

-^

The one pictured at right (NationalInstruments 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

Docsity.com

CAMAC

•^

This somewhat old interface provides a “crate” intowhich 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 nuclearphysics: catch events in detector, generate signal,measure strength, etc.

•^

Often the modules are highly multiplexed (16channels per card common)

CAMAC crate (above) and inhabitants(right) including two custom modules,two commercial time-to-digital converters(TDCs) and the crate controller (noteinterface cable (50-pin SCSI-2 style)

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 someevent 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

Example Interface: APOLLO

•^

APOLLO is a lunar ranging apparatus that fires 20laser pulses per second at a selected lunar reflector,measuring the time-of-flight of photons making theround trip

•^

Besides the essential function of data collection andapparatus coordination, we wanted remote operationcapability

•^

We also required strict thermal control

Docsity.com