Chapter 1 Line Code Encoder
1-1: Curriculum Objectives
1. 2. 3. 4. 5.
To understand the theory and applica tions of line code enc encoder. To understand understand the the encode theory theory and and circuit circuit structu structure re of NRZ. NRZ. To understand understand the the encode theory theory and and circuit circuit structu structure re of RZ. RZ. To understand understand the the encode theory theory and and circuit circuit structu structure re of AMI. AMI. To understand the enc ode theory and circ uit structure of Manchester. er.
1-2: Curriculum Theory Line codin is a part of source codin. !efore "#M sinal send to $odulator% &e use certain sinal $ode in certain application. The considerations of selectin the diital sinal $odes to carry the 'inary data are( 1. types of $odulation% 2. types of de$odulation% 3. the li$itation of 'and&idth% and 4 types of recei)er. Line codin can 'e di)ided into t&o types% &hich are return*to*+ero return*to*+ero ,RZ- and nonreturn*to*+ero ,NRZ-. RZ line codin denotes for a sinle 'it ti$e ,nor$ally is half of a sinle sinle 'it ti$e-% ti$e-% the the &a)efor$ &a)efor$ &ill &ill return return to / 'et&e 'et &e en da ta pu lse s.
The data strea$ is sho&n in fiure 1*1,c-. NRZ line codin denotes for a sinle sinle 'it ti$e% the &a)efor$ & ill not return to /. The data strea$ is sho&n in fiure 1*1,a-. As
a result of the characteristics of sinal% line codin also can 'e di)ided into t&o types% &hich are unipolar sinal and 'ipolar sinal. 0nipolar sinal denotes that the sinal a$plitude )aries 'et&een a positi)e )oltae le)el &hich are / and /. The only different 'et&een 'ipolar sinal and unipolar sinal is the sinal a$plitude )aries 'et&ee n a positi)e and a neati)e )oltae le)el &hich are / and */. iure 1*1 sho&s different types of line code sinals and &e &ill discuss the encodin sinals in net section.
1. 0nipolar Nonreturn*to*+ero inal ncode The data strea$ of unipolar nonreturn*to*+ero ,0NI*NRZ- is sho&n in fuure 1*1,a-. ro$ fiure 1*1,a-% &hen the data 'it is 6 17% the &idth and the ap 'et&een 'its of 0NI*NRZ are e8ual to each others9 &hen the data 'it is 67% then the pulse is represented as /. The circuit diara$ of 0NI*NRZ encoder is sho&n in fiure 1*2. As a result of the data sinal and the NRZ encoder sinal are si$ilar% therefore% &e only need to add a 'uffer in front of the circuit.
iure 1*2 #ircuit diara$ of unipolar nonreturn*to*+ero encoder. 2. !ipolar Nonreturn*to*+ero inal ncode The data strea$ of 'ipolar nonreturn*to*+ero ,!I"*NRZ- is sho&n in fiu re 1* 1,'-. :hen the data 'it of !I"*NRZ is ;1; or ;;% the sinal a$plitude &ill 'e a positi)e or a neati)e )oltae le)el. As for 'it ti$e% no $atter the data 'it is ;1; or ;;% the )oltae le)el re$ain sa$e. iure 1*3 is the circuit diara$ of !I"*NRZ encoder. !y co$parin the data strea$s of 0NI*NRZ a !I" *NRZ% the onl y difference is the sinal a$plitude is a nea ti)e )oltae le )el &hen th e data 'it is ; ;% therefore% &e $ay utili+e a co$parator to encode the data 'it in the circuit.
3. 0nipolar Return*to*+ero inal ncode The data strea$ of unipolar return*to*+ero ,0NI*RZ- is sho&n in fiure 1*1,c-. :hen the d ata ' it is ; 1;% t he si nal a$plitu de a t 1<2 'it ti $e is positi)e )oltae le)el and the rest of the 'it ti$e is represented as /. :hen the data 'it is ;;% there is no pulse &a)e that $eans the sinal a$plitude is /. The 'it ti$e of RZ is half of the 'it ti$e of NRZ % therefore% the re8uired 'and&idth of RZ is one ti$e $ore than NRZ. =o&e)er% RZ has t&o phase
)ariations in a 'it ti$e% &hich is easy for recei)er synchroni+ation. ro$ fiure 1*1% co$pare the data sinal% cloc> sinal and data after encodin% &e >no& that in order to o'tain the encodin data of RZ% &e need to ;AN?; the data sinal and cloc> sinal. The circuit diara$ of unipolar return*to *+ero encoder is sho&n in fiure 1*4.
iure 1*3 #ircuit diara$ of 'ipolar nonreturn*to*+ero encoder.
iure 1*4 #ircuit diara$ of unipolar return*to*+ero encoder.
4. !ipolar Return*to*+ero inal ncode The data strea$ of 'ipolar return*to*+ero ,!1"*RZ- is sho&n in fiure 1 *1, d-. :hen the data 'it is ;1;% the sinal a$plitude at 1<2 'it ti$e is positi)e )oltae le)el and the other 1<2 'it ti$e is neati)e )oltae le)el. :hen the data 'it is ;;% the sinal a$plitude of the 'it ti$e is represented as neati)e )oltae le)el. iure 1*5 is the circuit diara$ of !I"*RZ. !y co$parin the data strea$s of RZ and !I"*RZ in fiure 1*1% &e only need a con)erter to con)ert the encodin sinal fro$ unipolar to 'ipolar% therefore% &e utili+e a co$parator to desin the con)erter% &hich can con)ert the RZ sinal to !I"*RZ sinal.
iure 1*5 #ircuit diara$ of 'ipolar return*to*+ero encoder. 5. Alternate Mar> In)ersion inal ncode Alternate $ar> in)ersion ,AMI- sinal is si$ilar to RZ sinal ecept the al ternate ;1 ; in)erte d. The data strea$ o f AMI sinal is sho& n in fiure 1*1,f-. :hen the data 'it is ;1;% the first sinal a$plitude at 1<2 'it ti$e is posit i)e )o ltae le)el and th e oth er 1<2 'i t ti $e is /9 th en th e second sinal a$plitu de at 1<2 'it ti$e is neati) e )oltae le)el and the other 1<2 'it ti$e /% therefore% the only different 'et&een AMI and RZ is the alternate ;1; are in)erted. :hen the data 'it is ;;% the sinal a$plitude is /. This
ty pe of en co de is co $$o n us ed 'y te le ph on e industry &hich is pulse codin $odulation ,"#M-. iure 1*@ is the circuit diara$ of AMI sinal encode. In order to o'tain the AMI encode sinal% the data and cloc> sinals need to pass throuh the 'uffer stae% &hich is co$prised 'y a pair of transistors and NT ates. After that &e need to ;AN?; the output of data sinal and cloc> sinal% then pass throuh a di)ider circuit 'y utili+in cloc> as s&itch echane. The final sinal is the AMI sinal. The $ini$u$ 'a nd&idth of AMI is less than 0NI*RZ and !I"*RZ. An additio nal ad)antae of AMI is the trans$ission errors can 'e detec ted 'y detectin the )iolations of the alternate*one rule.
iure 1*@ #ircuit diara$ of AMI sinal encoder.
@. Manchester inal ncode
Manchester sinal is also >no&n as split*phase sinal. The data strea$ of Manchester sinal is sho&n in fiure 1*1,e-. :hen the data 'it is ;1;% the sinal a$plitude at first 1<2 'it ti$e is positi)e )oltae le)el and the other 1<2 'it ti$e is neati)e )oltae le)el. :hen the data 'it is ;;% the sinal a$plitude at first 1<2 'it ti$e is neati)e )oltae le)el and the other 1<2 'it ti$e is positi)e )oltae le)el. This type of encode sinal has the ad)antae of $e$ory% therefore% the re8uired 'and&idth is larer than the other encode sinals. o% it is suita'le applied to net&or> such as thernet. ro$ fiure 1*1% co$pare the data sinal% cloc> sinal and data after encodin% &e >no& that in order to o'ta in the enco din data of Manc heste r% &e need to ;BNR; the data sinal and cloc> sinal. iure 1*C is the circuit diara$ of Manchester sinal encoder.
iure 1*C #ircuit diara$ of Manchester sinal encoder.
1-3 : Experiment tems Experiment 1: !nipolar and bipolar "#$ si%nal encode Experiment 1-1: !nipolar "#$ si%nal encode
1. To i$ple$ent a unipolar NRZ encode circuit as sho&n in fiure 1*2 or refer to fiure ?#T1*1 on DTT ?#T*@*1 $odule. 2. ettin the fre8uency of function enerator to 1 >=+ TTL sinal and connect this sinal to the ?ata I<". Then o'ser)e on the output &a)efor$ 'y usin oscilloscope and record the $easured results in ta'le 1*1. 3. Accordin to the input sinals in ta'le 1*1% repeat step 2 and record the $easured results in ta'le 1*1. Experiment 1-2: &ipolar "#$ si%nal encode
1. To i$ple$ent a 'ipolar NRZ sinal encode circuit as sho&n in fiure 1*3 or refer to fiure ?#T1*1 on DTT ?#T*@*1 $odule. 2. ettin the fre8uency of function enerator to 1 >=+ TTL sinal and connect this sinal to the ?ata I<". Then o'ser)e on the &a)efor$s of T"1 and !I"*NRZ <" 'y usin oscilloscope and record the $easured results in ta'le 1*2. 3. Accordin to the input sinals in ta'le 1*2% repeat step 2 and record the $easured results in ta'le 1*2.
Experiment 2 : !nipolar and &ipolar #$ si%nal encode Experiment 2-1 : !nipolar #$ si%nal encode
1. To i$ple$ent a unipolar RZ sinal encode circuit as sho&n in fiure 1*4 or refer to fiure ?#T 1*2 on DTT ?#T*@*1 $odule. 2. ettin the fre8uency of function enerator to 2 >=+ TTL sinal and connect this sinal to the #LE I<" of fiure ?#T 1*2 and #LE at the left 'otto$. After that connect the ?ata <" at the left 'otto$ to the ?ata I<" in fiure ?#T 1*2. Then o'ser)e on the &a)efor$s of #LE I<"% ?ata I<" and 0NI*RZ <" 'y usin oscilloscope% and record the $easured results in ta'le 1*3.
3. Accordin to the input sinals in ta'le 1*3% repeat step 2 and record the $easured results in ta'le 1*3. 4. ettin the fre8uency of function enerator to 2 >=+ TTL sinal and connect this sinal to the #LE I<" in fiure ?#T 1*2. Then settin ano ther fre8uenc y of functi on ener ator to 1 >=+ TTL si nal and connect this sinal to the ?ata I<" in fiure ?#T1*2. Then o'ser)e on th e &a )e fo r$ of #L E I<"% ?a ta I<" an d 0NI*R Z <" ' y usin oscilloscope% =id record the $easured results in ta'le 1*4.
5. Accordin to the input sinals in ta'le 1*4% repeat step 4 and record the $easured results in ta'le 1*4.
Experiment 2-2 : &ipolar #$ si%nal encode
1. To i$ple$ent a 'ipolar RZ sinal encode circuit as sho&n in fiure 5 or refer to fiure ?#T1*2 on DTT ?#T*@*1 $odule.
2. ettin the fre8uency of function enerator to 2 >=+ TTL sinal and connect this sinal to the #LE I<" in fiure ?#T1*2 and #LE at the left 'otto$. After that connect the ?ata <" at the left 'otto$ to the ?ata I<" in fiure ?#T1*2. Then o'ser)e on the &a)efor$s of #LE I<"% ?ata I<"% T"1 and !I"*RZ <" 'y usin oscilloscope% and record the $easured results in ta'le 1*5.
3. Accordin to the input sinals in ta'le 1*5% repeat step 2 and record the $easured results in ta'le 1*5.
4. ettin fre8uency of function enerator to 2 >=+ TTL sinal and connect this sinal to the #LE I<" in fiure ?#T1*2. Then settin another fre8uency of function enerator to 1 >=+ TTL sinal and connect this sinal to the ?ata I<" in fiure ?#T1*2. Then o'ser)e on &a)efor$s of #LE I<"% ?ata I<"% T"1 and !I"*RZ <" 'y usin oscilloscope% and record the $easured results in ta'le 1*@.
5. Accordin to the input sinals in ta'le 1*@% repeat step 4 and record the $easured results in ta'le 1*@.
Experiment 3 : '( si%nal encode 1. To i$ple$ent an AMI sinal encode c ircuit as s ho&n in fiure 1*@ or refer to fiure ?#T 1*3 on DTT ?#T*@*1 $odule.
2. ettin the fre8uency of function enerator to 2 >=+ TTL sinal and connect this sinal to the #LE I<" in fiure ?#T 1*3 and #LE at the left 'otto$. After that connect the ?ata <" at the left 'otto$ to the ?ata I<" in fiure ?#T1*3. Then o'ser)e on the &a)efor$s of #LE I<"% ?ata I<"% T"1% T"2% T"3% T"4% T"5 and AMI <" 'y usin oscilloscope% and record the $easured results in ta'le 1*C.
3. Accordin to the input sinals in ta'le 1*C% repeat step 2 and record the $easured results in ta'le 1*C.
4. ettin the fre8uency of function enerator to 2 >=+ TTL sinal and connect t his sinal to the #LE I<" in fiure ?#T1*3. Then settin another fre8uency of func tion ene rator to 1 >=+ TTL sina l and connect this sinal to the ?ata I<" in fiure ?#T1*3. Then o'ser)e on the &a)efor$s of #LE I<"% ?ata I<"% T"1% T"2 % T"3 % T"4 % T"5 and AMI <" 'y usin oscilloscope% and record the $easured results in ta'le 1*F.
5. Accordin to the input sinals in ta'le 1*F% repeat step 4 and record the $easured results in ta'le 1*F.
Experiment ): (anchester si%nal encode 1. To i$ple$ent a Manchester sinal encode circuit as sho&n in fiure 1*C or refer to fiure ?#T1*4 on DTT ?#T*@*1 $odule. 2. ettin the fre8uency of function enerator to 2 >=+ TTL sinal and connect this sinal to the #LE I<" in fiure ?#T 1*4 and #LE at the left 'otto$. After that connect the ?ata <" at the left 'otto$ to the ?ata I<" in fiure ?#T1*4. Then o'ser)e on the &a)efor$s of #LE I<"% ?ata I<" and M anchester <" 'y u sin o scilloscop e% an d record the $easured results in ta'le 1*G.
3. Accordin to the input sinals in ta'le 1*G% repeat step 2 and record the $easured results in ta'le 1*G. 4. ettin the fre8uency of function enerator to 2 >=+ TTL sinal and conn ect this sinal to the #LE I<" in fiure ?#T1*4. Then settin% another fre8uenc y of func tion ene rato r to 1 >= + TTL s ina l an d connect this sinal to the ?ata I<" in fiure ?#T 1*4. Then o'ser)e on the &a )efor $s of #LE I <"% ?ata I<" a nd Ma nc he st er < " 'y us in oscilloscope% and record the $easured results in ta'le 1*1.
5. Accordin to the input sinals in ta'le 1*1% repeat step 4 and record the $easured results in ta'le 1*1.
1-) : (easured #esults
Ta'le 1*1( Measured results of 0NI*NRZ sinal encode.
Input Signal
utput inal :a)efor$s
Frequencies (Data I/P)
1 kHz
2>=+
5>=+
F>=+
0NI*NRZ <"
Ta'le 1*2 Measured results of !I"*NRZ sinal encode.
utput inal :a)efor$s
Input Signal Frequencies (Data I/P)
2 kHz
3.5 >=+
5>=+
C.5 >=+
T"1
!I"*NRZ <"
Ta'le 1*3 Measured results of 0NI*RZ sinal encode.
utput inal :a)efor$s
Input Signal Frequencies (Data I/P)
#LE I<"
2 kHz
3.5 >=+
5>=+
C.5 >=+
Ta'le 1*4 Measured results of 0NI*RZ sinal encode.
?ata I<"
0NI*RZ <"
Input inal re8uencies
#LE I<"
?ata I<"
2 kHz
1 kHz
3.5 >=+
1.5 >=+
5>=+
2.5 >=+
7.5 kHz
4 >=+
utput inal :a)efor$s
#LE I<"
Ta'le 1*5 Measured results of !I"*NRZ sinal encode.
?ata I<"
0NI*RZ <"
Input inal re8uencies ,#loc>
utput inal :a)efor$s
I<"#LE I<"
?ata I<"
T"1
!I"*RZ <"
#LE I<"
?ata I<"
T"1
!I"*RZ <"
2 kHz
5>=+
Ta'le 1*@ Measured results of !I"*NRZ sinal encode.
Input inal utput inal :a)efor$s
re8uencies #LE I<" ?ATA I<"
2 kHz
5>=+
1 kHz
#LE I<"
?ata I<"
T"1
!I"*RZ <"
#LE I<"
?ata I<"
T"1
!I"*RZ <"
2.5 >=+
Ta'le 1*C Measured results of AMI sinal encode.
Input inal
utput inal :a)efor$s
re8uencies ,#LE I<"#LE I<"
?ata I<"
T"1
T"2
T"3
T"4
T"5
AMI <"
100 Hz
Ta'le 1*C Measured results of AMI sinal encode. ,#ontinue-
Input inal
utput inal :a)efor$s
re8uencies ,#LE I<"-
500 Hz
#LE I<"
?ata I<"
T"1
T"2
T"3
T"4
T"5
AMI <"
Ta'le 1*F Measured results of AMI sinal encode.
Input inal utput inal :a)efor$s
re8uencies #LE I<" ?ata I<"
1 =+
#LE I<"
?ata I<"
T"1
T"2
T"3
T"4
T"5
AMI <"
5 =+
Ta'le 1*F Measured results of AMI sinal encode. ,continue-
Input inal utput inal :a)efor$s
re8uencies #LE I<" ?ata I<"
5 =+
#LE I<"
?ata I<"
T"1
T"2
T"3
T"4
T"5
AMI <"
25 =+
Ta'le 1*G Measured results of Manchester sinal encode.
Input inal re8uencies ,#LE I<"-
utput inal :a)efor$s #LE I<"
2k
3 >
5 >
F >
Ta'le 1*1 Measured results of Manchester sinal encode.
?ata I<"
Manchester <"
Input inal re8uencies
#LE I<"
?ata I<"
2 kHz
1 kHz
3.5 >=+
1.5 >=+
5>=+
2.5 >=+
kHz
4 >=+
utput inal :a)efor$s
#LE I<"
1-* : +roblem ,iscussion
?ata I<"
Manchester <"
1. plain &hat are the co$$on types of line codin H
2. plain ho& the unipolar and 'ipolar nonreturn*to*+ero sinals encode H
3. plain ho& the unipolar and 'ipolar return*to*+ero sinals encode H
4. plain ho& the AMI sinal encodes H
5. plain ho& the Manchester sinal encodes H
@. plain &hy do &e need line codin H