Академический Документы
Профессиональный Документы
Культура Документы
Sponsored by
Submitted to
Submitted by
Page No.
1-2 1 2
Software Used
Study of various modules 4.1 Interfacing of LEDs with The MCU 4.2 Interfacing of switches with The MCU 4.3 Interfacing of 7 Segment Display with The MCU 4.4 Interfacing of DC Motor with The MCU 4.5 Relay 4.6 Stepper Motor 4.7 Liquid Crystal Display
COMPANY PROFILE
HCL: Overview
Hindustan Computers Ltd., one of the Indias largest electronics, computing and information technology company. Founded in 1976 by Mr. Shiv Nadar, Ajai Chawdhary and four other colleagues Based in Noida, its a $ 5 billion company with over 60,000 employees and is working in 26 countries
VISION
A global corporation enriching lives and enabling business transformation for our customers, with leadership in chosen technologies and markets. Be the first choice for employees and partners, with commitment to sustainability.
MANAGEMENT OBJECTIVES
To fuel initiative and foster activity by allowing individuals freedom ofaction and innovation in attaining defined objectives.
STRENGTHS OF HCL
1. Industry Experience of 32 years 2. True Corporate Exposure
CHARACTERISTICS
1. Embedded systems are designed to do some specific task, rather than be a generalpurpose computer for multiple tasks. Some also have real-time performance constraints that must be met, for reasons such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. 2. Embedded systems are not always standalone devices. Many embedded systems consist of small, computerized parts within a larger device that serves a more general purpose. 3. The program instructions written for embedded systems are referred to as firmware, and are stored in read-only memory or Flash memory chips. They run with limited computer hardware resources: little memory, small or non-existent keyboard and/or screen.
CHAPTER-3 : STUDY OF VARIOUS MODULES 3.1 INTERFACING OF LEDs WITH THE MICROCONTROLLER
The LED is based on the semiconductor diode. When a diode is forward biased (switched on), electrons are able to recombine with holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater durability and reliability.
3.1.1CIRCUIT DIAGRAM:
Single seven segment display. Double seven segment display. A seven-segment display (abbreviation: "7-seg(ment) display"), less commonly known as
a seven-segment indicator, is a form of electronic display device for displaying decimal numerals that is an alternative to the more complex dot-matrix displays. Seven-segment displays are widely used in digital clocks, electronic meters, and other electronic devices for displaying numerical information. In addition to the ten numerals, seven segment displays can be used to show letters of the latin, cyrillic and greek alphabets including punctuation, but only few representations are
DC MOTOR:
A direct current (DC) motor is another widely used device that translates electrical pulses into mechanical movement. In the DC motor we have only + and - leads. Connecting them to a DC voltage source moves the motor in one direction. By reversing the polarity, the DC motor will move in the opposite direction. One can easily experiment with the DC motor. For example, small fans used in many motherboards to cool the CPU are run by DC motors. By connecting their leads to the + and - voltage source, the DC motor moves.
3.5 RELAY:
A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and most have double throw (changeover) switch contacts as shown in the diagram. Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical. Most relays are designed for PCB mounting but you can solder wires directly to the pins providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue should show you the relay's connections. The coil will be obvious and it may be connected either way round. Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection diode across the relay coil.
STEPPER MOTOR
Motion 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 shafts rotation. 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.
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
VCC, VSS, VEE The voltage VCC and VSS provided by +5V and ground respectively while VEE is used for controlling LCD contrast. Variable voltage between Ground and Vcc is used to specify the contrast (or "darkness") of the characters on the LCD screen.
of 7 data lines (3 control lines plus the 4 lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control lines plus the 8 lines for the databus). The three control lines are referred to as EN, RS, and RW. The EN line is called "Enable." This control line is used to tell the LCD that you are sending it data. To send data to the LCD, your program should make sure this line is low (0) and then set the other two control lines and/or put data on the data bus. When the other lines are completely ready, bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again. The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data being sent is text data which should be displayed on the screen. For example, to display the letter "T" on the screen you would set RS high. The RW line is the "Read/Write" control line. When RW is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write commands--so RW will almost always be low. Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7. As we've mentioned, the LCD requires either 8 or 11 I/O lines to communicate with. For the sake of this tutorial, we are going to use an 8-bit data bus--so we'll be using 11 of the 8051's I/O pins to interface with the LCD. Let's draw a sample psuedo-schematic of how the LCD will be connected to the 8051.
DB3
EQU
P1.3
DB4
EQU
P1.4
DB5
EQU
P1.5
DB6
EQU
P1.6
DB7
EQU
P1.7
EN
EQU
P3.7
RS
EQU
P3.6
RW
EQU
P3.5
Pin 1 2 3 4
I/O I
Description Ground +5V power supply Power supply to control contrast RS=0 to select command register, RS=1 to select data register.
5 6 7 8 9 10 11 12 13 14
R/W=0 for write, R/W=1 for read Enable The 8 bit data bus The 8 bit data bus The 8 bit data bus The 8 bit data bus The 8 bit data bus The 8 bit data bus The 8 bit data bus The 8 bit data bus