Sei sulla pagina 1di 27

Signals,Circuits,andComputers

JohnAthanasiou
PartA
Spring2010

Based on Ping Hsus Original Notes

(c)P.Hsu2007

Electricity
Usedtodeliverenergy:
Lights
Heat(electricoven,microwaveoven,electricheater,hair
dryer,etc.)

Motion(fan,elevator,washingmachine)

Usedforrepresentationandprocessingof
information
Computer,TV,radio,cellphone
(c)P.Hsu2007

Whatisasignal?
Asignalisavoltage(orcurrent)thatrepresentsa
quantity orapieceofinformation.
Examples:
Thevoltageacrossthedoorbellorlightbulb
Thevoltageacrossthespeedometer(carspeed)
Thevoltageacrosstheearphonelines
Thevoltageacrosstheprintercablewires(amessage)

(c)P.Hsu2007

TypesofSignals
Analog:
Adimmer lightswitchcontinuously
increases/decreasesthecurrent.
Digital :
AnOn/Offlightswitchappliesafixed,
predeterminedvoltage.

(c)P.Hsu2007

AnalogSignal &DigitalSignal
Ananalogsignalsvoltage(orcurrent)levelrepresentsa
physicalquantity.
I=V/R
3

5v

2 1

100 miles

Current
meter

Thecurrentrepresentsthewaterlevel.
1.Higherwaterlevel=>2.higherfloatposition=>3.lowerresistance
=>4.highercurrent(V/R)=>5.highercurrentmeterreading=>
higherwaterlevelreading

(c)P.Hsu2007

DigitalSignal
Adigitalsignalcarriesinformationbythestate(high
orlow)ofthevoltagelevel.
ON

V=5v (logic 1)

OFF

V=0v (logic 0)

1000 miles

(c)P.Hsu2007

VoltageLevelvs.LogicState
5v

High (1)

3.5v
1.5v
Low (0)

0v

DigitalSignalhasahighnoiseimmunitylevel
thelevelofnoisethatcanbeaddedtothesignalwithout
affectingitsstate.
(c)P.Hsu2007

The Apples Logo

What message does it display?


(c)P.Hsu2007

Bits,BytesandWords
Bits:(20)
Onebit canonlyrepresentabinarystate:
0or1,
on oroff,
stop orgo.

Bytes.(23)
Onebyteconsistsof8bits.

Words:(24 or25)
Onewordconsistsof16bits(or32bits,dependingonthe
computer).
(c)P.Hsu2007

A4bitbinarynumber
8 (MSB)
4
2
1 (LSB)

MSB

LSB

Binary number: 0110 = 0+4+2+0=6


Binary number: 1101 = 8+4+0+1=13
MSB = Most Significant Bit,
(c)P.Hsu2007
LSB = Least
Significant Bit

10

4bitBinaryNumber
ON

OFF

ON

ON

Binary Number = 1

Value = 8*(1)+ 4*(0)+2*(1)+1*(1)


= 8+2+1
=13
(c)P.Hsu2007

11

BinaryCode
In a computer, a binary number is used to represent:
(1) Numerical values
(2) Characters and symbols (A, a, ,+, , @, .)
(3) Picture, sound, video, etc.
(4) Machine language (for math operations, etc.)
(5) others

(c)P.Hsu2007

12

An example of a binary coding


4bitBinary
Code

Shorthand
NotationHEX

Numericalvalue
represented

Machinelanguage
represented

0000

NOOP

0001

ADD

0010

SUB

0011

MUL

1001

DIV

1010

10

COPY

1011

11

MOV

1100

12

AND

1101

13

OR

1110

14

SHIFT

1111

15

XOR

(c)P.Hsu2007

13

Q1:Whatisthedecimalvalueof
the4bitbinarynumber0101?
(A)
(B)
(C)
(D)
(E)

3
4
5
6
7

(c)P.Hsu2007

14

Q2.Whatdowecallthebitthatisinthe
leftmostpositioninabinarynumber?
A:SNB
B:LMB
C:MSB
D:LSB
E:USB

(c)P.Hsu2007

15

Numberofbits

Numberofdifferentvalues
thatcanberepresented

4bit(1nibble)

24 =16

8bit(1byte)

28 =256

10bit

210 =1024

16bit(1word)

216=65536

32bit

232=4294967296

(c)P.Hsu2007

16

DigitalCommunication
Parallelconnection:adedicatedwireforeachbit
(needsalotofwires).

Circuit
A

(LSB) b0
b1
b2
b3

Circuit
B

(MSB) b15

(c)P.Hsu2007

17

DigitalCommunication
Serialconnection:bitsaresentsequentially
(takeslongtime).

b0 b1 b2 b3.
Circuit
A

0 1 0 0 11 1

(c)P.Hsu2007

b15
1

Circuit
B

18

Sendingabyteorawordinparallel,sequentially(commonly
usedbetweencircuitswithinacomputer)
byte1 byte2 byte3
(1S) (2S) (3S)

Circuit
A

b0
b1
b2
b3

b0
b1
b2
b3

b0
b1
b2
b3

b15

b15

b15

Timing control circuit


(c)P.Hsu2007

Circuit
B

19

AnalogSignalvs.DigitalSignal
1.Analogsignals
Pros:highresolution,efficienttransmission
(1wire,1signal),nodelay,realworld signals.
Cons:Difficulttoprocess(performoperations,
storage),susceptibletonoise.
2.DigitalSignals
Pros:highimmunitytonoise,easytoprocess
Cons:needsalotofbits andcircuits,data processing
delay
(c)P.Hsu2007

20

Analog DigitalConversion
Bit 0
Digital input

DAC

Analog output

Bit 9

Bit 0
Digital output

ADC

Analog input

Bit 9
(c)P.Hsu2007

21

Q3.WhichofthefollowingisNOTan
advantageofadigitalsignal:
A:Easytoperformmathoperation
B:Easytostore
C:Highnoiseimmunity
D:Needlesscircuitry.
E:Alltheabove

(c)P.Hsu2007

22

VEXMicrocontroller
VEX Controller
Program
Memory
Data
Memory

PC
Central
Processing
Unit
(CPU)

Input
Output
Ports

Sensors
Motors

CPU:Executinginstructions,performingarithmeticandlogic
operations.Itisthebrain ofthecomputer.
Memory:Memoryisforkeepingprogramanddata.
IOPort:Gatewaytoandfromtheexternaldevices.

(c)P.Hsu2007

23

VEXcontrollerIOPorts
Analog/DigitalPort(16ports)

Interrupt
Ports

MotorPorts
(8ports)
(c)P.Hsu2007

24

InfraredEmittingBeacons
The beacons used in this project flash
infrared light at 1kHz (the red one) and
10kHz (the green one).
This flashing light allows the receiver circuit to
tune to the targeted beacon and
distinguish the light emitted by the beacons from
the ambient light.

(c)P.Hsu2007

25

InfraredReceiverBoard
Tune to 1kHz
or 10kHz

VEX
Controller
AD1
AD14

Intensity

Exposure
Control

counter
count

Reset

amplifier

sensitivity

Exposure
AD16

Tuning
circuit

1k/10kHz

AD15

selector

reset

8
4
2
1

For each active


exposure control,
counter increases by 1.

(c)P.Hsu2007

0
1
2
3
4
5
6
7

Infrared
detectors

For selecting one


of the 8 infrared
detectors

26

Q4:Whatistheabbreviatednameofthecircuit
inacomputerthatperformsarithmetic
operation?
A:USB
B:AOU
C:CPU
D:AIO
E:MOU
End of Part A.
(c)P.Hsu2007

27

Potrebbero piacerti anche