19322492444e0acadc584908.38747942.traning report pdf

Upload: anandita-malik

Post on 07-Apr-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    1/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 1

    Company Profile

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    2/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 2

    EUREKA ELECTROSOFT SOLUTIONS PVT. LTD (EESPL)

    ..making IT happen

    Augmentation is a dream virtue of every performer we at EESPL

    envisaged on a theme for providing a new epitome of IT solutions in theembedded Telecom & Software based Product development services. Ouredge right from the start was creating a perceptible differentiation among theplethora of communized IT solutions.

    EESPL - where progress is a winning habit

    Eureka ElectroSoft Solutions Pvt. Ltd. (EESPL) i s primarily operating asa registered R & D lab for the development and conception of AdvancedAutomation related software and hardware solutions. Our expertise includeselectronics and software based stand alone solutions as well as combinedintegrated solutions termed as Electrosoft Solutions. At EESPL over theyears we have developed a core competency to maximize the quality &innovation parameter while working on any task. Our proven valueshave made us as a prime leader in providing customized solutions.

    It is our stiff endeavor to amplify our clients viewpoints and to carve uptheir thoughts. This in turn is transformed into factual scenario

    working models with a collection of prime technological aspects. All this isand much more in the shortest turnaround period.

    EESPL the background and essence of operations

    The year 2002 witnessed the birth of a visualization which was to imparteconomy with a pinnacle swiftness of innovation in contemporary IndustrialIT Solutions. There came EESPL and a new chapter of imparting excellencein IT techniques came into subsistence.

    That was the foundation and today the road voyaged by EESPLencompasses years of reliance, accomplishments and above all unlimitedbonds. Bonds that speak for themselves, relationships that reflect factualprogress. Triumph at EESPL is defined as the never ending smile on ourdear customers face. At EESPL we do not impart conception, we createendearing teams.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    3/108

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    4/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 4

    Vision & Mission :

    Our corporate vision is to provide a fully functional IT platform to all

    complex tasks thereby inducing a greater sense of effectiveness and toconsistently create value for money, by providing solutions which enable ourcustomers to achieve excellence and sustainable competitive edge.

    Mission target

    Our mission statement is to provide endearing technologies of future in thepresent era and for that we are committed to develop innovative and themost valuable solutions to our customers as our motto is Changing Ideas

    into Reality .

    Our Core Values:

    InnovationFlexibility is the key to our offerings, and intrinsic to this flexibility, is thespirit of Innovation that we bring to our products and services - from the very firststage of design to implementation and customer support.

    CompetenceAt EESPL we always pride ourselves on the vision, skills, expertise andprofessionalism of our team. Our team members make use of their keenCompetence to foresee industry trends and meet demanding customerneeds. And the working of their collective minds in a highly supportiveenvironment ensures that our products and services retain a competitive edgeat all times.

    Quality Objectives

    Quality forms the basis of our work culture. To impart the right and theleading technology, we follow the most rigorous norms. Each of our productstage goes through multi check points. Every possible situation is thought of and a remedial action is built in. The presence of our dedicated Quality

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    5/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 5

    Analysis team makes sure that the minutest details are met with precision.We fully understand the global quality perspective and we follow in tandemwith the same.

    QUALITY TESTING

    Extensive industry exposure, expanded skills and comprehensive experiencein executing key projects for reputed global companies enable us to bringworld-class technology, true-value professional expertise & immenseknowledge of successful project management.

    Quality Assurance is one of the key focus areas and once a solution isdeveloped, our Software Testing Team steps in to perform the rigorousrituals, required to deliver a robust, flawless product/application. Softwaretesting at Olive is performed at several points in the Software DevelopmentLife Cycle (SDLC), as an application is constructed component bycomponent into a functioning system. Our qualified testers carry out intensetesting for bugs and flaws and fix the same - all within the strictest time

    frame.

    CUSTOMER SUPPORT AND FEEDBACK REVIEWEESPL at your doorstep

    Ensuring total customer satisfaction is E ESPLs forte and the company hasimplemented an effective customer relationship management strategy forincreased efficiency and overall success. From project kick-off to customersign-off, Eureka's dedicated Managers will work in tandem with you and

    provide round-the-clock updates on project status. They also solve problems,answer queries and give instant feedback. Eureka provides 24x7 onlinesupport, proposed (each customer query will be immediately recorded and aticket number will be issued for future reference).

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    6/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 6

    After the project delivery, each customer is requested to provide feedback ona number of relevant criteria such as delivery schedule, product quality,issue resolution, communication, risk management, knowledge andprofessionalism. After obtaining the critical information through relevantquestionnaires, we make an in-depth analysis of the valuable data andmeasure customer satisfaction at all levels. EESPL also encourages peerreviews for enhancing cross-functional co-ordination and strengtheningquality initiatives

    Olive believes in partnerships - partnerships that develop into mutuallybeneficial symbiotic relationships brandishing the competitive edges of both.With Olive's Internet technology as expertise, you can compete with theworld's premium e-business solution providers and develop a technology

    EESPL not just delivers online presence but specializes in employing itstechnology to help clients make the most of their online presence. Westrategize and impart technical applications, marketing and design skillsrequired maximizing a company's online potential.

    WHY EESPL

    Well, its got to be somebody. Why not us? Of course, you are the best judgewhen it comes to choosing a technology partner and we leave that for you todecide. Our goal is only to provide a clear and detailed insight into yourproject work and possible expansion plan when the time comes. First andforemost, we never compromise on quality. Any and all work, big or small,is important to us. We believe in delivering high quality products thatexceeds clients expectations. Second, our experienced architects help youdesign a product that is far more powerful and open when it comes toenhancements. Third, we are delivery oriented and believe in delivering nomatter what it takes. We provide cost effect solutions at competitive pricesto ensure your ROI is high and budget is well under control. With those said,we leave the call on you to decide Why us?

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    7/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 7

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    8/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 8

    Eureka Electronics & Embedded Solutions (E3S):

    Mastering the art of aptness

    Electronic product design is the result of integrated proficiency covering both thesoftware and the electronic/hardware design facets. With our proficient Design Centre onthe anvil, a panel of devoted experienced engineers works as a team to provide a highlyreceptive and customized service solutions. Each perspective of customer service isperformed with paramount flawlessness thereby inducing a path full of aptness. At E3Sorder goes hand in hand with the final conclusion. We very well understand the throb of the client and it is our primary intent to form a cohesive plan of action. Understanding ona common platform with the client forms the chief medium of our achievement.

    Components of our Project work putting able brains to work

    Converting simple ideas to real time products Enhancing the performance aptitude of existing products In depth investigations into offered technologies Testing & Verifications of numerous assignments

    The Execution Schedule implementing the knowledge minds

    What we require is simply a brief of the requirements, which can be documented or canbe the result of an able discussion. The upshot of the same is a firm proposal from ourside which is entirely Free of cost.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    9/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 9

    Eureka Telecom & Infrastructure Services(ETIS):

    Connecting Emotions

    Our venture into the turf of Telecom Network Services has been under the aegis of Eureka Telecom Solutions . Our principal focal point in this sphere is to fuse diverseexpertise for catering to Telecom Networking, Communication & Infrastructuremaintenance needs of globally distributed Enterprises and Telecom Carriers ( GSM &CDMA ).

    Our laurels in segment sector include associations with variety of renowned Telecomplayers such as SPICE, VODAFONE, RELIANCE, ERICSSON, SIEMENS, NOKIA

    and ZTE. On the offerings are telecom site installation and commissioning, BSC &Transcoder Installation & Commissioning, BSS support and Maintenance, Installation of MSCs, Electrical resourcing and installation. In addition to above utilities, we are alsodiligently developing hardware and software based automation gear for TELECOMsector.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    10/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 10

    Eureka Smart Software Solutions(E3S) :

    Placing Thoughts into Implementation

    Software Development at E3S forms a perceptible and exceedingly expertised servicewhich gratifies to the requirements of landmark technology projects for softwarecompanies and large enterprise clients. The spotlight of this function is to generate aeminent conception with faster time to-market and condensed engineering costs. Workinghand in glove with our clientele, their personalized wants for product developmentprojects are met with absolute knack.

    Another pioneering concept envisaged by E3S is the provision of software architecture

    analysis to make certain the solution being offered can be capably designed, developedand supported. E3S proficiency extents to various industry facades and technologyspectrums. Our association with customers inculcates an innovative wave of productdevelopment which in turn creates intelligent solutions that drastically cut downoperating costs. All this momentum adds to greater induced efficiency. Some real lifetechnologies covered by us in software development are: Desktop and Webapplications, Client/Server based applications, Telecom related software tools development , Biometric based identification and account solutions , RFID basedapplications , Biomedical Viewers and related software development, Imageprocessing and enhancement tools, GSM/CDMA based bulk SMS alerting systems,Reengineering and Migration etc.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    11/108

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    12/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 12

    Eureka Human Resources & Turnkey Support Solutions(EHRTSS)

    Fostering Proficient Intellect

    Todays contemporary industry requires dexterous wits to work on extensive globaldares. We fully recognize the types of individuals required for high end IT programmes.Human resources form the base of every organization and we also have a share in puttingweight to this base. We provide capable man power in fine execution of complexed ITprogrammes. Noted professionals from various fields are on our database, hence we havedistinguished corporates, like Vodafone and Spice Telecommunications on our clientlist.

    Benefits to an operator

    prompt deployment of resourcescomplete compliant with local work regulationsProvision of unrestricted series of skillsExistence of skilled consultants with training on precise equipment & software.

    The alternative also exists wherein the entire project can be executed by us on turn keybasis. Examples of turnkey work we provide are Line Of Sight Survey, RF and TRPlanning, Pre-Bid and Swap-outs

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    13/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 13

    Eureka Project Kits and Spares (EPKS)

    For an Uninterrupted Performance & Adept Learning

    EEAST is today a well trusted partner of thousands of hobbyists, OEMs, Colleges, schools,repair shops and Government Organizations for electronics kits and spares. Our wide range of stock comprises of everything ranging from electronics components to test instruments andextending to educational kits. Principally we deal in Project oriented Hardware kits, Robotickits, Device Programmers, Development Boards, Software tools, Components etc. Theseinventive kits are of leading advantage for engineering students from all branches. Their projectscan be developed with simplicity using these kits as they are very undemanding to grasp andemploy. Component resourcing for the students at their own places with the minimum marketcost is also undertaken by us.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    14/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 14

    Training Modules

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    15/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 15

    Introduction

    Technology has rapidly grown in past two-three decades. An engineer without

    practical knowledge and skills cannot survive in this technical era. Theoretical

    knowledge does matter but it is the practical knowledge that is the difference

    between the best and the better. Organizations also prefer experienced engineers

    than fresher ones due to practical knowledge and industrial exposure of the

    former. So industrial exposure is mandatory for engineers nowadays. The practical

    training is highly conductive for solid foundation for:

    1) Knowledge and personality. 2) Confidence building 3) Enhancement of creativity.

    Embedded Systems are present every where around us like from a simple digitalwrist watch to the most complex satellite space ships. All entities involvingautomation are equipped with embedded systems.

    At the core of every embedded system there is either a microprocessor or amicrocontroller or any other programmable intelligent unit that works with theother interfaced units to make a complete working product. So in ongoingcutthroat competition it is mandatory for every engineer to understand and becomeproficient in this upcoming technology.

    Embedded systems are computers which are part of special-purpose devices. Dueto the limited duties these systems can be highly optimized to the particular needs.Traditionally most of these systems are used for control and process measurement,as a side-effect of higher integration of integrated circuits more complex

    applications can be solved by embedded systems. To be able to solve theseproblems, embedded systems are commonly equipped with various kinds of peripherals. Early applications of embedded devices include the guidancecomputer of the Minuteman I missiles and the Apollo guidance computer. TheMinuteman I & II missiles are intercontinental ballistic nuclear warheads,

    produced by Boeing in the 1960s. Due to the large quantities of ICs used in theguidance system of Minuteman II missiles, prices for ICs fell from 1000$ each to3$ each. This lead to wide adoption of embedded systems in consumer electronics

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    16/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 16

    in the 1980s. Nowadays embedded systems can be found in devices from digitalwatches to traffic-control systems. The broad range of applications with totallydifferent requirements lead to various implementation approaches. The range of hardware used in embedded systems reaches from FPGAs to full blown desktopCPUs which are accompanied by special purpose ICs such as DSPs. On thesoftware side, depending on the needs, everything, from logic fully implementedin hardware, to systems with own operating system and different applicationsrunning on it, can be found.

    '

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    17/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 17

    Module -1

    POWER SUPPLY DESCRIPTION:

    The power supply circuit comprises of four basic parts:

    The transformer steps down the 220 V a/c. into 12 V a/c. The transformerwork on the principle of magnetic induction, where two coils: primary andsecondary are wound around an iron core. The two coils are physicallyinsulated from each other in such a way that passing an a/c. current throughthe primary coil creates a changing voltage in the primary coil and achanging magnetic field in the core. This in turn induces a varying a/c.voltage in the secondary coil.The a/c. voltage is then fed to the bridge rectifier. The rectifier circuit is usedin most electronic power supplies is the single-phase bridge rectifier withcapacitor filtering, usually followed by a linear voltage regulator. A rectifiercircuit is necessary to convert a signal having zero average value into a non-zero average value. A rectifier transforms alternating current into direct

    TRANSFORMER SHUNTCAPACITOR

    BRIDGERECTIFIER

    VOLTAGEREGULATOR

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    18/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 18

    current by limiting or regulating the direction of flow of current. The outputresulting from a rectifier is a pulsating D.C. voltage. This voltage is notappropriate for the components that are going to work through it.

    1N4007

    12-0-12 V

    1000uF

    O/P16 V

    TRANSFORMER

    The ripple of the D.C. voltage is smoothened using a filter capacitor of 1000microF 25V. The filter capacitor stores electrical charge. If it is large enoughthe capacitor will store charge as the voltage rises and give up the charge asthe voltage falls. This has the effect of smoothing out the waveform andprovides steadier voltage output. A filter capacitor is connected at therectifier output and the d.c voltage is obtained across the capacitor. Whenthis capacitor is used in this project, it should be twice the supply voltage.When the filter is used, the RC charge time of the filter capacitor must beshort and the RC discharge time must be long to eliminate ripple action. Inother words the capacitor must charge up fast, preferably with no discharge.

    When the rectifier output voltage is increasing, the capacitor charges to thepeak voltage Vm. Just past the positive peak, the rectifier output voltagestarts to fall but at this point the capacitor has +Vm voltage across it. Sincethe source voltage becomes slightly less than Vm, the capacitor will try tosend current back through the diode of rectifier. This reverse biases the

    7805

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    19/108

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    20/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 20

    range, and the output voltage remains constant within specified voltagevariation limit. The 78xx ICs are positive voltage regulators whereas 79xxICs are negative voltage regulators.

    These voltage regulators are integrated circuits designed as fixed voltageregulators for a wide variety of applications. These regulators employcurrent limiting, thermal shutdown and safe area compensation. Withadequate heat sinking they can deliver output currents in excess of 1 A.These regulators have internal thermal overload protection. It uses outputtransistor safe area compensation and the output voltage offered is in 2% and4% tolerance.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    21/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 21

    MODULE 2:

    THE MICROCONTROLER:

    In our day to day life the role of micro-controllers has been immense. They

    are used in a variety of applications ranging from home appliances, FAX

    machines, Video games, Camera, Exercise equipment, Cellular phones

    musical Instruments to Computers, engine control, aeronautics, security

    systems and the list goes on.

    MICROCONTROLLERS VERSUS MICROPROCESSORS

    What is the difference between a microprocessor and microcontroller? The

    microprocessors (such as 8086,80286,68000 etc.) contain no RAM, no ROM

    and no I/O ports on the chip itself. For this reason they are referred as

    general- purpose microprocessors. A system designer using general- purpose

    microprocessor must add external RAM, ROM, I/O ports and timers to makethem functional. Although the addition of external RAM, ROM, and I/O

    ports make the system bulkier and much more expensive, they have the

    advantage of versatility such that the designer can decide on the amount of

    RAM, ROM and I/o ports needed to fit the task at hand. This is the not the

    case with microcontrollers. A microcontroller has a CPU (a microprocessor)

    in addition to the fixed amount of RAM, ROM, I/O ports, and timer are all

    embedded together on the chip: therefore, the designer cannot add any

    external memory, I/O, or timer to it. The fixed amount of on chip RAM,

    ROM, and number of I/O ports in microcontrollers make them ideal for

    many applications in which cost and space are critical. In many applications,

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    22/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 22

    for example a TV remote control, there is no need for the computing power

    of a 486 or even a 8086 microprocessor. In many applications, the space it

    takes, the power it consumes, and the price per unit are much more critical

    considerations than the computing power. These applications most oftenrequire some I/O operations to read signals and turn on and off certain bits.

    It is interesting to know that some microcontrollers manufactures have gone

    as far as integrating an ADC and other peripherals into the microcontrollers.

    EXTERNAL

    INTERRUPTS

    TXD RXD

    MICROCONTROLLER BLOCK DIAGRAM

    INTERRUPT CONTROLON-CHIP ROM for

    program codeON-CHIP RAM

    ETC.

    TIMER 0

    SERIAL

    PORT4 I/OBUS

    CONTROLOSC

    CPU

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    23/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 23

    MICROCONTROLLERS FOR EMBEDDED SYSTEMS

    In the literature discussing microprocessors, we often see a term embedded

    system. Microprocessors and microcontrollers are widely used in embedded

    system products. An embedded product uses a microprocessor (ormicrocontroller) to do one task and one task only. A printer is an example of

    embedded system since the processor inside it performs one task only:

    namely, get data and print it. Contrasting this with a IBM PC which can be

    used for a number of applications such as word processor, print server,

    network server, video game player, or internet terminal. Software for a

    variety of applications can be loaded and run. Of course the reason a PC canperform myriad tasks is that it has RAM memory and an operating system

    that loads the application software into RAM and lets the CPU run it. In an

    embedded system, there is only one application software that is burned into

    ROM. An PC contains or is connected to various embedded products such as

    the keyboard, printer, modem, disk controller, sound card, CD-ROM driver,

    mouse and so on. Each one of these peripherals has a microcontroller inside

    it that performs only one task. For example, inside every mouse there is a

    microcontroller to perform the task of finding the mouse position and

    sending it to the PC.

    Although microcontrollers are the preferred choice for many embedded

    systems, there are times that a microcontroller is inadequate for the task. For

    this reason, in many years the manufacturers for general-purpose

    microprocessors have targeted their microprocessor for the high end of theembedded market.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    24/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 24

    INTRODUCTION TO 8051

    In 1981, Intel Corporation introduced an 8-bit microcontroller called the

    8051. This microcontroller had 128 bytes of RAM, 4K bytes of on-chip

    ROM, two timers, one serial port, and four ports (8-bit) all on a single chip.

    The 8051 is an 8-bit processor, meaning the CPU can work on only 8- bit

    pieces to be processed by the CPU. The 8051 has a total of four I/O ports,

    each 8- bit wide. Although 8051 can have a maximum of 64K bytes of on-

    chip ROM, many manufacturers put only 4K bytes on the chip.

    The 8051 became widely popular after Intel

    allowed other manufacturers to make any flavor of the 8051 they please withthe condition that they remain code compatible with the 8051. This has led

    to many versions of the 8051 with different speeds and amount of on-chip

    ROM marketed by more than half a dozen manufacturers. It is important to

    know that although there are different flavors of the 8051, they are all

    compatible with the original 8051 as far as the instructions are concerned.

    This means that if you write your program for one, it will run on any one of

    them regardless of the manufacturer. The major 8051 manufacturers are

    Intel, Atmel, Dallas Semiconductors, Philips Corporation, Infineon.

    AT89C51 FROM ATMEL CORPORATIONThis popular 8051 chip has on-chip ROM in the form of flash memory. This

    is ideal for fast development since flash memory can be erased in seconds

    compared to twenty minutes or more needed for the earlier versions of the

    8051. To use the AT89C51 to develop a microcontroller-based system

    requires a ROM burner that supports flash memory: However, a ROM eraser

    is not needed. Notice that in flash memory you must erase the entire contents

    of ROM in order to program it again. The PROM burner does this erasing of

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    25/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 25

    flash itself and this is why a separate burner is not needed. To eliminate the

    need for a PROM burner Atmel is working on a version of the AT89C51

    that can be programmed by the serial COM port of the PC.

    FEATURES OF AT89C51- 4K on-chip ROM

    - 128 bytes internal RAM (8-bit)

    - 32 I/O pins

    - Two 16-bit timers

    - Six Interrupts

    -

    Serial programming facility- 40 pin Dual-in-line Package

    PIN DESCRIPTION

    The 89C51 have a total of 40 pins that are dedicated for various functions

    such as I/O, RD, WR, address and interrupts. Out of 40 pins, a total of 32

    pins are set aside for the four ports P0, P1, P2, and P3, where each port takes8 pins. The rest of the pins are designated as Vcc, GND, XTAL1, XTAL,

    RST, EA, and PSEN. All these pins except PSEN and ALE are used by all

    members of the 8051 and 8031 families. In other words, they must be

    connected in order for the system to work, regardless of whether the

    microcontroller is of the 8051 or the 8031 family. The other two pins, PSEN

    and ALE are used mainly in 8031 based systems.

    Vcc

    Pin 40 provides supply voltage to the chip. The voltage source is +5 V.

    GND

    Pin 20 is the ground.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    26/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 26

    XTAL1 and XTAL2

    The 8051 have an on-chip oscillator but requires external

    clock to run it. Most often a quartz crystal oscillator is connected to input

    XTAL1 (pin 19) and XTAL2 (pin 18). The quartz crystal oscillatorconnected to XTAL1 and XTAL2 also needs two capacitors of 30 pF value.

    One side of each capacitor is connected to the ground.

    C2

    XTAL2

    C1

    XTAL1

    GND

    It must be noted that there are various speeds of the 8051 family. Speed

    refers to the maximum oscillator frequency connected to the XTAL. For

    example, a 12 MHz chip must be connected to a crystal with 12 MHz

    frequency or less. Likewise, a 20 MHz microcontroller requires a crystal

    frequency of no more than 20 MHz. When the 8051 is connected to a crystal

    oscillator and is powered up, we can observe the frequency on the XTAL2

    pin using oscilloscope.

    RST

    Pin 9 is the reset pin. It is an input and is active high (normally low).

    Upon applying a high pulse to this pin, the microcontroller will reset andterminate all activities. This is often referred to as a power on reset.

    Activating a power-on reset will cause all values in the registers to be lost.

    Notice that the value of Program Counter is 0000 upon reset, forcing the

    CPU to fetch the first code from ROM memory location 0000. This means

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    27/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 27

    that we must place the first line of source code in ROM location 0000 that is

    where the CPU wakes up and expects to find the first instruction. In order to

    RESET input to be effective, it must have a minimum duration of 2 machine

    cycles. In other words, the high pulse must be high for a minimum of 2machine cycles before it is allowed to go low.

    EA

    All the 8051 family members come with on-chip ROM to store programs. In

    such cases, the EA pin is connected to the Vcc. For family members such as

    8031 and 8032 in which there is no on-chip ROM, code is stored on an

    external ROM and is fetched by the 8031/32. Therefore for the 8031 the EApin must be connected to ground to indicate that the code is stored

    externally. EA, which stands for external access, is pin number 31 in the

    DIP packages. It is input pin and must be connected to either Vcc or GND.

    In other words, it cannot be left unconnected.

    PSEN

    This is an out put pin. PSEN stands for program store enable. It is

    the read strobe to external program memory. When the microcontroller is

    executing from external memory, PSEN is activated twice each machine

    cycle.

    ALE

    ALE (Address latch enable) is an output pin and is active high. When

    connecting a microcontroller to external memory, potr 0 provides both

    address and data. In other words the microcontroller multiplexes address anddata through port 0 to save pins. The ALE pin is used for de-multiplexing

    the address and data by connecting to the G pin of the 74LS373 chip.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    28/108

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    29/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 29

    Port 2

    Port 2 occupies a total of 8 pins (pins 21 to 28). It can be used

    as input or output. Just like P1, port 2 does not need any pull-up

    resistors since it has pull-up resistors internally. Upon reset port 2 isconfigured as output port. To make port 2 input, it must be

    programmed as such by writing 1s to it.

    Port 3

    Port 3 occupies a total of 8 pins (pins 10 to 17). It can be used

    as input or output. P3 does not need any pull-up resistors, the same as

    P1 and P2 did not. Although port 3 is configured as output port uponreset, this is not the way it is most commonly used. Port 3 has an

    additional function of providing some extremely important signals

    such as interrupts. Some of the alternate functions of P3 are listed

    below:

    P3.0 RXD (Serial input)

    P3.1 TXD (Serial output)

    P3.2 INT0 (External interrupt 0)

    P3.3 INT1 (External interrupt 1)

    P3.4 T0 (Timer 0 external input)

    P3.5 T1 (Timer 1 external input)

    P3.6 WR (External memory write strobe)

    P3.7 RD (External memory read strobe)

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    30/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 30

    MODULE -2

    LED INTERFACING

    Like a normal diode, an LED consists of a chip of semiconducting materialimpregnated, or doped, with impurities to create a p-n junction. As in otherdiodes, current flows easily from the p-side, or anode, to the n-side, orcathode, but not in the reverse direction. Charge-carriers electrons andholes flow into the junction from electrodes with different voltages. Whenan electron meets a hole, it falls into a lower energy level, and releasesenergy in the form of a photon. The wavelength of the light emitted, and therefore its color, depends on theband gap energy of the materials forming the p-n junction. In silicon orgermanium diodes, the electrons and holes recombine by a non-radiativetransition which produces no optical emission, because these are indirectband gap materials. The materials used for an LED have a direct band gapwith energies corresponding to near-infrared, visible or near-ultraviolet light.LED development began with infrared and red devices made with galliumarsenide. Advances in materials science have made possible the production

    of devices with ever-shorter wavelengths, producing light in a variety of colors.LEDs are usually built on an n-type substrate, with an electrode attached tothe p-type layer deposited on its surface. P-type substrates, while lesscommon, occur as well. Many commercial LEDs, especially GaN/InGaN,also use sapphire substrate. Substrates that are transparent to the emittedwavelength, and backed by a reflective layer, increase the LED efficiency.The refractive index of the package material should match the index of the

    semiconductor, otherwise the produced light gets partially reflected back into the semiconductor, where it may be absorbed and turned into additionalheat, thus lowering the efficiency. This type of reflection also occurs at thesurface of the package if the LED is coupled to a medium with a differentrefractive index such as a glass fiber or air. The refractive index of mostLED semiconductors is quite high, so in almost all cases the LED is coupled

    http://en.wikipedia.org/wiki/Diodehttp://en.wikipedia.org/wiki/Doping_%28semiconductor%29http://en.wikipedia.org/wiki/P-n_junctionhttp://en.wikipedia.org/wiki/Anodehttp://en.wikipedia.org/wiki/Cathodehttp://en.wikipedia.org/wiki/Electronhttp://en.wikipedia.org/wiki/Electron_holehttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Energy_levelhttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Photonhttp://en.wikipedia.org/wiki/Wavelengthhttp://en.wikipedia.org/wiki/Band_gaphttp://en.wikipedia.org/wiki/Siliconhttp://en.wikipedia.org/wiki/Germaniumhttp://en.wikipedia.org/wiki/Indirect_band_gaphttp://en.wikipedia.org/wiki/Indirect_band_gaphttp://en.wikipedia.org/wiki/Direct_band_gaphttp://en.wikipedia.org/wiki/Gallium_arsenidehttp://en.wikipedia.org/wiki/Gallium_arsenidehttp://en.wikipedia.org/wiki/Materials_sciencehttp://en.wikipedia.org/wiki/Wavelengthhttp://en.wikipedia.org/wiki/Sapphirehttp://en.wikipedia.org/wiki/Refractive_indexhttp://en.wikipedia.org/wiki/Refractive_indexhttp://en.wikipedia.org/wiki/Sapphirehttp://en.wikipedia.org/wiki/Wavelengthhttp://en.wikipedia.org/wiki/Materials_sciencehttp://en.wikipedia.org/wiki/Gallium_arsenidehttp://en.wikipedia.org/wiki/Gallium_arsenidehttp://en.wikipedia.org/wiki/Direct_band_gaphttp://en.wikipedia.org/wiki/Indirect_band_gaphttp://en.wikipedia.org/wiki/Indirect_band_gaphttp://en.wikipedia.org/wiki/Germaniumhttp://en.wikipedia.org/wiki/Siliconhttp://en.wikipedia.org/wiki/Band_gaphttp://en.wikipedia.org/wiki/Wavelengthhttp://en.wikipedia.org/wiki/Photonhttp://en.wikipedia.org/wiki/Energyhttp://en.wikipedia.org/wiki/Energy_levelhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electron_holehttp://en.wikipedia.org/wiki/Electronhttp://en.wikipedia.org/wiki/Cathodehttp://en.wikipedia.org/wiki/Anodehttp://en.wikipedia.org/wiki/P-n_junctionhttp://en.wikipedia.org/wiki/Doping_%28semiconductor%29http://en.wikipedia.org/wiki/Diode
  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    31/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 31

    into a much lower-index medium. The large index difference makes thereflection quite substantial (per the Fresnel coefficients) , and this is usuallyone of the dominant causes of LED inefficiency. Often more than half of theemitted light is reflected back at the LED-package and package-airinterfaces. The reflection is most commonly reduced by using a dome-shaped (half-sphere) package with the diode in the center so that theoutgoing light rays strike the surface perpendicularly, at which angle thereflection is minimized. An anti-reflection coating may be added as well.The package may be cheap plastic, which may be colored, but this is onlyfor cosmetic reasons or to improve the contrast ratio; the color of thepackaging does not substantially affect the color of the light emitted. Otherstrategies for reducing the impact of the interface reflections include

    designing the LED to reabsorb and reemit the reflected light (called photonrecycling) and manipulating the microscopic structure of the surface toreduce the reflectance, either by introducing random roughness or bycreating programmed moth eye surface patterns.Conventional LEDs are made from a variety of inorganic semiconductormaterials, producing the following colors:Aluminium gallium arsenide (AlGaAs) red and infraredAluminium gallium phosphide (AlGaP) green

    Aluminium gallium indium phosphide (AlGaInP) high-brightnessorange-red, orange, yellow, and greenGallium arsenide phosphide (GaAsP) red, orange-red, orange, and yellowGallium phosphide (GaP) red, yellow and greenGallium nitride (GaN) green, pure green (or emerald green), and bluealso white (if it has an AlGaN Quantum Barrier)Indium gallium nitride (InGaN) near ultraviolet, bluish-green and blueSilicon carbide (SiC) as substrate blueSilicon (Si) as substrate blue (under development)Sapphire (Al2O3) as substrate blueZinc selenide (ZnSe) blueDiamond (C) ultravioletAluminium nitride (AlN), aluminium gallium nitride (AlGaN), aluminiumgallium indium nitride (AlGaInN) near to far ultraviolet (down to

    http://en.wikipedia.org/wiki/Fresnel_equationshttp://en.wikipedia.org/wiki/Anti-reflection_coatinghttp://en.wikipedia.org/wiki/Semiconductor_materialshttp://en.wikipedia.org/wiki/Semiconductor_materialshttp://en.wikipedia.org/wiki/Aluminium_gallium_arsenidehttp://en.wikipedia.org/wiki/Infraredhttp://en.wikipedia.org/wiki/Aluminium_gallium_phosphidehttp://en.wikipedia.org/wiki/Aluminium_gallium_indium_phosphidehttp://en.wikipedia.org/wiki/Gallium_arsenide_phosphidehttp://en.wikipedia.org/wiki/Orange_%28color%29http://en.wikipedia.org/wiki/Yellowhttp://en.wikipedia.org/wiki/Gallium_phosphidehttp://en.wikipedia.org/wiki/Gallium_nitridehttp://en.wikipedia.org/wiki/Bluehttp://en.wikipedia.org/wiki/Indium_gallium_nitridehttp://en.wikipedia.org/wiki/Silicon_carbidehttp://en.wikipedia.org/wiki/Siliconhttp://en.wikipedia.org/wiki/Sapphirehttp://en.wikipedia.org/wiki/Zinc_selenidehttp://en.wikipedia.org/wiki/Diamondhttp://en.wikipedia.org/wiki/Aluminium_nitridehttp://en.wikipedia.org/wiki/Aluminium_gallium_nitridehttp://en.wikipedia.org/w/index.php?title=Aluminium_gallium_indium_nitride&action=edithttp://en.wikipedia.org/w/index.php?title=Aluminium_gallium_indium_nitride&action=edithttp://en.wikipedia.org/wiki/Ultraviolethttp://en.wikipedia.org/wiki/Ultraviolethttp://en.wikipedia.org/w/index.php?title=Aluminium_gallium_indium_nitride&action=edithttp://en.wikipedia.org/w/index.php?title=Aluminium_gallium_indium_nitride&action=edithttp://en.wikipedia.org/wiki/Aluminium_gallium_nitridehttp://en.wikipedia.org/wiki/Aluminium_nitridehttp://en.wikipedia.org/wiki/Diamondhttp://en.wikipedia.org/wiki/Zinc_selenidehttp://en.wikipedia.org/wiki/Sapphirehttp://en.wikipedia.org/wiki/Siliconhttp://en.wikipedia.org/wiki/Silicon_carbidehttp://en.wikipedia.org/wiki/Indium_gallium_nitridehttp://en.wikipedia.org/wiki/Bluehttp://en.wikipedia.org/wiki/Gallium_nitridehttp://en.wikipedia.org/wiki/Gallium_phosphidehttp://en.wikipedia.org/wiki/Yellowhttp://en.wikipedia.org/wiki/Orange_%28color%29http://en.wikipedia.org/wiki/Gallium_arsenide_phosphidehttp://en.wikipedia.org/wiki/Aluminium_gallium_indium_phosphidehttp://en.wikipedia.org/wiki/Aluminium_gallium_phosphidehttp://en.wikipedia.org/wiki/Infraredhttp://en.wikipedia.org/wiki/Aluminium_gallium_arsenidehttp://en.wikipedia.org/wiki/Semiconductor_materialshttp://en.wikipedia.org/wiki/Semiconductor_materialshttp://en.wikipedia.org/wiki/Anti-reflection_coatinghttp://en.wikipedia.org/wiki/Fresnel_equations
  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    32/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 32

    210 nm) With this wide variety of colors, arrays of multicolor LEDs can bedesigned to produce unconventional color patterns.

    CIRCUIT Diagram

    D3

    LED

    C?CAP NP

    D7

    LED

    D4

    LED

    D5

    LED

    D8

    LED

    U?

    AT89C52

    9

    1819 29

    30

    31

    12345678

    2122232425262728

    1011121314151617

    3938373635343332

    RSTXTAL2

    XTAL1 PSEN

    ALE/PROG

    EA/VPP

    P1.0/T2P1.1/T2-EXP1.2P1.3P1.4P1.5P1.6P1.7

    P2.0/A8P2.1/A9

    P2.2/A10P2.3/A11P2.4/A12P2.5/A13P2.6/A14P2.7/A15

    P3.0/RXDP3.1/TXD

    P3.2/INTOP3.3/INT1

    P3.4/TOP3.5/T1

    P3.6/WRP3.7/RD

    P0.0/AD0P0.1/AD1P0.2/AD2P0.3/AD3P0.4/AD4P0.5/AD5P0.6/AD6P0.7/AD7

    D1

    LED

    R1R

    40

    D2

    LED

    Y?

    CRYSTAL

    VCC

    D6

    LED

    20

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    33/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 33

    FOUR ON FOUR OFF PATTERN

    #include // This file contains the Ports and SFRaddress of 8051

    #include // This file is used to produce seconds andmilliseconds delay

    #define led P1 // 'P1' is given the another name as led, u can use'led' Or directly 'P1'

    //for programming

    void main() // main program starts from here

    {

    while (1) // Repeat forever

    {

    led=0xf0; // light on lower 4 leds '0'-> ON (11110000)secdelay(1); // 1 secdelay

    led=0x0f; // light on upper 4 leds '1'-> OFF (00001111)

    secdelay (1);

    }

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    34/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 34

    LEDS Programs

    ON OFF PATTERN

    #include //This file contains the Ports and SFR address of 8051

    #include //This file is used to produce seconds andmilliseconds delay

    #define led P1 // 'P1' is given the another name as 'led' ,u can use'led' Or directly 'P1'

    //for programming

    void main() // main program starts from here

    {

    while(1) // Infinite Loop for infinite rotation

    {

    led=0x00; // light on All 8-leds '0'-> ON

    secdelay(1); // 1 secdelay

    led=0xff; // light OFF All 8-leds '1'-> OFF

    secdelay(1);

    }

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    35/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 35

    LEDS +SWITCHES

    #include //This file contains the Ports and SFR addressof 8051

    #include //This file is used to produce seconds andmiliseconds delay

    #define led P1 // 'P1' is given the another name as 'led' ,u can use'led' Or directly 'P1'

    //for programming

    sbit s1=P3^2; // define only single bit using sbit syntex

    sbit s2=P3^3;

    sbit s3=P3^4;

    void main() // main program starts from here

    {

    led=0xff;

    while(1) // Infinite Loop for infinite rotation

    {

    if(s1==0)

    {

    led=0x00;

    secdelay(1);

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    36/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 36

    led=0xff;

    secdelay(1);

    }

    else if(s2==0)

    {

    led=0xf0;

    secdelay(1);

    led=0x0f;

    secdelay(1);

    }

    else if(s3==0)

    {

    led=0xaa;

    secdelay(1);led=0x55;

    secdelay(1);

    }

    else

    {

    led=0xff;

    }

    }

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    37/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 37

    MODULE -3

    DC MOTOR

    Circuit Diagram

    Working Principle:

    The principle upon which the d.c. motor works is very simple . If acurrent carrying conductor is placed in a magnetic field,mechanical force is experienced on the conductor, the direction of which is given by the Fleming's left hand rule and hence the

    1 2

    VCC

    Y1

    GROUND

    10UF U1

    8051

    31

    19

    18

    9

    12131415

    12345678

    3938373635343332

    21222324

    25262728

    1716

    29

    301110

    40

    20

    EA/VP

    X1

    X2

    RESET

    INT0INT1T0T1

    P1.0P1.1P1.2P1.3P1.4P1.5P1.6P1.7

    P0.0P0.1P0.2P0.3P0.4P0.5P0.6P0.7

    P2.0P2.1P2.2P2.3P2.4P2.5P2.6P2.7

    RDWR

    PSEN

    ALE/PTXDRXD

    VCC

    VSS

    SW1

    R E S E T S / W

    1

    2

    VCC

    C2

    1 2

    S3

    10K

    S11 2

    S2

    MG2

    MOTOR D

    1

    2

    U5

    UL2003

    1

    2

    3

    4

    5

    6

    7

    8 9

    10

    11

    12

    13

    14

    15

    16IN1

    IN2

    IN3

    IN4

    IN5

    IN6

    IN7

    GRD VCC

    OUT7

    OUT6

    OUT5

    OUT4

    OUT3

    OUT2

    OUT1

    DEVICE

    K1

    RELAY SPD

    35

    412

    C3

    C

    R2

    RESISTOR SIP 10

    123456789

    10

    33PF

    CRYSTAL33PF

    VCC

    C1

    R1

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    38/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 38

    conductor moves in the direction of force. The magnitude of themechanical force experienced on the conductor is given by:

    F = B Ic Lc newtons

    where B is the field strength in teslas ,Ic is the current flowing through the conductor in amperesand Lc is the length of the conductor in metres.When the motor is connected to the d.c. supply mains a directcurrent passes through the brushes and thecommutator to the armature winding ; while it passes through thecommutator it is converetd into a.c. so that the group of conductorsunder successive field poles carry currrent in the opposite

    direction. Also the direction of the currrent in the individualconductors reverse as they pass away from the influence of onepole to that of the next.

    The split phase arrangement of the motor creates two fluxes B1and B2which induces voltage around them in the rotor and under the influence of these induced voltages current flows in the rotor. The current i1 produced byflux B1 reacts with flux B2 and develops force F1.The quantities are goingto be expressed as :

    B1=B1 max . sin(wt)B2=B2 max . sin(wt + )

    It may be assumed with negligible error thet the paths in which therotor current flow has negligible self-inductance and hence therotor currents are in phase with their respective voltages.

    i1(db1/dt)=.B1max.cos wt

    i2(db2/dt)=K. B2 max.cos (wt +X)Since the two forces (f1and f2 ) developed are in opposition

    .Therefore the net force F acting on the movable element is givenas:

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    39/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 39

    F=F2-F1(B2.i1-i2.b1)F=K B1 max.B2 max sin r)

    EMF Equation:Back EMF, Eb=Flux *ZNP/60A

    whereZ= total number of armature cunductorsN= Speed in r.p.mP= total number of polesA= Total number of parallel paths.

    V= Eb + IaRaIa= (V - Eb)/Ra

    whereV = Terminal voltageIa= Armature currentRa= Armature resistanceEb= back e.m.f.

    Types of D.C. motor:(i) Permanent magnet motors: It consists of an armature and one orseveral permanent magnets encircling the armature . Field coils areusually notrequired. However some of these motors do have coilswound on the poles .

    If they exist , these coils are intended only for recharging themagnets in the event that they loose their strength.

    (ii) Seperately excited D.C. motors: These motors have field coils

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    40/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 40

    similar to those of a shunt wound machine, but the armature andfield coils are fed from diferent supply sources and may havedifferent voltage ratings.

    (iii) Series wound D.C. motor: As the name indicates, the fieldcoils,consisting of few turns of a thick wire are connected in series withthe armature. The cross-sectional area of the wire used for the fieldhas to be fairly large to carry the armature current ,but owing to thehigher current , the number of turns of wire in them need not belarge.(iv) Shunt wound D.C. motor: These motors are so named becausethey basically operate with field coils connected in parallel withthe armature. The field winding consists of a large number of turnsof comparatively fine wire so as to provide large resistance. Thefield current is much less than the armature current, sometimes aslow as 5%.(v) Compound wound D.C. motor : A compound wound D.C.motor has both shunt and series field coils. The shunt field isnormally stronger of the two. Compound wound motors are of twotypes:.(a) Cumalative compound wound motor.(b) Differential compound wound motor.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    41/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 41

    DC MOTOR PROGRAMS

    Program for PWM

    #include

    #include

    sbit dc motor=P0^5; // define the motor using sbit as dc_motor

    #define ON 1

    #define OFF 0

    void PWM(unsigned char Ton)

    {

    dc_motor=ON; // switch on the Dc motor for Tonmillisecond

    ms_delay(Ton);

    dc_motor=OFF; // switch oFF the Dc motor for (100-Ton)millisecond

    ms_delay(100-Ton);

    }

    void main()

    {

    while(1){

    PWM(50);

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    42/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 42

    }

    ON -OFF DC MOTOR

    #include

    #include

    /* define the motor using sbit as dc motor */

    sbit dc_motor=P0^5;

    #define ON 1

    #define OFF 0

    void main()

    {

    while(1)

    {

    dc_motor=ON; // switch on the Dc motor

    secdelay(3);

    dc_motor=OFF; // switch OFF the Dc motor

    secdelay(2);

    }

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    43/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 43

    MODULE -4RELAYTHE ELECTROMAGNETIC solenoid valve

    Figure no 2.15: Electromagnetic Solenoid Valve

    The electromagnetic relay consists of a multi-turn coil, wound on an iron core, to form an

    electromagnet. When the coil is energised, by passing current through it, the core becomes

    temporarily magnetised. The magnetised core attracts the iron armature. The armature is pivoted

    which causes it to operate one or more sets of contacts.

    When the coil is de-energised the armature and contacts are released. The coil can beenergised from a low power source such as a transistor while the contacts can switch highpowers such as the mains supply. The relay can also be situated remotely from the controlsource. Relays can generate a very high voltage across the coil when switched off. This candamage other components in the circuit. To prevent this a diode is connected across the coil.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    44/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 44

    As there are always some chances of high voltage spikes back from the switching circuit i.e.

    heater so an optocoupler/isolator MCT2e is used. It provides and electrical isolation between the

    microcontroller and the heater. MCT2e is a 6-pin IC with a combination of optical transmitter

    LED and an optical receiver as phototransistor. Microcontroller is connected to pin no 2 of

    MCT2e through a 470-ohm resistor. Pin no.1 is given +5V supply and pin no.4 is grounded.

    To handle the current drawn by the heater a power transistor BC-369 is used as a current driver.Pin no.5 of optocoupler is connected to the base of transistor. It takes all its output to V cc and

    activates the heater through relay circuit. The electromagnetic relay consists of a multi-turn coil,

    wound on an iron core, to form an electromagnet. When the coil is energized, by passing current

    through it, the core becomes temporarily magnetized. The magnetized core attracts the iron

    armature. The armature is pivoted which causes it to operate one or more sets of contacts. When

    the coil is de-energised the armature and contacts are released. Relays can generate a very high

    voltage across the coil when switched off. This can damage other components in the circuit. To

    prevent this a diode is connected across the coil. Relay has five points. Out of the 2 operating

    points one is permanently connected to the ground and the other point is connected to the

    collector side of the power transistor. When V cc reaches the collector side i.e. signal is given to

    the operating points the coil gets magnetized and attracts the iron armature. The iron plate moves

    from normally connected (NC) position to normally open (NO) position. Thus the heater gets the

    phase signal and is ON. To remove the base leakage voltage when no signal is present a 470-ohm

    resistance is used.

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    45/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 45

    Circuit diagram

    1 2

    VCC

    Y1

    GROUND

    10UF U1

    8051

    31

    19

    18

    9

    12131415

    12345678

    3938373635343332

    21222324

    25262728

    1716

    29

    301110

    40

    20

    EA/VP

    X1

    X2

    RESET

    INT0INT1T0T1

    P1.0P1.1P1.2P1.3P1.4P1.5P1.6P1.7

    P0.0P0.1P0.2P0.3P0.4P0.5P0.6P0.7

    P2.0P2.1P2.2P2.3P2.4P2.5P2.6P2.7

    RDWR

    PSEN

    ALE/PTXDRXD

    VCC

    VSS

    SW1

    R E S E T S / W

    1

    2

    VCC

    C2

    1 2

    S3

    10K

    S11 2

    S2

    MG2

    MOT

    1

    2

    U5

    UL2003

    1

    2

    3

    4

    5

    6

    7

    8 9

    10

    11

    12

    13

    14

    15

    16IN1

    IN2

    IN3

    IN4

    IN5

    IN6

    IN7

    GRD VCC

    OUT7

    OUT6

    OUT5

    OUT4

    OUT3

    OUT2

    OUT1

    DEVICE

    K1

    RELAY

    35

    412

    C3

    C

    R2

    RESISTOR SIP 10

    123456789

    10

    33PF

    CRYSTAL33PF

    VCC

    C1

    R1

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    46/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 46

    SIMPLE RELAY CONTROL

    #include

    #include

    sbit dev=P0^6; // define the 220v device using sbit as dev

    #define ON 1

    #define OFF 0

    void main()

    {

    while(1)

    {

    dev=ON;

    secdelay(5);

    dev=OFF;

    secdelay(3);

    }

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    47/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 47

    RELAY CONTROL WITH TIME

    #include

    #include

    #define seg_port P2 // define segment port

    sbit s1=P3^2; // define the switches using sbit as s1,s2,s3

    sbit s2=P3^3;

    sbit s3=P3^4;

    sbit dev=P0^6;

    #define delay 60

    #define ON 1

    #define OFF 0

    // array is used to store the value of data to be sent on the port todisplay

    // any digit on seven segment as below

    unsigned char

    seg_array[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};void main()

    {

    unsigned char maxlen=0;

    while(1)

    {

    seg_port=seg_array[maxlen]; // show '0' on 7 segment

    while(s3!=0) // while u not pressed switch s3the statement in this

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    48/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 48

    { //while loopwill execute

    if(s1==0) // if u press s1

    {maxlen++; // then increment value of

    maxlen by one

    if(maxlen>9) // if maxlen is > 9 then store'0' in maxlen

    maxlen=0; //Note: The above step isnecessary because we can't

    // show 2 digit value (ie. 10,11 etc) on single 7 segment

    ms_delay(223); // some delay for keydebouncing

    }

    else if(s2==0) // if u press s2

    {

    maxlen--; // then decrement maxlen byone

    if(maxlen==255) // if maxlen is equal to 255then store '9' in maxlen

    maxlen=9; // note :if u decrement anunsigned char type variable

    //when its value go below '0' the newvalue 255 is stored in it

    // so thats why the above step isnecessary

    ms_delay(223);

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    49/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 49

    }

    secdelay(1);

    seg_port=seg_array[maxlen]; // send corresponding

    data vale from array // to segment port

    }

    secdelay(1);

    while(maxlen

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    50/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 50

    MODULE -5STEPPER MOTORMotion Control, in electronic terms, means to accurately control the movement of an object based

    on either speed, distance, load, inertia or a combination of all these factors. There are numerous

    types of motion control systems, including; Stepper Motor, Linear Step Motor, DC Brush,

    Brushless, Servo, Brushless Servo and more.

    A stepper motor is an electromechanical device which converts electrical pulses into discrete

    mechanical movements. Stepper motor is a form of ac. motor .The shaft or spindle of a stepper

    motor rotates in discrete step increments when electrical command pulses are applied to it in the

    proper sequence. The motors rotation has several direct relationships to these applied input

    pulses. The sequence of the applied pulses is directly related to the direction of motor shaftsrotation. The speed of the motor shafts rotation is directly related to the frequency of the input

    pulses and the length of rotation is directly related to the number of input pulses applied [39].

    For every input pulse, the motor shaft turns through a specified number of degrees, called

    a step. Its working principle is one step rotation for one input pulse. The range of step size may

    vary from 0.72 degree to 90 degree. In position control application, if the number of input pulses

    sent to the motor is known, the actual position of the driven job can be obtained.

    A stepper motor differs from a conventional motor (CM) as under:

    a. Input to SM is in the form of electric pulses whereas input to a CM is invariably from a

    constant voltage source.

    b. A CM has a free running shaft whereas shaft of SM moves through angular steps.

    c. In control system applications, no feedback loop is required when SM is used but a

    feedback loop is required when CM is used.

    d. A SM is a digital electromechanical device whereas a CM is an analog electromechanical

    device [40].

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    51/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 51

    3.12.1Open Loop Operation

    One of the most significant advantages of a stepper motor is its ability to be accurately controlled

    in an open loop system. Open loop control means no feedback information about position is

    needed. This type of control eliminates the need for expensive sensing and feedback devices suchas optical encoders. Control position is known simply by keeping track of the input step pulses

    [39].

    Every stepper motor has a permanent magnet rotor (shaft) surrounded by a stator. The

    most common stepper motor has four stator windings that are paired with a center-tapped

    common. This type of stepper motor is commonly referred to as a four- phase stepper motor. The

    center tap allows a change of current direction in each of two coils when a winding is grounded,

    thereby resulting in a polarity change of the stator. Notice that while a conventional motor shaft

    runs freely, the stepper motor shaft moves in a fixed repeatable increment which allows one to

    move it to a precise position. This repeatable

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    52/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 52

    Fig 3.20: Rotor Alignment

    fixed movement is possible as a result of basic magnetic theory where poles of the Same polarity

    repel and opposite poles attract. The direction of the rotation is dictated by the stator poles. The

    stator poles are determined by the current sent through the wire coils. As the direction of the

    current is changed, the polarity is also changed causing the reverse motion of the rotor. The

    stepper motor used here has a total of 5 leads: 4 leads representing the four stator windings and 1

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    53/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 53

    common for the center tapped leads. As the sequence of power is applied to each stator winding,

    the rotor will rotate. There are several widely used sequences where each has a different degree of

    precision. Table shows the normal 4-step sequence. For clockwise go for step 1 to 4 & for counter

    clockwise go for step 4 to 1.

    Fig 3.21: Stator Windings Configuration

    inding A inding B inding C ing D

    1 1

    1 1 1

    1

    1

    Table 3.6: Input Sequence to the Windings

    3.12.2 Step Angle & Steps per Revolution

    Movement associated with a single step, depends on the internal construction of the motor, in

    particular the number of teeth on the stator and the rotor. The step angle is the minimum degree

    of rotation associated with a single step.

    Step per revolution is the total number of steps needed to rotate one complete rotation or 360

    degrees (e.g., 180 steps * 2 degree = 360) [31].

    Winding D

    Winding B

    123

    4 5 6

    Winding DWinding C

    Winding A

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    54/108

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    55/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 55

    Circuit diagram

    R1

    VCC

    10K

    Y1

    33PF

    VCC

    S11 21 2

    C1

    U1

    8051

    31

    19

    18

    9

    12131415

    12345678

    3938373635343332

    2122232425262728

    1716

    29

    301110

    40

    20

    EA/VP

    X1

    X2

    RESET

    INT0INT1T0

    T1

    P1.0P1.1P1.2P1.3P1.4P1.5P1.6P1.7

    P0.0P0.1P0.2P0.3P0.4P0.5P0.6P0.7

    P2.0P2.1P2.2P2.3P2.4P2.5P2.6P2.7

    RDWR

    PSEN

    ALE/PTXDRXD

    VCC

    VSS

    CRYSTAL

    S2

    C2

    VCC

    33PF

    MG1MOTOR STEP123

    4 5 6

    1 2

    C3

    10UF

    GROUND

    S3

    U5

    UL2003

    1

    2

    3

    4

    5

    6

    7

    8 9

    10

    11

    12

    13

    14

    15

    16IN1

    IN2

    IN3

    IN4

    IN5

    IN6

    IN7

    GR D VC C

    OUT7

    OUT6

    OUT5

    OUT4

    OUT3

    OUT2

    OUT1

    C

    R2

    RESISTOR SIP 10

    123456789

    10

    SW1

    R E S E T S / W

    1

    2

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    56/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 56

    DIRECTION CONTROL

    #include

    #include

    sbit m1=P0^0; // define the four windigs of stepper motor using sbitas m1,m2,m3,m4 sbit m2=P0^1;

    sbit m3=P0^2;

    sbit m4=P0^3;

    void mov_clk()

    {

    m1=1;m2=0;m3=0;m4=0; //give high pulse to m1 motormoves one step angle in

    // clockwise

    ms_delay(200);

    m1=0;m2=1;m3=0;m4=0; //give high pulse to m2 motormoves two step angle in

    // clockwise

    ms_delay(200);

    m1=0;m2=0;m3=1;m4=0; //give high pulse to m3 motormoves three step angle in

    // clockwise

    ms_delay(200);

    m1=0;m2=0;m3=0;m4=1; //give high pulse to m4 motor

    moves four step angle in // clockwise ms_delay(200);

    }

    void mov_anticlk()

    {

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    57/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 57

    m1=0;m2=0;m3=0;m4=1; //give high pulse to m4 motormoves one step angle in

    // anti clockwise

    ms_delay(200);

    m1=0;m2=0;m3=1;m4=0;

    ms_delay(200);

    m1=0;m2=1;m3=0;m4=0;

    ms_delay(200);

    m1=1;m2=0;m3=0;m4=0;

    ms_delay(200);

    }

    void motor_stop()

    {

    m1=0;m2=0;m3=0;m4=0;

    }

    void main(){

    while(1)

    {

    mov_clk(); // motor moves in clock wisedirection

    motor_stop(); // motor stops

    secdelay(2);

    mov_anticlk(); // motor moves in anticlock wisedirection

    motor_stop(); // motor stops

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    58/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 58

    secdelay(2);

    }

    }

    DIRECTION CONTROL +SWITCHES

    #include

    #include

    sbit m1=P0^0 ; //define the four windigs of stepper motor usingsbit as m1,m2,m3,m4

    sbit m2=P0^1;

    sbit m3=P0^2;

    sbit m4=P0^3;

    sbit s1=P3^2 ; //define the switches using sbit as s1,s2,s3

    sbit s2=P3^3;

    sbit s3=P3^4;

    void mov_clk()

    {

    m1=1;m2=0;m3=0;m4=0; //give high pulse to m1 motormoves one step angle in

    // clockwise

    ms_delay(200);

    m1=0;m2=1;m3=0;m4=0; //give high pulse to m2 motormoves two step angle in

    // clockwise

    ms_delay(200);

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    59/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 59

    m1=0;m2=0;m3=1;m4=0; //give high pulse to m3 motormoves three step angle in //clockwise

    ms_delay(200);

    m1=0;m2=0;m3=0;m4=1; //give high pulse to m4 motormoves four step angle in

    // clockwise

    ms_delay(200);

    }

    void mov_anticlk()

    {

    m1=0;m2=0;m3=0;m4=1; //give high pulse to m4 motormoves one step angle in

    //anti clockwise

    ms_delay(200);

    m1=0;m2=0;m3=1;m4=0;

    ms_delay(200);

    m1=0;m2=1;m3=0;m4=0;

    ms_delay(200);

    m1=1;m2=0;m3=0;m4=0;

    ms_delay(200);

    }

    void motor_stop()

    {

    m1=0;m2=0;m3=0;m4=0;

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    60/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 60

    void main()

    {

    while(1)

    {

    if(s1==0)

    {

    mov_clk(); // motor moves in clock wisedirection

    }

    else if(s2==0)

    {

    mov_anticlk(); // motor moves in anticlockwise direction

    }

    else if(s3==0)

    {mov_clk(); // motor moves in clock wise

    direction

    secdelay(1);

    mov_anticlk(); // motor moves in anticlockwise direction

    secdelay(1);

    }

    else

    {

    motor_stop(); }}} // motor stops

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    61/108

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    62/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 62

    The seven LEDs in each digit are labelled a-g. Since the Digilab board usesCA displays, the anodes for each of the four digits are connected in acommon node, so that four separate anode circuit nodes exist (one per digit).Similar cathode leads from each digit have also been tied together to formseven common circuit nodes, so that one node exists for each segment type.These four anode and seven cathode circuit nodes are available at the J2connector pins labelled A1-A4 and CA-CG. With this scheme, any segmentof any digit can be driven individually. For example, to illuminate segmentsb and c in the second digit, the b and c cathode nodes would be brought to asuitable low voltage (by connecting the corresponding circuit node availableat the J2 connector to ground), and anode 2 would be brought to a suitablehigh voltage (by connecting the corresponding circuit node available at the

    J2 connector to Vdd).

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    63/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 63

    Circuit diagram

    VCC

    U27-segment

    5 4 3 2 1

    1 0

    9 8 7 6

    g f

    v c c a b

    h c v c c

    d e

    10UF

    LED3

    SW1

    R E S E T S / W

    1

    2

    1 2

    LED7

    LED4

    C2

    LED2

    10K 1 2

    U1

    8051

    31

    19

    18

    9

    12131415

    12345678

    3938373635343332

    2122232425262728

    1716

    29

    301110

    40

    20

    EA/VP

    X1

    X2

    RESET

    INT0INT1T0T1

    P1.0P1.1P1.2P1.3P1.4P1.5P1.6P1.7

    P0.0P0.1P0.2P0.3P0.4P0.5P0.6P0.7

    P2.0P2.1P2.2P2.3P2.4P2.5P2.6P2.7

    RDWR

    PSEN

    ALE/PTXD

    RXD

    VCC

    VSS

    S11 2

    VCC

    GROUND

    CRYSTAL33PF

    LED1

    33PF

    Y1

    R2

    470 E

    S2

    LED5

    S3

    VCC(5V)

    C3

    LED8

    R1

    C1

    LED6

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    64/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 64

    UP COUNTER

    #include

    #include

    #define seg_port P2 //define segment port

    // array is used to store the value of data to be sent on the port to display

    // any digit on seven segment as below

    unsigned charseg_array[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};

    void main(){

    unsigned char count;

    while(1)

    {

    for(count=0;count

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    65/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 65

    DOWN COUNTER

    #include

    #include

    #define seg_port P2 // define segment port

    // array is used to store the value of data to be sent on the port to display

    // any digit on seven segment as below

    unsigned charseg_array[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};

    void main()

    {

    char count;

    while(1)

    {

    for(count=9;count>=0;count--)

    {

    seg_port=seg_array[count]; // send the corresponding valueof digit fom array to // port

    secdelay(1);

    }}

    }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    66/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 66

    UP AND DOWN WITH SWITCH

    #include

    #include

    #define seg_port P2

    sbit s1=P3^2; //define the switches using sbit as s1,s2,s3

    sbit s2=P3^3;

    sbit s3=P3^4;

    // array is used to store the value of data to be sent on the port to

    display // any digit on seven segment as below

    unsigned charseg_array[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};

    void main()

    {

    char maxlen=0,flag;

    flag=0;

    seg_port=seg_array[maxlen]; // show '0' on 7 segment

    while(1)

    {

    while(s3!=0) // while u not pressed switch s3 thestatement in this

    { //while loop willexecute

    if(s1==0) // if u press s1

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    67/108

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    68/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 68

    }

    secdelay(1);

    if(flag==0) // if flag is reset (ie flag=0)then increment value

    {

    while(maxlen=0)

    {

    seg_port=seg_array[maxlen];

    secdelay(2);maxlen--;

    } maxlen=0;flag=0;

    }} }

  • 8/6/2019 19322492444e0acadc584908.38747942.TRANING REPORT PDF

    69/108

    Eureka Electrosoft Solutions Pvt. Ltd.

    E u r e k a E m b e d d e d & A d v a n c e d S o f t w a r e T e c h n o l o g i e s ( E E A S T )A T r a i n i n g U n i t o f E u r e k a E l e c t r o s o f t S o l u t i o n s P v t . L t d .

    Page 69

    MODULE 7LCD

    Liquid Crystal Display

    3.2.12.1 LCD DisplayLiquid crystal displays (LCD) are widely used in recent years as compares to LEDs. This is due