rfid robot

Upload: harsh-alipuria

Post on 04-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 RFID robot

    1/68

  • 8/13/2019 RFID robot

    2/68

    1.1 Block Diagram:

    1

    *F 9ncoderHT819

    *FTransmitter

    STT 4 566

    SW8

    SW1

    SW6

    SW5

    #oer supply to all sections

    Step

    donT

  • 8/13/2019 RFID robot

    3/68

  • 8/13/2019 RFID robot

    4/68

    1.2 Introduction o Em!"dd"d #$%t"m:

    -n 9mbedded System is a combination o% computer hardare and so%tare, and perhaps

    additional mechanical or other parts, desi"ned to per%orm a speci%ic %unction. - "ood

    example is the microa!e o!en. -lmost e!ery household has one, and tens o% millions o%

    them are used e!eryday, but !ery %e people reali7e that a processor and so%tare are

    in!ol!ed in the preparation o% their lunch or dinner.

    This is in direct contrast to the personal computer in the %amily room. )t too is comprised

    o% computer hardare and so%tare and mechanical components @disk dri!es, %or

    exampleA. Hoe!er, a personal computer is not desi"ned to per%orm a speci%ic %unction

    ratherB it is able to do many di%%erent thin"s. (any people use the term "eneral4purpose

    computer to make this distinction clear. -s shipped, a "eneral4purpose computer is a

    blank slateB the manu%acturer does not kno hat the customer ill do ish it. ?ne

    customer may use it %or a netork %ile ser!er another may use it exclusi!ely %or playin"

    "ames, and a third may use it to rite the next "reat -merican no!el.

    Fre&uently, an embedded system is a component ithin some lar"er system. For

    example, modern cars and trucks contain many embedded systems. ?ne embedded

    system controls the anti4lock brakes, other monitors and controls the !ehicle$s emissions,

    and a third displays in%ormation on the dashboard. )n some cases, these embedded

    systems are connected by some sort o% a communication netork, but that is certainly not

    a re&uirement.

    -t the possible risk o% con%usin" you, it is important to point out that a "eneral4purpose

    computer is itsel% made up o% numerous embedded systems. For example, my computer

    consists o% a keyboard, mouse, !ideo card, modem, hard dri!e, %loppy dri!e, and sound

    card4each o% hich is an embedded system. 9ach o% these de!ices contains a processor

    5

  • 8/13/2019 RFID robot

    5/68

    and so%tare and is desi"ned to per%orm a speci%ic %unction. For example, the modem is

    desi"ned to send and recei!e di"ital data o!er analo" telephone line. That$s it and all o%

    the other de!ices can be summari7ed in a sin"le sentence as ell.

    )% an embedded system is desi"ned ell, the existence o% the processor and so%tare

    could be completely unnoticed by the user o% the de!ice. Such is the case %or a

    microa!e o!en, ;2*, or alarm clock. )n some cases, it ould e!en be possible to build

    an e&ui!alent de!ice that does not contain the processor and so%tare. This could be done

    by replacin" the combination ith a custom inte"rated circuit that per%orms the same

    %unctions in hardare. Hoe!er, a lot o% %lexibility is lost hen a desi"n is hard4cooled in

    this ay. )t is mush easier, and cheaper, to chan"e a %e lines o% so%tare than to

    redesi"n a piece o% custom hardare.

    1.& Hi%tor$ and 'utur":

    Gi!en the de%inition o% embedded systems earlier is this chapterB the %irst such systems

    could not possibly ha!e appeared be%ore 8/C8. That as the year )ntel introduced the

    orld$s %irst microprocessor. This chip, the 55, as desi"ned %or use in a line o%

    business calculators produced by the Dapanese 2ompany =usicom. )n 8/+/, =usicomasked )ntel to desi"n a set o% custom inte"rated circuits4one %or each o% their ne

    calculator models. The 55 as )ntel$s response rather than desi"n custom hardare %or

    each calculator, )ntel proposed a "eneral4purpose circuit that could be used throu"hout

    the entire line o% calculators. )ntel$s idea as that the so%tare ould "i!e each calculator

    its uni&ue set o% %eatures.

    The microcontroller as an o!erni"ht success, and its use increased steadily o!er the next

    decade. 9arly embedded applications included unmanned space probes, computeri7ed

    tra%%ic li"hts, and aircra%t %li"ht control systems. )n the 8/s, embedded systems &uietly

    rode the a!es o% the microcomputer a"e and brou"ht microprocessors into e!ery part o%

    our kitchens @bread machines, %ood processors, and microa!e o!ensA, li!in" rooms

    0

  • 8/13/2019 RFID robot

    6/68

    @tele!isions, stereos, and remote controlsA, and orkplaces @%ax machines, pa"ers, laser

    printers, cash re"isters, and credit card readersA.

    )t seems ine!itable hat the number o% embedded systems ill continue to increase rapidly.

    -lready there are promisin" ne embedded de!ices that ha!e enormous market potentialB

    li"ht sitches and thermostats that can be central computer, intelli"ent air4ba" systems

    that don$t in%late hen children or small adults are present, pal4si7ed electronic or"ani7ers

    and personal di"ital assistants @#-sA, di"ital cameras, and dashboard na!i"ation

    systems. 2learly, indi!iduals ho possess the skills and desire to desi"n the next

    "eneration o% embedded systems ill be in demand %or &uite some time .

    1.( R"al Tim" #$%t"m%:

    ?ne subclass o% embedded is orthy o% an introduction at this point. -s commonly

    de%ined, a real4time system is a computer system that has timin" constraints. )n other

    ords, a real4time system is partly speci%ied in terms o% its ability to make certain

    calculations or decisions in a timely manner. These important calculations are said to

    ha!e deadlines %or completion. -nd, %or all practical purposes, a missed deadline is 'ust

    as bad as a ron" anser.

    The issue o% hat i% a deadline is missed is a crucial one. For example, i% the real4time

    system is part o% an airplane$s %li"ht control system, it is possible %or the li!es o% the

    passen"ers and cre to be endan"ered by a sin"le missed deadline. Hoe!er, i% instead

    the system is in!ol!ed in satellite communication, the dama"e could be limited to a sin"le

    corrupt data packet. The more se!ere the conse&uences, the more likely it ill be said

    that the deadline is EhardE and thus, the system is a hard real4time system. *eal4time

    systems at the other end o% this discussion are said to ha!e Eso%tE deadlines.

    -ll o% the topics and examples presented in this book are applicable to the desi"ners o%

    real4time system ho is more deli"ht in his ork. He must "uarantee reliable operation o%

    the so%tare and hardare under all the possible conditions and to the de"ree that human

    +

  • 8/13/2019 RFID robot

    7/68

    li!es depend upon three system$s proper execution, en"ineerin" calculations and

    descripti!e paperork.

    1.) O*"r*i"+ o Em!"dd"d #$%t"m Arc,it"ctur"

    9!ery embedded system consists o% custom4built hardare built around a 2entral

    #rocessin" 3nit @2#3A. This hardare also contains memory chips onto hich the

    so%tare is loaded. The so%tare residin" on the memory chip is also called the

    %irmare. The embedded system architecture can be represented as a layered

    architecture.

    The operatin" system runs abo!e the hardare, and the application so%tare runs abo!e

    the operatin" system. The same architecture is applicable to any computer includin" a

    desktop computer. Hoe!er, there are si"ni%icant di%%erences. )t is not compulsory to

    ha!e an operatin" system in e!ery embedded system. For small appliances such as remote

    control units, air conditioners, toys etc., there is no need for an operatin" system and you

    can rite only the so%tare speci%ic to that application. For applications in!ol!in"complex processin", it is ad!isable to ha!e an operatin" system. )n such a case, you need

    to inte"rate the application so%tare ith the operatin" system and then trans%er the entire

    so%tare on to the memory chip. ?nce the so%tare is trans%erred to the memory chip, the

    so%tare ill continue to runfor a lon" time you dont need to reload ne so%tare.

    No, let us see the details o% the !arious buildin" blocks o% the hardare o% an embedded

    system. -s shon in Fi". the buildin" blocks areB

    2entral #rocessin" 3nit @2#3A

    (emory @*ead4only (emory and *andom -ccess (emoryA

    )nput e!ices

    ?utput de!ices

    2ommunication inter%aces

    -pplication4speci%ic circuitry

    C

  • 8/13/2019 RFID robot

    8/68

    'ig 1.&: "m!"dd"d %$%t"m

    C"ntral Proc"%%ing Unit -CPU:

    The 2entral #rocessin" 3nit @processor, in shortA can be any o% the %olloin":

    microcontroller, microprocessor or i"ital Si"nal #rocessor @S#A. - micro4controller is

    a lo4cost processor. )ts main attraction is that on the chip itsel%, there ill be many other

    components such as memory, serial communication inter%ace, analo"4to di"ital con!erter

    etc. So, %or small applications, a micro4controller is the best choice as the number o%

    external components re&uired ill be !ery less. ?n the other hand, microprocessors are

    more poer%ul, but you need to use many external components ith them. 0# is used

    mainly %or applications in hich si"nal processin" is in!ol!ed such as audio and !ideo

    processin".

    /"mor$: The memory is cate"ori7ed as *andom -ccess 88emory @*-(A and *ead

    ?nly (emory @*?(A. The contents o% the *-( ill be erased i% poer is sitched o%%

    to the chip, hereas *?( retains the contents e!en i% the poer is sitched o%%. So, the

    %irmare is stored in the *?(. When poer is sitched on, the processor reads the

    *?(B the pro"ram is pro"ram is executed.

    In0ut d"*ic"%:

    3nlike the desktops, the input de!ices to an embedded system ha!e !ery limited

    capability. There ill be no keyboard or a mouse, and hence interactin" ith the

  • 8/13/2019 RFID robot

    9/68

    embedded system is no easy task. (any embedded systems ill ha!e a small keypad4you

    press one key to "i!e a speci%ic command. - keypad may be used to input only the di"its.

    (any embedded systems used in process control do not ha!e any input de!icefor user

    interactionB they take inputs from sensors or transducers 8%nd produce electrical si"nals

    that are in turn %ed to other systems.

    Out0ut d"*ic"%:

    The output de!ices o% the embedded systems also ha!e !ery limited capability. Some

    embedded systems ill ha!e afew Ii"ht 9mittin" iodes @I9sA to indicate the health

    status o% the system modules, orfor !isual indication o% alarms. - small Ii&uid 2rystal

    isplay @I2A may also be used to displaysome important parameters.

    Communication int"rac"%:

    The embedded systems may need to, interact ith other embedded systems at they may

    ha!e to transmit data to a desktop. To %acilitate this, the embedded systems are pro!ided

    ith one or afew communication inter%aces such as *S161, *S511, *S50, 3ni!ersal

    Serial =us @3S=A, )999 86/5, 9thernet etc.

    A00lication%0"ciic circuitr$:

    Sensors, transducers, special processin" and control circuitry may be re&uired %at an

    embedded system, dependin" on its application. This circuitry interacts ith the

    processor to carry out the necessary ork. The entire hardare has to be "i!en poer

    supply either throu"h the 16 !olts main supply or throu"h a battery. The hardare has to

    desi"n in such a ay that the poer consumption is minimi7ed.

    /

  • 8/13/2019 RFID robot

    10/68

    1. Conclu%ion%:

    9mbedded Systems plays a !ital role in our day today li%e. They are used %or household

    appliances like microa!e o!en to the stellite applications. They pro!ide "ood man to

    machine inter%ace.

    -utomation is the %urther step in the orld o% 9mbedded Systems, hich includes the

    elimination o% the human bein" in the mundane applications. They are cost e%%ecti!e,

    accurate and can ork in any conditions and round the clock.

    8

  • 8/13/2019 RFID robot

    11/68

    CHAPTER 2

    RADIO 'RE3UENC4@R'A

    2.1 5,at I% R'6

    Radio r"7u"nc$@R'A is a %re&uency or rate o% oscillation ithin the ran"e o% about 6 H7

    to 6 GH7. This ran"e corresponds to %re&uency o% alternatin" current electrical si"nals

    used to produce and detect radio a!es. Since most o% this ran"e is beyond the !ibration

    rate that most mechanical systems can respond to, *F usually re%ers to oscillations in

    electrical circuits or electroma"netic radiation

    .

    2.2 Pro0"rti"% O R':

    9lectrical currents that oscillate at *F ha!e special properties not shared by direct current

    si"nals. ?ne such property is the ease ith hich it can ioni7e air to create a conducti!e

    path throu"h air. This property is exploited by $hi"h %re&uency$ units used in electric arc

    eldin". -nother special property is an electroma"netic %orce that dri!es the *F current

    to the sur%ace o% conductors, knon as the skin e%%ect. -nother property is the ability to

    appear to %lo throu"h paths that contain insulatin" material, like the dielectric insulator

    o% a capacitor. The de"ree o% e%%ect o% these properties depends on the %re&uency o% the

    si"nals.

    2.& Bri" D"%cri0tion O R':

    *adio %re&uency @abbre!iated *FA is a term that re%ers to alternatin" current @-2A ha!in"

    characteristics such that, i% the current is input to an antenna, an electroma"netic @9(A

    %ield is "enerated suitable %or ireless broadcastin" and

  • 8/13/2019 RFID robot

    12/68

    When an *F current is supplied to an antenna, it "i!es rise to an electroma"netic %ield

    that propa"ates throu"h space. This %ield is sometimes called an *F %ieldB in less

    technical 'ar"on it is a Eradio a!e.E -ny *F %ield has a a!elen"th that is in!ersely

    proportional to the %re&uency. )n the atmosphere or in outer space, i% is the %re&uency in

    me"ahert7 and %is the a!elen"th in meters, then

    s8 &99%

    The %re&uency o% an *F si"nal is in!ersely proportional to the a!elen"th o% the 9( %ield

    to hich it corresponds. -t / kH7, the %ree4space a!elen"th is approximately 66

    kilometers @kmA or 18 miles @miA. -t the hi"hest radio %re&uencies, the 9( a!elen"ths

    measure approximately one millimeter @8 mmA. -s the %re&uency is increased beyond that

    o% the *F spectrum, 9( ener"y takes the %orm o% in%rared @)*A, !isible, ultra!iolet @3;A,

    J rays, and "amma rays.

    (any types o% ireless de!ices make use o% *F %ields. 2ordless and cellular telephone,

    radio and tele!ision broadcast stations, satellite communications systems, and to4ay

    radio ser!ices all operate in the *F spectrum. Some ireless de!ices operate at )* or

    !isible4li"ht %re&uencies, hose electroma"netic a!elen"ths are shorter than those o%

    *F %ields. 9xamples include most tele!ision4set remote4control boxes Some cordlesscomputer keyboards and mice, and a %e ireless hi4%i stereo headsets.

    The *F spectrum is di!ided into se!eral ran"es, or bands. With the exception o% the

    loest4%re&uency se"ment, each band represents an increase o% %re&uency correspondin"

    to an order o% ma"nitude @poer o% 8A. The table depicts the ei"ht bands in the *F

    spectrum, shoin" %re&uency and bandidth ran"es. The SHF and 9HF bands are o%ten

    re%erred to as the micro+a*" %0"ctrum.

    5H4 DO 5E ;O 'OR R' CO//UNICATION6

    R' Ad*antag"%:

    8. No line o% si"ht is needed.

    81

  • 8/13/2019 RFID robot

    13/68

    1. Not blocked by common materials: )t can penetrate most solids and pass throu"h

    alls.

    6. Ion"er ran"e.

    5. )t is not sensiti!e to the li"htB.

    0. )t is not much sensiti!e to the en!ironmental chan"es and eather conditions.

    5HAT CARE #HOU

  • 8/13/2019 RFID robot

    14/68

    Fi" 1.8: #TT(&& /H> TRAN#/ITTER

    'ACTOR# IN'

    ABOUT THE TRAN#/ITTER:

    The STT4566 is ideal %or remote control applications here lo cost and lon"er ran"e is

    re&uired.

    8. The transmitter operates %rom a8.0481; supply, makin" it ideal %or battery4

    poered applications.

    1. The transmitter employs a S-W4stabili7ed oscillator, ensurin" accurate %re&uency

    control %or best ran"e per%ormance.

    6. The manu%acturin"4%riendly S)# style packa"e and lo4cost make the STT4566

    suitable %or hi"h !olume applications.

    '"atur"%

    8. 566./1 (H7 Fre&uency

    1. Io 2ost

    6. 8.0481; operation

    5. Small si7e

    PIN DE#CRIPTION:

    85

  • 8/13/2019 RFID robot

    15/68

    %i" 1.1: pin dia"ram@transmitterA

    ;ND

    Tran%mitt"r ground. 2onnect to "round plane

    DATA

    Digital data in0ut. This input is 2(?S compatible and should be dri!en ith 2(?S

    le!el inputs.

    ?CC

    O0"rating *oltag" or t," tran%mitt"r. ;22 should be bypassed ith a .8uF ceramic

    capacitor and %iltered ith a 5.CuF tantalum capacitor. Noise on the poer supply illde"rade transmitternoise per%ormance.

    ANT

    80

  • 8/13/2019 RFID robot

    16/68

    )9 o,m ant"nna out0ut. The antenna port impedance a%%ects output poer and

    harmonic emissions. -ntenna can be sin"le core ire o% approximately 8Ccm len"th or

    #2=trace antenna.

    APP

  • 8/13/2019 RFID robot

    17/68

    'ig 2.(: Encod"r HT12E

    HO5 DOE# THE ENCODER 5OR=6

    The 181 series o% encoders be"in a 54ord transmission cycle upon receipt o% a

    transmission enable @T9 %or the HT819 or K88 %or the HT81-, acti!e loA. This

    cycle ill repeat itsel% as lon" as the transmission enable @T9 or K88A is held lo.

    ?nce the transmission enables returns hi"h the encoder output completes its %inal cycle

    and then stops as shon belo.

    'ig 2.): Tran%mi%%ion Timing

    Addr"%%data 0rogramming -0r"%"t

    The status o% each address

  • 8/13/2019 RFID robot

    18/68

    the 81 bits o% address

  • 8/13/2019 RFID robot

    19/68

    'ig 2.@: 'lo+c,art -tran%mitt"r

    8/

  • 8/13/2019 RFID robot

    20/68

    5,$ i% t,i% gra0, r"7uir"d6

    'ig 2.: ;ra0, %,o+ing 'r"7u"nc$ *"r%u% ?oltag"

    The "raph shon abo!e decides the resistance !alue to be connected to the oscillator pins

    o% the encoder. The oscillator resistance ill ha!e an e%%ect on startup time and steady

    state amplitude. For the data communication at a particular %re&uency in the *F ran"e,

    both the transmitter and recei!er should be set to a particular %re&uency. The exact settin"

    o% the %re&uency can be obtained in the encoder and decoder circuits. The %re&uency

    !alue can be set usin" the "raph. The operatin" !olta"e o% encoder and decoder is 0;.

    Thus lookin" at the "raph at 0; ;, i% e select the %re&uency in the ran"e o% 8.10 and

    8.0 e are selectin" 11k resistance.

    1

  • 8/13/2019 RFID robot

    21/68

    DE/O CIRCUIT: Tran%mi%%ion Circuit

    'ig 2.19: DE/O CIRCUIT: Tran%mi%%ion Circuit

    18

  • 8/13/2019 RFID robot

    22/68

    The data sent %rom the microcontroller is encoded and sent to *F transmitter. The data is

    transmitted on the antenna pin. Thus, this data should be recei!ed on the destination i.e,

    on *F recei!er.

    2. R' R"c"i*"r #tr(&& /,>:

    Fi" 1.88: *F recei!er

    The data is recei!ed by the *F recei!er %rom the antenna pin and this data is a!ailable on

    the data pins. To ata pins are pro!ided in the recei!er module. Thus, this data can be

    used %or %urther applications.

    PINOUT:

    'ig 2.12: Pin Diagram o R"c"i*"r

    11

  • 8/13/2019 RFID robot

    23/68

    ;ND

    *ecei!er Ground. 2onnect to "round plane.

    ?CC -)?

    ;22 pins are electrically connected and pro!ide operatin" !olta"e %or the recei!er. ;22

    can be applied to either or both. ;22 should be bypassed ith a .8MF ceramic capacitor.

    Noise on the poer supply ill de"rade recei!er sensiti!ity.

    DATA

    i"ital data output. This output is capable o% dri!in" one TTI or 2(?S load. )t is a

    2(?S compatible output.

    Similarly, as the transmitter re&uires an encoder, the recei!er module re&uires a decoder.

    The decoder used is HT12D %rom HO

  • 8/13/2019 RFID robot

    24/68

    DECODER HT12D:

    '"atur"%

    8. ?peratin" !olta"e: 1.5;K81;.

    1. Io poer and hi"h noise immunity 2(?S technolo"y.

    6. Io standby current.

    5. 2apable o% decodin" 8 bits o% in%ormation.

    0. #airs ith H?IT9s 68 series o% encoders.

    +. K8 address pins.

    C. K data pins.

    Ho+ Do"% T," D"cod"r 5ork6

    The 181 series o% decoders pro!ides !arious combinations o% addresses and data pins in

    di%%erent packa"es so as to pair ith the 181 series o% encoders. The decoders recei!e data

    that are transmitted by an encoder and interpret the %irst N bits o% code period as

    addresses and the last 81LN bits as data, here N is the address code number. -

    si"nal on the )N pin acti!ates the oscillator hich in turn decodes the incomin" address

    15

  • 8/13/2019 RFID robot

    25/68

    and data. The decoders ill then check the recei!ed address three times continuously. )%

    the recei!ed address codes all match the contents o% the decoderLs local address, the

    81LN bits o% data are decoded to acti!ate the output pins and the ;T pin is set hi"h to

    indicate a !alid transmission. This ill last unless the address code is incorrect or no

    si"nal is recei!ed. The output o% the ;T pin is hi"h only hen the transmission is !alid.

    ?therise it is alays lo.

    '

  • 8/13/2019 RFID robot

    26/68

    BA#IC APP

  • 8/13/2019 RFID robot

    27/68

    DE/O CIRCUIT: R"c"0tion circuit

    RECIE?ER

    'ig 2.1): D"mo Circuit-r"c"i*"r

    The data transmitted into the air is recei!ed by the recei!er. The recei!ed data is taken

    %rom the data line o% the recei!er and is %ed to the decoder .The output o% decoder is "i!en

    to microcontroller and then data is processed accordin" to the applications.

    1C

  • 8/13/2019 RFID robot

    28/68

  • 8/13/2019 RFID robot

    29/68

    recti%ier. The output obtained %rom the recti%ier is a pulsatin" d.c !olta"e. So in order to

    "et a pure d.c !olta"e, the output !olta"e %rom the recti%ier is %ed to a %ilter to remo!e any

    a.c components present e!en a%ter recti%ication. No, this !olta"e is "i!en to a !olta"e

    re"ulator to obtain a pure constant dc !olta"e.

    'ig &.1 : 0o+"r %u00l$

    Tran%orm"r:

    3sually, 2 !olta"es are re&uired to operate !arious electronic e&uipment and these

    !olta"es are 0;, /; or 81;. =ut these !olta"es cannot be obtained directly. Thus the a.c

    input a!ailable at the mains supply i.e., 16; is to be brou"ht don to the re&uired

    !olta"e le!el. This is done by a trans%ormer. Thus, a step don trans%ormer is employed

    to decrease the !olta"e to a re&uired le!el.

    R"ctii"r:

    The output %rom the trans%ormer is %ed to the recti%ier. )t con!erts -.2. into pulsatin"

    .2. The recti%ier may be a hal% a!e or a %ull a!e recti%ier. )n this pro'ect, a brid"e

    recti%ier is used because o% its merits like "ood stability and %ull a!e recti%ication.

    1/

    R"gulatorFilter

    Bridg"

    R"ctii"r

    #t"0 do+n

    tran%orm"r

    2&9? AC

    )9H> D.C

    Out0ut

  • 8/13/2019 RFID robot

    30/68

    'ilt"r:

    2apaciti!e %ilter is used in this pro'ect. )t remo!es the ripples %rom the output o% recti%ier

    and smoothens the .2. ?utput recei!ed %rom this %ilter is constant until the mains

    !olta"e and load is maintained constant. Hoe!er, i% either o% the to is !aried, .2.

    !olta"e recei!ed at this point chan"es. There%ore a re"ulator is applied at the output sta"e.

    ?oltag" r"gulator:

    -s the name itsel% implies, it re"ulates the input applied to it. - !olta"e re"ulator is an

    electrical re"ulator desi"ned to automatically maintain a constant !olta"e le!el. )n this

    pro'ect, poer supply o% 0; and 81; are re&uired. )n order to obtain these !olta"e le!els,

    C0 and C81 !olta"e re"ulators are to be used. The %irst number C represents positi!e

    supply and the numbers 0, 81 represent the re&uired output !olta"e le!els.

    CHAPTER (

    /ICROCONTRO

  • 8/13/2019 RFID robot

    31/68

    %ixed amount o% on4chip *?(, *-( and number o% )

  • 8/13/2019 RFID robot

    32/68

    (.2 '"atur"% O AT#)2:

    8. =ytes o% *e4pro"rammable Flash (emory.

    1. *-( is 10+ bytes.

    6. 1.C; to +; ?peratin" *an"e.

    5. Fully Static ?peration: H7 to 15 (H7.

    0. 61 #ro"rammable )

  • 8/13/2019 RFID robot

    33/68

    )n addition, the -T/S01 is desi"ned ith static lo"ic %or operation don to 7ero

    %re&uency and supports to so%tare selectable poer sa!in" modes. The )dle (ode

    stops the 2#3 hile alloin" the *-(, timer

  • 8/13/2019 RFID robot

    34/68

    'ig (.2 : /C Block diagram

    65

  • 8/13/2019 RFID robot

    35/68

    PIN DE#CRIPTION:

    ?cc

    #in 5 pro!ides supply !olta"e to the chip. The !olta"e source is P0;.

    ;ND

    #in 1 is the "round.

    TA

  • 8/13/2019 RFID robot

    36/68

    'ig(.&: O%cillator Conn"ction%

    28, 21 Q 6 pF R 8 pF %or 2rystals

    Q 5 pF R 8 pF %or 2eramic *esonators

    Fi": Et"rnal Clock Dri*" Coniguration

    6+

  • 8/13/2019 RFID robot

    37/68

    RE#ET

    #in/ is the reset pin. )t is an input and is acti!e hi"h. 3pon applyin" a hi"h pulse to this

    pin, the microcontroller ill reset and terminate all the acti!ities. This is o%ten re%erred to

    as a poer4on reset.

    EA -Et"rnal acc"%%

    #in 68 is 9-. )t is an acti!e lo si"nal. )t is an input pin and must be connected to either

    ;cc or GN but it cannot be le%t unconnected. The 08 %amily members all come ith

    on4chip *?( to store pro"rams. )n such cases, the 9- pin is connected to ;cc. )% the

    code is stored on an external *?(, the 9- pin must be connected to GN to indicate

    that the code is stored externally.

    P#EN -Program %tor" "na!l"

    This is an output pin.

    A

  • 8/13/2019 RFID robot

    38/68

    Port% 9 1 2 and &

    The %our ports #, #8, #1 and #6 each use pins, makin" them 4bit ports. -ll the ports

    upon *9S9T are con%i"ured as input, since #4#6 ha!e !alue FFH on them.

    Port 9-P9

    #ort is also desi"nated as -4-C, alloin" it to be used %or both address and data.

    -I9 indicates i% # has address or data. When -I9Q, it pro!ides data 4C, but hen

    -I9Q8, it has address -4-C. There%ore, -I9 is used %or demultiplexin" address and

    data ith the help o% an internal latch.

    When there is no external memory connection, the pins o% # must be connected to a

    84ohm pull4up resistor. This is due to the %act that # is an open drain. With external

    pull4up resistors connected to #, it can be used as a simple )

  • 8/13/2019 RFID robot

    39/68

    Port &

    #ort 6 occupies a total o% pins, pins 8 throu"h 8C. )t can be used as input or output. #6

    does not need any pull4up resistors, the same as port 8 and port 1. #ort 6 has an additional

    %unction o% pro!idin" some extremely important si"nals such as interrupts.

    Ta!l"(.1: Port & Alt"rnat" 'unction%

    /ac,in" c$cl" or t," 9)1

    The 2#3 takes a certain number o% clock cycles to execute an instruction. )n the 08

    %amily, these clock cycles are re%erred to as machine cycles. The len"th o% the machine

    cycle depends on the %re&uency o% the crystal oscillator. The crystal oscillator, alon" ith

    on4chip circuitry, pro!ides the clock source %or the 08 2#3.

    6/

  • 8/13/2019 RFID robot

    40/68

    The %re&uency can !ary %rom 5 (H7 to 6 (H7, dependin" upon the chip ratin" and

    manu%acturer. =ut the exact %re&uency o% 88.0/1 (H7 crystal oscillator is used to make

    the 08 based system compatible ith the serial port o% the )=( #2.

    )n the ori"inal !ersion o% 08, one machine cycle lasts 81 oscillator periods. There%ore,

    to calculate the machine cycle %or the 08, the calculation is made as 8

  • 8/13/2019 RFID robot

    41/68

    The -T/S01 code memory array is pro"rammed byte4byte in either pro"rammin" mode.

    To program any nonblankbyte in the on-chip Flash Memory, the entire memory must be

    erased using the Chip Erase Mode.

    Programming Algorit,m:

    =e%ore pro"rammin" the -T/S01, the address, data and control si"nals should be set up

    accordin" to the Flash pro"rammin" mode table. To pro"ram the -T/S01, the %olloin"

    steps should be considered:

    8. )nput the desired memory location on the address lines.

    1. )nput the appropriate data byte on the data lines.

    6. -cti!ate the correct combination o% control si"nals.

    5. *aise 9-

  • 8/13/2019 RFID robot

    42/68

    *epeat steps 8 throu"h 0, chan"in" the address and data %or the entire array or until the

    end o% the ob'ect %ile is reached.

    Data Polling:

    The -T/S01 %eatures ata #ollin" to indicate the end o% a rite cycle. urin" a rite

    cycle, an attempted read o% the last byte ritten ill result in the complement o% the

    ritten datum on #?.C. ?nce the rite cycle has been completed, true data are !alid on

    all outputs, and the next cycle may be"in. ata #ollin" may be"in any time a%ter a rite

    cycle has been initiated.

    R"ad$Bu%$:

    The pro"ress o% byte pro"rammin" can also be monitored by the *

  • 8/13/2019 RFID robot

    43/68

    R"ading t," #ignatur" B$t"%:

    The si"nature bytes are read by the same procedure as a normal !eri%ication o% locations

    6H, 68H, and 61H, except that #6.+ and #6.C must be pulled to a lo"ic lo. The

    !alues returned are as %ollos.

    @6HA Q 89H indicates manu%actured by -tmel

    @68HA Q 08H indicates /208

    @61HA Q FFH indicates 81; pro"rammin"

    @61HA Q 0H indicates 0; pro"rammin"

    Programming Int"rac":

    9!ery code byte in the Flash array can be ritten and the entire array can be erased by

    usin" the appropriate combination o% control si"nals. The rite operation cycle is sel%

    timed and once initiated, ill automatically time itsel% to completion. -ll ma'or

    pro"rammin" !endors o%%er orldide support %or the -tmel microcontroller series.

    56

  • 8/13/2019 RFID robot

    44/68

  • 8/13/2019 RFID robot

    45/68

    is made o% and hat colour it is. ;alues typical %or the most %re&uently used diodes are

    shon in table belo: -s seen, there are three main types o% I9s. tandardones "et %ul

    bri"htness at current o% 1m-. !ow Currentdiodes "et %ul bri"htness at ten times loer

    current hile uper "rightdiodes produce more intensi!e li"ht than Standard ones.

    Since the 08 microcontrollers can pro!ide only lo input current and since their pins

    are con%i"ured as outputs hen !olta"e le!el on them is e&ual to , direct connectin" to

    I9s is carried out as it is shon on %i"ure @!ow currentI9, cathode is connected to

    output pinA.

    ).2 #+itc,"% and Pu%,!utton%

    There is nothin" simpler than thisV This is the simplest ay o% controllin" appearance o%

    some !olta"e on microcontrollers input pin. There is also no need %or additional

    explanation o% ho these components operate.

    %i" 0.1: led inter%acin"

    Ne!ertheless, it is not so simple in practice... This is about somethin" commonly

    unnoticeable hen usin" these components in e!eryday li%e. )t is about contact bounce4 a

    common problem ith m e c h a n i c a l sitches. )% contact sitchin" does not happenso &uickly, se!eral consecuti!e bounces can be noticed prior to maintain stable state. The

    reasons %or this are: !ibrations, sli"ht rou"h spots and dirt. -nyay, hole this process

    does not last lon" @a %e micro4 or milisecondsA, but lon" enou"h to be re"istered by the

    microcontroller. 2oncernin" pulse counter, error occurs in almost 8 o% casesV

    50

  • 8/13/2019 RFID robot

    46/68

    %i" 0.6: led inter%acin"1

    The simplest solution is to connect simple *2 circuit hich ill suppressU each &uick

    !olta"e chan"e. Since the bouncin" time is not de%ined, the !alues o% elements are not

    strictly determined. )n the most cases, the !alues shon on %i"ure are su%%icient.

    )% complete sa%ety is needed, radical measures should be takenV The circuit, shon on the

    %i"ure @*S %lip4%lopA, chan"es lo"ic state on its output ith the %irst pulse tri""ered by

    contact bounce. 9!en thou"h this is more expensi!e solution @S#T sitchA, the problem

    is de%initely resol!edV =esides, since the condensator is not used, !ery short pulses can be

    also re"istered in this ay. )n addition to these hardare solutions, a simple so%tare

    solution is commonly applied too: hen a pro"ram tests the state o% some input pin and

    %inds chan"es, the check should be done one more time a%ter certain time delay. )% the

    chan"e is con%irmed it means that sitch @or pushbuttonA has chan"ed its position. The

    ad!anta"es o% such solution are ob!ious: it is %ree o% char"e, e%%ects o% disturbances are

    eliminated too and it can be ad'usted to the orst4&uality contacts.

    5+

  • 8/13/2019 RFID robot

    47/68

    CHAPTER

    THEOR4 O' DC /OTOR

    +.8 Introduction:

    The speed o% a 2 motor is directly proportional to the supply !olta"e, so i% e reduce

    the supply !olta"e %rom 81 ;olts to + ;olts, the motor ill run at hal% the speed. Ho can

    this be achie!ed hen the battery is %ixed at 81 ;oltsX The speed controller orks by

    !aryin" the a!era"e !olta"e sent to the motor. )t could do this by simply ad'ustin" the

    !olta"e sent to the motor, but this is &uite ine%%icient to do. - better ay is to sitch the

    motor$s supply on and o%% !ery &uickly. )% the sitchin" is %ast enou"h, the motor doesn$t

    notice it, it only notices the a!era"e e%%ect.

    When you atch a %ilm in the cinema, or the tele!ision, hat you are actually seein" is a

    series o% %ixed pictures, hich chan"e rapidly enou"h that your eyes 'ust see the a!era"e

    e%%ect 4 mo!ement. our brain %ills in the "aps to "i!e an a!era"e e%%ect.

    No ima"ine a li"ht bulb ith a sitch. When you close the sitch, the bulb "oes on and

    is at %ull bri"htness, say 8 Watts. When you open the sitch it "oes o%% @ WattsA. No

    i% you close the sitch %or a %raction o% a second, then open it %or the same amount o%

    time, the %ilament on$t ha!e time to cool don and heat up, and you ill 'ust "et an

    a!era"e "lo o% 0 Watts. This is ho lamp dimmers ork, and the same principle is

    used by speed controllers to dri!e a motor. When the sitch is closed, the motor sees 81

    ;olts, and hen it is open it sees ;olts. )% the sitch is open %or the same amount o%

    time as it is closed, the motor ill see an a!era"e o% + ;olts, and ill run more sloly

    accordin"ly. The "raph belo shos the speed o% a motor that is bein" turned on and o%%

    5C

  • 8/13/2019 RFID robot

    48/68

    .2 HBRID;E:

    -n H4brid"e is an electronic circuit hich enables 2 electric motors to be run %orards

    or backards. These circuits are o%ten used in robotics. H4brid"es are a!ailable as

    inte"rated circuits, or can be built %rom discrete components.

    'ig .1: HBridg"

    The to basic states o% a H4brid"e.The term EH4brid"eE is deri!ed %rom the typical

    "raphical representation o% such a circuit. -n H4brid"e is built ith %our sitches @solid4

    state or mechanicalA. When the sitches S8 and S5 @accordin" to the %irst %i"ureA are

    closed @and S1 and S6 are openA a positi!e !olta"e ill be applied across the motor. =y

    openin" S8 and S5 sitches and closin" S1 and S6 sitches, this !olta"e is re!ersed,

    alloin" re!erse operation o% the motor.

    3sin" the nomenclature abo!e, the sitches S8 and S1 should ne!er be closed at the

    same time, as this ould cause a short circuit on the input !olta"e source. The same

    applies to the sitches S6 and S5. This condition is knon as shoot4throu"h.

    O0"ration

    The H4=rid"e arran"ement is "enerally used to re!erse the polarity o% the motor, but can

    also be used to $brake$ the motor, here the motor comes to a sudden stop, as the motors

    terminals are shorted, or to let the motor $%ree run$ to a stop, as the motor is e%%ecti!ely

    disconnected %rom the circuit. The %olloin" table summari7es operation.

    5

  • 8/13/2019 RFID robot

    49/68

    Ta!l" .1: HBridg" o0"ration

    #1 #2 #& #( R"%ult

    8 8(otor mo!es

    ri"ht

    8 8 (otor mo!es le%t

    (otor %ree runs

    8 8 (otor brakes

    .& HBridg" Dri*"r:

    The sitchin" property o% this H4=rid"e can be replace by a Transistor or a *elay or e!en

    by an )2. Here e are replacin" this ith an )2 named I1/6 as the dri!er hose

    description is as "i!en belo.

    '"atur"%:

    +m- ?3T#3T 23**9NT 2-#-=)I)T

    #9* 2H-NN9I

    8.1- #9- ?3T#3T 23**9NT @non repetiti!eA

    9N-=I9 F-2)I)T

    ?;9*T9(#9*-T3*9 #*?T92T)?N

    I?G)2-I EE )N#3T ;?IT-G9 3# T? 8.0 ;

    @H)GH N?)S9 )((3N)TA

    .( D"%cri0tion:

    The e!ice is a monolithic inte"rated hi"h !olta"e, hi"h current %our channel dri!er

    desi"ned to accept standard TI or TTI lo"ic le!els and dri!e inducti!e loads @such as

    5/

  • 8/13/2019 RFID robot

    50/68

    relays solenoids, 2 and steppin" motorsA and sitchin" poer transistors. To simpli%y

    use as to brid"es each pair o% channels is e&uipped ith an enable input. - separate

    supply input is pro!ided %or the lo"ic, alloin" operation at a loer !olta"e and internal

    clamp diodes are included. This de!ice is suitable %or use in sitchin" applications at

    %re&uencies up to 0 kH7. The I1/6 is assembled in a 8+ lead plastic packa"e hich has

    5 center pins connected to"ether and used %or heat sinkin" The I1/6 is assembled in a

    1 lead sur%ace mount hich has center pins connected to"ether and used %or heat

    sinkin".

    B

  • 8/13/2019 RFID robot

    51/68

    PIN CONNECTION#

    Fi" +.6 : pin connections o% H4brid"e

    08

  • 8/13/2019 RFID robot

    52/68

    CHAPTER 7

    ADVANTAGES AND APPLICATIONS

    7.1 Advantages

    8. Not line o% si"ht

    1. Not blocked by common materials: can penetrate most solids and pass throu"h

    alls

    6. Ion"er ran"e

    5. Not li"ht sensiti!e

    0. Not as sensiti!e to eather

  • 8/13/2019 RFID robot

    53/68

    CHAPTER

    PROFECT CODIN;

    .1 RECEI?ER:

    BHardare:

    sp!al e&u 5h

    or" h

    s'mp poeron

    or" 6h

    reti

    or" bh

    reti

    or" 86h

    reti

    or" 8bh

    reti

    or" 16h

    reti

    or" 1bh

    reti

    or" 66h

    poeron:

    mo! sp,Y%%h

    (?; )9,YH B isable all the interrupts

    (?; )#,YH B issable the interrupt priority re"ister

    (?; #,YFFH B (o!e FFH in in port

    (?; #8,YFFH B (o!e FFH in in port 8

    06

  • 8/13/2019 RFID robot

    54/68

    (?; #1,YFFH B (o!e FFH in in port 1

    (?; #6,YFFH

    clr ledtr

    mo! sp,Ysp!al

    mainloop:

    mo! a,p8

    anl a,Y%h

    c'ne a,Y1d,'8

    setb p.

    clr p.8

    setb p.1

    clr p.6

    '8:c'ne a,Yd,'1

    clr p.

    setb p.8

    clr p.1

    setb p.6

    '1:c'ne a,Y+d,'6

    setb p.

    clr p.8

    clr p.1

    clr p.6

    '6:c'ne a,Y5d,'5

    clr p.

    clr p.8

    setb p.1

    05

  • 8/13/2019 RFID robot

    55/68

  • 8/13/2019 RFID robot

    56/68

  • 8/13/2019 RFID robot

    57/68

    clr col

    'nb ro,l8

    'nb ro8,l5

    'nb ro1,lC

    'nb ro6,l8

    setb col

    clr col8

    'nb ro,l1

    'nb ro8,l0

    'nb ro1,l

    'nb ro6,l88

    setb col8

    clr col1

    'nb ro,l6

    'nb ro8,l+

    'nb ro1,l/

    'nb ro6,l81

    setb col1

    mo! kp,Yh

    ret

    l8:mo! kp,Y8d

    ret

    l1:mo! kp,Y1d

    ret

    l6:mo! kp,Y6d

    ret

    0C

  • 8/13/2019 RFID robot

    58/68

    l5:mo! kp,Y5d

    ret

    l0:mo! kp,Y0d

    ret

    l+:mo! kp,Y+d

    ret

    lC:mo! kp,YCd

    ret

    l:mo! kp,Yd

    ret

    l/:mo! kp,Y/d

    ret

    l8:mo! kp,Y8d

    ret

    l88:mo! kp,Y88d

    ret

    l81:mo! kp,Y81d

    ret

    keyaction:

    mo! a,kp

    anl a,Y%h

    mo! kpl,a

    mo! leddsp,kpl

    ret

    0

  • 8/13/2019 RFID robot

    59/68

    CONC

  • 8/13/2019 RFID robot

    60/68

  • 8/13/2019 RFID robot

    61/68

    APPENDIX 2

    AT89S52 INSTRUCTION SET

    ependin" on operation they per%orm, all instructions are di!ided in se!eral "roups:

    -rithmetic )nstructions

    =ranch )nstructions

    ata Trans%er )nstructions

    Io"ic )nstructions

    =it4oriented )nstructions

    Arit,m"tic In%truction%

    -rithmetic instructions per%orm se!eral basic operations such as addition, subtraction,

    di!ision, multiplication etc

    Ta!l" A00"ndi 2.1 Arit,m"tic In%truction%

    ARITH/ETIC IN#TRUCTION#

    /n"monic D"%cri0tion B$t" C$

    - -,*n -dds the re"ister to the accumulator 8 8

    - -,direct -dds the direct byte to the accumulator 1 1

    - -,Z*i -dds the indirect *-( to the accumulator 8 1

    - -,Ydata -dds the immediate data to the accumulator 1 1

    -2 -,*n -dds the re"ister to the accumulator ith a carry %la" 8 8

    -2 -,direct -dds the direct byte to the accumulator ith a carry %la" 1 1

    -2 -,Z*i -dds the indirect *-( to the accumulator ith a carry %la" 8 1

    -2 -,Ydata -dds the immediate data to the accumulator ith a carry %la" 1 1

    S3== -,*n Subtracts the re"ister %rom the accumulator ith a borro 8 8

    S3== -,direct Subtracts the direct byte %rom the accumulator ith a borro 1 1

    +8

  • 8/13/2019 RFID robot

    62/68

    S3== -,Z*i Subtracts the indirect *-( %rom the accumulator ith a borro 8 1

    S3== -,Ydata Subtracts the immediate data %rom the accumulator ith a borro 1 1

    )N2 - )ncrements the accumulator by 8 8 8

    )N2 *n )ncrements the re"ister by 8 8 1

    )N2 *x )ncrements the direct byte by 8 1 6

    )N2 Z*i )ncrements the indirect *-( by 8 8 6

    92 - ecrements the accumulator by 8 8 8

    92 *n ecrements the re"ister by 8 8 8

    92 *x ecrements the direct byte by 8 8 1

    92 Z*i ecrements the indirect *-( by 8 1 6

    )N2 #T* )ncrements the ata #ointer by 8 8 6

    (3I -= (ultiplies - and = 8 0

    ); -= i!ides - by = 8 0

    - - ecimal ad'ustment o% the accumulator accordin" to =2 code 8 8

    Branc, In%truction%

    There are to kinds o% branch instructions:

    3nconditional 'ump instructions: upon their execution a 'ump to a ne location %romhere the pro"ram continues execution is executed.

    2onditional 'ump instructions: a 'ump to a ne pro"ram location is executed only i% a

    speci%ied condition is met. ?therise, the pro"ram normally proceeds ith the next

    instruction.

    Ta!l" A00"ndi 2.2 Branc, In%truction%

    BRANCH IN#TRUCTION#

    /n"monic D"%cri0tion B$t" C$

    -2-II addr88 -bsolute subroutine call 1 +

    I2-II addr8+ Ion" subroutine call 6 +

    +1

  • 8/13/2019 RFID robot

    63/68

    *9T *eturns %rom subroutine 8 5

    *9T) *eturns %rom interrupt subroutine 8 5

    -D(# addr88 -bsolute 'ump 1 6

    ID(# addr8+ Ion" 'ump 6 5

    SD(# relShort 'ump @%rom >81 to P81C locations relati!e to the %olloin"

    instructionA1 6

    D2 rel Dump i% carry %la" is set. Short 'ump. 1 6

    DN2 rel Dump i% carry %la" is not set. Short 'ump. 1 6

    D= bit,rel Dump i% direct bit is set. Short 'ump. 6 5

    D=2 bit,rel Dump i% direct bit is set and clears bit. Short 'ump. 6 5

    D(# Z-P#T* Dump indirect relati!e to the #T* 8 1

    D[ rel Dump i% the accumulator is 7ero. Short 'ump. 1 6DN[ rel Dump i% the accumulator is not 7ero. Short 'ump. 1 6

    2DN9 -,direct,rel2ompares direct byte to the accumulator and 'umps i% not e&ual.

    Short 'ump.6 5

    2DN9 -,Ydata,rel2ompares immediate data to the accumulator and 'umps i% not

    e&ual. Short 'ump.6 5

    2DN9 *n,Ydata,rel2ompares immediate data to the re"ister and 'umps i% not e&ual.

    Short 'ump.6 5

    2DN9

    Z*i,Ydata,rel

    2ompares immediate data to indirect re"ister and 'umps i% not

    e&ual. Short 'ump. 6 5

    DN[ *n,rel ecrements re"ister and 'ump i% not . Short 'ump. 1 6

    DN[ *x,rel ecrements direct byte and 'ump i% not . Short 'ump. 6 5

    N?# No operation 8

    +6

  • 8/13/2019 RFID robot

    64/68

    Data Tran%"r In%truction%

    ata trans%er instructions mo!e the content o% one re"ister to another. The re"ister the

    content o% hich is mo!ed remains unchan"ed. )% they ha!e the su%%ix JU @(?;JA, the

    data is exchan"ed ith external memory.

    Ta!l" A00"ndi 2.& Data Tran%"r In%truction%

    DATA TRAN#'ER IN#TRUCTION#

    Mnemonic D"%cri0tion B$t" C$

    (?; -,*n (o!es the re"ister to the accumulator 8

    (?; -,direct (o!es the direct byte to the accumulator 1

    (?; -,Z*i (o!es the indirect *-( to the accumulator 8

    (?; -,Ydata (o!es the immediate data to the accumulator 1

    (?; *n,- (o!es the accumulator to the re"ister 8

    (?; *n,direct (o!es the direct byte to the re"ister 1

    (?; *n,Ydata (o!es the immediate data to the re"ister 1

    (?; direct,- (o!es the accumulator to the direct byte 1

    (?; direct,*n (o!es the re"ister to the direct byte 1

    (?; direct,direct (o!es the direct byte to the direct byte 6

    (?; direct,Z*i (o!es the indirect *-( to the direct byte 1

    (?; direct,Ydata (o!es the immediate data to the direct byte 6

    (?; Z*i,- (o!es the accumulator to the indirect *-( 8

    (?; Z*i,direct (o!es the direct byte to the indirect *-( 1

    (?; Z*i,Ydata (o!es the immediate data to the indirect *-( 1

    (?;

    #T*,Ydata(o!es a 8+4bit data to the data pointer 6

    +5

  • 8/13/2019 RFID robot

    65/68

    (?;2

    -,Z-P#T*

    (o!es the code byte relati!e to the #T* to the accumulator

    @addressQ-P#T*A8

    (?;2

    -,Z-P#2

    (o!es the code byte relati!e to the #2 to the accumulator

    @addressQ-P#2A8

    (?;J -,Z*i (o!es the external *-( @4bit addressA to the accumulator 8 64

    (?;J-,Z#T*

    (o!es the external *-( @8+4bit addressA to the accumulator 8 64

    (?;J Z*i,- (o!es the accumulator to the external *-( @4bit addressA 8 54

    (?;J

    Z#T*,-(o!es the accumulator to the external *-( @8+4bit addressA 8 54

    #3SH direct #ushes the direct byte onto the stack 1

    #?# direct #ops the direct byte %rom the stack

  • 8/13/2019 RFID robot

    66/68

    Bitori"nt"d In%truction%

    ++

    !#$%C %&T'(CT%#&

    /n"monic Description B$t" C$c

    -NI -,*n -N re"ister to accumulator 8 8

    -NI -,direct -N direct byte to accumulator 1 1

    -NI -,Z*i -N indirect *-( to accumulator 8 1

    -NI -,Ydata -N immediate data to accumulator 1 1

    -NI direct,- -N accumulator to direct byte 1 6

    -NI direct,Ydata -N immediae data to direct re"ister 6 5

    ?*I -,*n ?* re"ister to accumulator 8 8

    ?*I -,direct ?* direct byte to accumulator 1 1

    ?*I -,Z*i ?* indirect *-( to accumulator 8 1

    ?*I direct,- ?* accumulator to direct byte 1 6

    ?*I direct,Ydata ?* immediate data to direct byte 6 5

    J*I -,*n 9xclusi!e ?* re"ister to accumulator 8 8

    J*I -,direct 9xclusi!e ?* direct byte to accumulator 1 1

    J*I -,Z*i 9xclusi!e ?* indirect *-( to accumulator 8 1

    J*I -,Ydata 9xclusi!e ?* immediate data to accumulator 1 1

    J*I direct,- 9xclusi!e ?* accumulator to direct byte 1 6

    J?*I direct,Ydata 9xclusi!e ?* immediate data to direct byte 6 5

    2I* - 2lears the accumulator 8 8

    2#I - 2omplements the accumulator @8Q, Q8A 8 8

    SW-# - Saps nibbles ithin the accumulator 8 8

    *I - *otates bits in the accumulator le%t 8 8

    *I2 - *otates bits in the accumulator le%t throu"h carry 8 8

    ** - *otates bits in the accumulator ri"ht 8 8

    **2 - *otates bits in the accumulator ri"ht throu"h carry 8 8

  • 8/13/2019 RFID robot

    67/68

    Similar to lo"ic instructions, bit4oriented instructions per%orm lo"ic operations. The

    di%%erence is that these are per%ormed upon sin"le bits.

    Ta!l" A00"ndi 2.) BitOri"nt"d In%truction%

    +C

    BITORIENTED IN#TRUCTION#

    Mnemonic D"%cri0tion B$t" C$c

    2I* 2 2lears the carry %la" 8 8

    2I* bit 2lears the direct bit 1 6

    S9T= 2 Sets the carry %la" 8 8

    S9T= bit Sets the direct bit 1 62#I 2 2omplements the carry %la" 8 8

    2#I bit 2omplements the direct bit 1 6

    -NI 2,bit -N direct bit to the carry %la" 1 1

    -NI 2,

  • 8/13/2019 RFID robot

    68/68