micro-controller based eight

Upload: sudheer-raghu

Post on 08-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Micro-Controller Based Eight

    1/15

    MicroMicro--ControllerControllerBased EightBased EightChannel Analog Data AcquisitionChannel Analog Data Acquisition

    SystemSystem

  • 8/7/2019 Micro-Controller Based Eight

    2/15

    DescriptionDescription:: Technology advancements take place, so there is a need forTechnology advancements take place, so there is a need for

    better methods to operate plants and improve processes.better methods to operate plants and improve processes.

    The data acquisition system so becomes essential part of anyThe data acquisition system so becomes essential part of anyautomated system.automated system.

    DAS project digitizes eight analog inputs by using multiplexer andDAS project digitizes eight analog inputs by using multiplexer andA/D converter.A/D converter.

    The digitized analog samples processed and transmitted throughThe digitized analog samples processed and transmitted throughRS485 serial bus using MODBUS protocol.RS485 serial bus using MODBUS protocol.

    The 8051 core microThe 8051 core micro--controller will be used to run and controlcontroller will be used to run and controlthese activities.these activities.

  • 8/7/2019 Micro-Controller Based Eight

    3/15

  • 8/7/2019 Micro-Controller Based Eight

    4/15

  • 8/7/2019 Micro-Controller Based Eight

    5/15

    Objectives:Objectives:

    Learning the architecture of 8051 MicroLearning the architecture of 8051 Micro--Controller and itsController and itsInterfacing.Interfacing.

    Learning about hardware interfacing techniques, such asLearning about hardware interfacing techniques, such asMultiplexer, A/D converter,RS485 Serial Bus, PowerMultiplexer, A/D converter,RS485 Serial Bus, PowerDistribution.Distribution.

    Learning about Embedded Software coding techniques.Learning about Embedded Software coding techniques.Examples: VB, embedded c etc.Examples: VB, embedded c etc.

    Learning about MODBUS protocolLearning about MODBUS protocolimplementation on RS485implementation on RS485serial bus.serial bus.

  • 8/7/2019 Micro-Controller Based Eight

    6/15

    Project Activities:Project Activities:

    Schematic diagram preparation.Schematic diagram preparation.

    Material procurement and assembling of Hardware.Material procurement and assembling of Hardware.

    Passive and Active checking of Hardware.Passive and Active checking of Hardware.

    Checking the individual sections of the Hardware by writingChecking the individual sections of the Hardware by writingsection wise software drivers.section wise software drivers.

    Control logic flow chart preparation and coding.Control logic flow chart preparation and coding.

    Functional checking and evaluation.Functional checking and evaluation.

    Project documentation.Project documentation.

  • 8/7/2019 Micro-Controller Based Eight

    7/15

    8051 micro8051 micro--controller:controller:

    It provides many functions (It provides many functions (CPUCPU,, RAMRAM,, ROMROM,, I/OI/O,, interruptinterrupt logic,logic,timertimer, etc.) in a single, etc.) in a single packagepackage..

    yy 88--bitbit ALUALU, Accumulator and 8, Accumulator and 8--bit Registers; hence it is anbit Registers; hence it is an 88--bitbitmicrocontrollermicrocontroller..

    OnOn--chip RAMchip RAM 128128 bytesbytes 88--bitbit data busdata bus It can access 8 bits ofIt can access 8 bits ofdata in one operation.data in one operation.

    1616--bitbit address busaddress bus It can access 216 memory locationsIt can access 216 memory locations 6464 KBKB(65536 locations) each of RAM and ROM.(65536 locations) each of RAM and ROM.

    OnOn--chip ROMchip ROM 44 kByte (program memory).kByte (program memory).

    FourFour bytebyte bibi--directionaldirectional input/outputinput/output port.port.

    UART (UART (serial portserial port).).

    Two 16Two 16--bit Counter/bit Counter/timerstimers..

    TwoTwo--levellevel interruptinterrupt priority.priority.

    Power savingPower saving mode (on some derivatives ).mode (on some derivatives ).

  • 8/7/2019 Micro-Controller Based Eight

    8/15

    Some of the features that have made theSome of the features that have made the

    8051 popular are:8051 popular are:

    88--bit data busbit data bus

    1616--bit address busbit address bus

    32 general purpose registers each of 8 bits32 general purpose registers each of 8 bits

    16 bit timers (usually 2, but may have more, or less).16 bit timers (usually 2, but may have more, or less).

    3 internal and 2 external interrupts.3 internal and 2 external interrupts. Bit as well as byte addressable RAM area of 16 bytes.Bit as well as byte addressable RAM area of 16 bytes.

    Four 8Four 8--bit ports, (short models have two 8bit ports, (short models have two 8--bit ports).bit ports).

    1616--bit program counter and data pointerbit program counter and data pointer

  • 8/7/2019 Micro-Controller Based Eight

    9/15

    PortsPorts::

    There are 4 8There are 4 8--bit ports: P0, P1, P2 and P3.bit ports: P0, P1, P2 and P3.

    PORT P1 (Pins 1 to 8):PORT P1 (Pins 1 to 8): The port P1 is a general purposeThe port P1 is a general purposeinput/output port which can be used for a variety of interfacinginput/output port which can be used for a variety of interfacing

    tasks. The other ports P0, P2 and P3 have dual roles or additionaltasks. The other ports P0, P2 and P3 have dual roles or additionalfunctions associated with them based upon the context of theirfunctions associated with them based upon the context of theirusage.usage.

    PORT P3 (Pins 10 to 17):PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port,PORT P3 acts as a normal IO port,but Port P3 has additional functions such as, serial transmit andbut Port P3 has additional functions such as, serial transmit andreceive pins, 2 external interrupt pins, 2 external counter inputs,receive pins, 2 external interrupt pins, 2 external counter inputs,read and write pins for memory access.read and write pins for memory access.

  • 8/7/2019 Micro-Controller Based Eight

    10/15

    PORT P2 (pins 21 to 28):PORT P2 (pins 21 to 28): PORT P2 can also be used as aPORT P2 can also be used as a

    general purpose 8 bit port when no external memory is present,general purpose 8 bit port when no external memory is present,but if external memory access is required then PORT P2 will act asbut if external memory access is required then PORT P2 will act asan address bus in conjunction with PORT P0 to access externalan address bus in conjunction with PORT P0 to access externalmemory. PORT P2 acts as A8memory. PORT P2 acts as A8--A15, as can be seen from fig.A15, as can be seen from fig.

    PORT P0 (pins 32 to 39):PORT P0 (pins 32 to 39): PORT P0 can be used as a generalPORT P0 can be used as a general

    purpose 8 bit port when no external memory is present, but ifpurpose 8 bit port when no external memory is present, but ifexternal memory access is required then PORT P0 acts as aexternal memory access is required then PORT P0 acts as amultiplexed address and data bus that can be used to accessmultiplexed address and data bus that can be used to access

    external memory in conjunction with PORT P2. P0 acts as AD0external memory in conjunction with PORT P2. P0 acts as AD0--AD7.AD7.

  • 8/7/2019 Micro-Controller Based Eight

    11/15

    8051 Diagram8051 Diagram::

  • 8/7/2019 Micro-Controller Based Eight

    12/15

    Programming:Programming:

    There are variousThere are various highhigh--level programming languagelevel programming language compilers forcompilers forthe 8051the 8051. Several. Several CC compilers are available for the 8051, most ofcompilers are available for the 8051, most ofwhich feature extensions that allow the programmer to specifywhich feature extensions that allow the programmer to specifywhere each variable should be stored in its six types of memory,where each variable should be stored in its six types of memory,and provide access to 8051 specific hardware features such as theand provide access to 8051 specific hardware features such as the

    multiple register banks and bit manipulation instructionsmultiple register banks and bit manipulation instructions..

    There are many commercial C compilers.There are many commercial C compilers. SDCCSDCC is a popular openis a popular opensource c compiler.source c compiler.

    Other highlevel languages such asOther highlevel languages such as ForthForth,, BASICBASIC,, PascalPascal//ObjectObjectPascalPascal,, PL/MPL/M andand ModulaModula--22 are available for the 8051, but theyare available for the 8051, but they

    are less widely used than C andare less widely used than C and assembly.assembly.

  • 8/7/2019 Micro-Controller Based Eight

    13/15

    RS485:RS485:

    The Electronics Industry Association (EIA) RecommendedThe Electronics Industry Association (EIA) RecommendedStandard (RS) number 485 is theStandard (RS) number 485 is the

    foundational hardware fabric for Field Bus networks. It is designedfoundational hardware fabric for Field Bus networks. It is designed

    to provide bito provide bi--directionaldirectional halfhalf--duplex multiduplex multi--point data communications over a single twopoint data communications over a single two--

    wire bus. Fullwire bus. Full--duplex operationduplex operation

    is accomplished using a fouris accomplished using a four--wire, twowire, two--bus, network thatbus, network thatcompletes the process loop from sensorcompletes the process loop from sensor

    to processor to actuator, and so on. The data bus can be up toto processor to actuator, and so on. The data bus can be up to

    4,000 feet in length with a data4,000 feet in length with a data rate at approximately 100 kbps. The maximum data rate is 10rate at approximately 100 kbps. The maximum data rate is 10

    Mbps, or so, for short runs,Mbps, or so, for short runs,

    trading off distance for speed.trading off distance for speed.

  • 8/7/2019 Micro-Controller Based Eight

    14/15

    MODBUS:MODBUS:

    ModbusModbus is a serialis a serial communications protocolcommunications protocol published bypublished byModiconModicon in 1979 for use with itsin 1979 for use with its programmable logic controllersprogrammable logic controllers(PLCs).(PLCs).

    ModbusModbus allows for communication between many devicesallows for communication between many devices

    connected to the same network, for example a system thatconnected to the same network, for example a system thatmeasures temperature and humidity and communicates themeasures temperature and humidity and communicates theresults to aresults to a computercomputer..

    ModbusModbus is often used to connect a supervisory computer with ais often used to connect a supervisory computer with aremote terminal unitremote terminal unit (RTU) in supervisory control and(RTU) in supervisory control and datadataacquisitionacquisition ((SCADASCADA) systems.) systems.

  • 8/7/2019 Micro-Controller Based Eight

    15/15

    THANK YOUTHANK YOU