Beruflich Dokumente
Kultur Dokumente
1.1 INTRODUCTION
An embedded system is a combination of hardware and software design to meet a specific need with performance in a given time frame. It is a specialized computer system that is a part of larger system on machine. Typically an embedded system is housed on a single microcontroller board with programs stored in ROM. Virtually all appliances which have a digital interface watches, microwaves, carsutilize embedded systems include an operating system, but many are so specialized that the entire logic can be implemented as a single program. An embedded controller is a controller (or computer)that is embedded into some device for some purpose other than to provide general purpose computing. It is a special purpose system in which the computer is completely encapsulated by the device it controls. Unlike a general-purpose computer, such as a personal computer, an embedded system performs pre-defined tasks, usually with very specific requirements. Since the system is dedicated to a specific task, design engineers can optimize it, reducing the size and cost of product. Embedded systems are often mass produced, so the cost savings may be multiplied by millions of items. Hand held computers or PDAs are generally considered embedded devices because of the nature of their hardware design, even though they are more expandable in software terms. This line of definition continues to blur as devices expand. Embedded systems are a combination of hardware as well as software. The software written for embedded systems is often called firmware, and is stored in ROM or FLASH memory chips rather than a disk drive. It often runs with limited hardware resources: small or no keyboard, screen, and little RAM memory. Embedded systems are designed to do some specific task, rather than be a general purpose computer for multitasks. 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.
REGISTERS: These are used to store information temporarily, which could be address or data.
ALU: Arithmetic logic Unit- performs arithmetic operations such as addition, subtraction, division, multiplication and logical operations AND, OR, XOR, NOT.
PROGRAM COUNTER: It points to the next instruction to be fetched. Increases automatically with execution of each instruction.
DATA BUS:
Used to carry information in and out of CPU. Increase in number of data buses increases speed as well as cost.
ADDRESS BUS:
Used to identify the devices and memory connected to the CPU. Determines the number of locations which it can communicate No. of locations=2^X where X= number of address lines. Ex: 16 address lines make 64k of addressable memory.
RAM:
Random Access Memory Also known as Data Memory. This is a volatile memory and is used to store the data temporarily during the execution of a program.
ROM:
Read Only Memory This is a permanent memory. In embedded systems (micro controllers) the ROM is FLASH ROM also known as CODE MEMORY. The program is stored in this memory, which doesnt have to remain same.
COMPONENTS
EMBEDDED PRODUCTS
INPUT SYSTEM
OUTPUT SYSTEMS
1.3 APPLICATIONS:
Automatic teller machines(ATM). Avionics, such as inertial guidance systems, flight control hardware/software and other integrated systems in aircraft and missiles. Cellular telephones and telephone switches Engine controllers and antilock brake controllers for automobiles Home automation products, such as thermostats, air conditioners, sprinklers, and security monitoring systems Handheld calculators Household appliances, including microwave ovens, washing machines, television sets, DVD players Handheld computers videogame consoles Even computer peripherals themselves such as routers and printers have embedded processors.
TELECOM: Mobile phone systems (handsets and base stations), modems, routers.
AUTOMOTIVE APPLICATIONS: Braking systems, traction control, Airbag release systems, Engine-management units, Steer-by-wire systems,, Cruise control applications.
DOMESTIC APPLIANCES: Dishwashers, Televisions, Washing machines, Microwave ovens, Video recorders, Security systems, Garage door controller, Calculators, Digital watches, VCRs, digital cameras, Remote controls, Treadmills.
ROBOTIC: Fire fighting robot, Automatic floor cleaner, Robotic arm etc.
AEROSPACE APPLICATIONS: Flight control systems, Engine controllers, Autopilots, Passenger in-flight entertainment systems`
MEDICAL EQUIOMENT: An aesthesia monitoring systems, ECG monitors, Pacemakers, Drug delivery systems, MRI scanners
DEFENSE SYSTEMS:
OFFICE AUTOMATION: laser printers, fax machines, pagers, cash registers, gas pumps, Credit/Debit card readers, Thermostats, Grain analyzers.
An embedded system will have very few resources compared to GENERAL purpose computing systems like desktop computer. The memory capacity and processing power in an embedded system is limited. It is more challenging to develop an application in embedded system due to its constricted environment as compared to developing the same for a desktop system. Embedded system are dedicated to specific task. ES can be implemented using wide variety of processors, even generic or custom. Es are cost sensitive(but so are PC). Es operate have real time constraints. Es have environmental constraints (i.e. supposed to work in diverse environmental conditions). Es usually run out of ROM. Es have resource constraints. Es are infrequently reprogrammed. Es often work in reactive mode. Es have hard reliability and correctness constraints. 5
Chapter 2: MICRONTROLLER
2.1 INTRODUCTION
Microcontrollers are single chip computers. The Intel 8051 is a single chip microcontroller (C) which was developed by Intel in 1980 for use in embedded systems. Intel's original versions were popular in the 1980s and early 1990s, but has today largely been superseded by a vast range of faster and/or functionally enhanced 8051-compatible devices manufactured by more than 20 independent manufacturers including Atmel, Infineon Technologies (formerly Siemens AG), Maxim Integrated Products (via its Dallas Semiconductor subsidiary), NXP (formerly Philips Semiconductor), Winbond, ST Microelectronics, Silicon Laboratories (formerly Cygnal), Texas Instruments and Cypress Semiconductor. Intel's official designation for the 8051 family of Cs is MCS 51.Intel's original 8051 family was developed using NMOS technology, but later versions, identified by a letter "C" in their name, e.g. 80C51, used CMOS technology and were less power-hungry than their NMOS predecessors - this made them eminently more suitable for battery-powered devices.
It provides many functions (CPU, RAM, ROM, I/O, interrupt logic, timer, etc.) in a single package.
8-bit data bus - It can access 8 bits of data in one operation (hence it is an 8-bit microcontroller). 16-bit address bus - It can access 216 memory locations - 64 kB each of RAM and ROM.
On-chip RAM - 128 bytes ("Data Memory"). On-chip ROM - 4 kB ("Program Memory"). Four byte bi-directional input/output port. UART (serial port). Two 16-bit Counter/timers. Two-level interrupt priority. Power saving mode. 6
A particularly useful feature of the 8051 core is the inclusion of a boolean processing engine which allows bit-level boolean logic operations to be carried out directly and efficiently on internal registers and RAM. This feature helped to cement the 8051's popularity in industrial control applications. Another valued feature is that it has four separate register sets, which can be used to greatly reduce interrupt latency compared to the more common method of storing interrupt context on a stack.The 8051 UART can be configured to use a 9th data bit that can provide addressable communications in an RS-485 multi-point communications
environment.8051 based microcontrollers typically include one or two UARTs, two or three timers, 128 or 256 bytes of internal data RAM (16 bytes of which are bit-addressable), up to 128 bytes of I/O, 512 bytes to 64 kB of internal program memory, and sometimes a quantity of extended data RAM (ERAM) located in the external data space. The original 8051 core ran at 12 clock cycles per machine cycle, with most instructions executing in one or two machine cycles. With a 12 MHz clock frequency, the 8051 could thus execute 1 million one-cycle instructions per second or 500,000 two-cycle instructions per second. Enhanced 8051 cores are now commonly used which run at six, four, two, or even one clock per machine cycle, and have clock frequencies of up to 100 MHz, and are thus capable of an even greater number of instructions per second. All SILabs, some Dallas and a few Atmel devices have single cycle cores.Even higher speed single cycle 8051 cores, in the range 130 MHz to 150 MHz, are now available in internet downloadable form for use in programmable logic devices such as FPGAs, and at many hundreds of MHz in ASICs, for example the netlist from
www.e8051.com.Common features included in modern 8051 based microcontrollers include built-in reset timers with brown-out detection, on-chip oscillators, self-programmable Flash ROM program memory, bootloader code in ROM, EEPROM non-volatile data storage, IC, SPI, and USB host interfaces, PWM generators, analog comparators, A/D and D/A converters, RTCs, extra counters and timers, in-circuit debugging facilities, more interrupt sources, and extra power saving modes.
PROGRAMMING:
Several C compilers are available for the 8051, most of which feature extensions that allow the programmer to specify where each variable should be stored in its six types of memory, and provide access to 8051 specific hardware features such as the multiple register banks and bit manipulation instructions. Other high level languages such as Forth, BASIC, Pascal/ 7
Object Pascal, PL/M and Modula 2 are available for the 8051, but they are less widely used than C and assembly.
Fig 2.1
Program Counter
Stack Counter
Clock Circuit
Interrupt Circuits
Contains no RAM, no ROM, no I/O port on chip, hence called generalPurpose microprocessor E.g., x86, 680x0, Pentium family Fig 2.2
MICRCONTROLLER 1. Contains on chip RAM, ROM, I/O, TIMER, Serial port . 2. Used in Specific Purpose applications 3. Provides data storage facility. 4. The structure of uC is as given below
CPU RAM ROM
pur pos
e uP
I/ O
TI ME R
True computer on a chip Specific-purpose digital computers Design incorporates all the features of a microprocessor like ALU, PC, SP and registers along with RAM ROM, parallel I/O, serial I/O,, timers, clock circuits ADC etc
Types of microcontroller:
4 bit microcontroller 8 bit microcontroller 16 bit microcontroller 32 bit microcontroller
Manufacturer: Model Hitachi: HMCS40 National: COP42 OKI: MSM6411 TI: TMS 1000 Toshiba: TLCS47
Counters 1 2
Table 2.1
Manufacturer: Model
Pins: I/O
Counters
RAM (bytes)
ROM (bytes)
Other features
Intel : 8048 Intel : 8051 Microchip: PIC16C56 National : COP820 Motorola : 6805 Motorola : 68HC11 Rockwell : 6500/1 Philips : 87C552 Zilog : Z8 Zilog : Z86C83
40:27 40:32 18:12 28:24 28:20 52:40 40:32 68:48 40:32 28:22
1 2 0 1 1 2 1 3 2 2
1K 4K 1K 1K 1K 8K 2K 8K 2K 4K
Ext memory to 8K Ext memory to 128K;serial port 25/20 ma sink/source; WDT serial bit I/O
serial port; ADC; WDT Ext memory to 124K; serial port 8-channel AD; very low cost
Table 2.2
Manufacturer: Model
Hitachi:H8/532
Pins: I/O
84:65
Counte RAM rs
5 1K
ROM (byte s)
32K
Other features
Ext memory to 1M; serial port; A/D; PWM Ext memory to 64K; serial port; A/D; PWM; WDT Ext memory to 64K; serial port; A/D; PWM
Intel:80C196
68:40
232
8K
National:HPC1616 4
68:52
512
16K
Table 2.3
11
Hardware features 132 Pin ceramic package 20 MHz clock 32 Bit bus Floating point unit 512 Byte instruction cache
Software features efficient procedure calls Fault handling capability Trace events Global registers efficient interrupt vectors
Table 2.4
having dedicated instructions for I/O operations (including AND OR(!)) via the expander. The 8048 already had a lot of useful features known well to 8051-users: external code memory support; external data memory support (inherently only 256 bytes addressed indirectly by R0 and R1 as there is no 16 bit pointer register such as the DPTR in 8051 - the 8051 inherited this 8-bit external data access); quasibidirectional I/O ports. Maximum clock is 11MHz, but an instruction cycle takes 15 oscillator clocks. The "A" version (advanced) introduced power down mode there were multiple variations of the 8048 around, mostly with different numbering, but generally denoted as the MCS-48 family. 8048 itself denoted a mask-ROM part, 8748 an EPROM part -windowed (CERDIP - erasable) for development, and unwind owed (PDIP) OTP. The rimless part was a bit surprisingly marked 8035 (probably most of the parts sold as rimless were parts with unusable ROM, due to error in the "programmed" firmware). There was a low-cost version with reduced pin count and omitted some of the features as 8021, and versions with more ROM and RAM as 8049 (2kB ROM/128B RAM) and 8050 (4kB ROM/256B RAM); with Rimless versions as 8039 and 8040; and 8049 had also an EPROM version 8749 (the funny thing is, that 8749 came in 1981, one year after 8051/8751). 8048's were second sourced by a number of manufacturers, including NEC, Toshiba, and were cloned also behind the then iron curtain in Czechoslovakia (Tesla MHB8048/8035) and USSR. Application specific versions of 8048 were also built quite early, with adding of various peripherals, such as 8-bit ADC in 8022 and a parallel bus slave interface in 8041/8042.The MCS-48 family was used in a quite wide range of applications. One of the first applications of 8048 was in a gaming console (Magnavox Odyssey2), but there were also more "serious Applications, for example in one of the first car engine "computerized" control units. But the Biggest hit came when IBM decided to use 8048 in its original PC keyboard. Although in the AT keyboard IBM used the (presumably cheaper) 6805, it used 8042 as a co processor on the main board, communicating with the keyboard (and performing a few other specific tasks in Memory management). The 8042 is still present in almost each and every PC even today, but don't search for a chip with "8042" on it - it is integrated in the chipset. It may come as a surprise to somebody, but thanks to this fact the 8048 with its derivatives is most probably the most widespread microcontroller at all. As in the 70s there were no PDF-s and no world-wide web, datasheets and other documentation is Hardly available over the internet. I believe Intel will give out a copy if one really. wants it (there is a "literature request" form at their "museum" pages). However, there seems to be a couple of Enthusiastic people, one of the maintaining a wonderful document called Grokking the MCS-48 System at http://home.mnet-online.de/al/mcs-48/mcs-48.pdf. 13
8 Bit data path and ALU. On chip flash memory. 4K X 8 ROM - Program memory. 128 x 8 RAM - Data memory. Multiple 16-bit Timer/Counter. Full duplex UART (Serial port). On chip clock oscillator. 32 I/O pins Six Interrupt sources Introduced by Intel Corporation in 1981 as MCS 51.
Feature ROM RAM Timer I/O Pins Serial port Interrupt sources Quantity 4K bytes 128 bytes 2 32 1 6
Table 2.5 Intel allowed other manufacturers to make and market any version of 8051 depending upon the speed and on chip ROM. All versions code compatible Other members of the 8051 family: 8052, 8031.
14
Feature ROM RAM (bytes) Timers I/O Pins Serial Port Interrupt Sources
8051 4K 128 2 32 1 6
8031 0K 128 2 32 1 6
8052 8K 256 3 32 1 8
Table 2.6
VERSIONS OF 8051 C:
15
16
Fig 2.3
8052 MICROCONTROLLER: It has all the features of 8051 along with extra 128 bytes
of RAM, a timer and extra 4K bytes of on chip ROM. 8051 is an upward compatible to 8052.
17
Quantity
4K bytes 128 bytes 2 32
The only differences in 89S52 and 8051 is that of on-chip ROM and RAM, timers and interrupts. Both the micro controllers are based on the high power CISC architecture of INTELMCS-51.
18
INTERRU
CPU
SERIAL PORT
OSC
BUS CONTRO
4 I/O PORTS
P0 P2 P1 P3 ADDRESS/DA TA
TXD RXD
Fig 2.4
19
PIN DIAGRAM:
P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST (RXD) P3.0 (TXD) P3.1 (INT0) P3.2 (INT1) P3.3 (T0) P3.4 (T1) P3.5 (WR) P3.6 (RD) P3.7 XTAL2 XTAL1 GND
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21
Vcc P0.0 (AD0) P0.1 (AD1) P0.2 (AD2) P0.3 (AD3) P0.4 (AD4) P0.5 (AD5) P0.6 (AD6) P0.7 (AD7) EA/VPP ALE/PROG PSEN P2.7 (A15) P2.6 (A14) P2.5 (A13) P2.4 (A12) P2.3 (A11) P2.2 (A10) P2.1 (A9) P2.0 (A8)
Fig 2.5
PIN DESCRIPTION
Port 1- Pins (1-8)
Input/output pins Contains internal pull-ups. :
20
Contains internal pull-ups. Used both as I/O port and higher address byte
Active high. Used for de-multiplexing the address and data by connecting G pin of the 74LS373.
Fig 2.6 21
EA - (pin 31):
Active low input. To access external ROM, it must be GND.
RST- (pin 9)
Active high input.
: Reset
22
C2 XTAL2 30 pF
C1 XTAL1 30 pF GND
Fig 2.7
23
NC
XTAL2
EXTERNALSIGNAL
XTAL1
GND
Fig 2.8
MEMORY ORGANISATION:
Program Memory Data Memory
PROGRAM MEMORY:
Begins from location 0000h. Each interrupt is assigned a fixed Location in it (0000-0023H). Directly addressable space of Up to 64k bytes. To access external programme Memory, A pin is used. 24
DATA MEMORY:
64K
7FH
DIRECT / INDIRECT ADDRESSIN
OOH
0000 RD WR
Fig 2.9
25
7F 30 2F 20 18 17 10 0F 08 07 R7 R6 R5 R4 R3 R2 R1 00 R0 Fig 2.10 INTERNAL DATA MEMORY Lower 128 bytes : FF. . . . . . . . . F8 07. . . . . . . . . 00 REGISTER BANK 3 REGISTER BANK 2 REGISTER BANK 1
END of RAM
00H- 7FH
: : :
80H to FFH
8051 REGISTERS:
General purpose registers Special function registers
REGISTERS (R0-R7): Set of 8 auxiliary registers, namely R0, R1, and R7. There are 4 such banks in lower RAM.
DATA POINTER (DPTR): Made of two 8-bit registers, namely DPH and DPL, Used to furnish memory address for internal and external code access and external Data access.
Program Counter (PC): 16-bit register holds the address of the next program instruction to be executed, automatically Incremented after each instruction fetch.
Stack Pointer (SP): 8-bit register, used to hold an internal RAM Address called the top of the stack.
SFR lies between 80 to FF hex. Not all address space of 80 to FF is used by SFR. The unused locations 80H to FFH are reserved & must not be used By the programmer. 16 addresses are bit addressable. Full instruction set including: Arithmetic Instruction Logical Instruction Branching Instruction Data movement Instruction 27
INTERRUPT CONTROL:
-IE -IP : Interrupt Enable. : Interrupt Priority.
- P1 - P2 - P3
- P0
2.8 TIMERS:
- TMOD : Timer mode. - TCON : Timer control. - TH0 - TL0 - TH1 - TL1 : Timer 0 high byte. : Timer 0 low byte. : Timer 1 high byte. : Timer 1 low byte.
28
SERIAL I/O:
- SCON : Serial port control. - SBUF : Serial data registers.
OTHER:
- PCON : Power control & misc.
A, B registers: A (Accumulator):
8-bit register & used as working register for the arithmetic, logical instruction. Can be used as general purpose register. Necessary for some instructions.
B registers:
8-bit register and can be used as general purpose Register. Necessary for the instructions MUL and DIV.
Carry Flag.
: : :
29
STACK OPERATION
After POP 0C 0B 0A 72 54 76 0B 0A 54 76 0A 76 0B 0A 39 76 After POP After PUSH 39
09 08
43 6C
09 08
43 6C
09 08
43 6C
09 08
43 6C
Start SP = 0CH
SP = 0BH
SP = 0AH
SP = 0BH
Fig 2.11
May be manipulated as a 16 bit register or as two Independent 8-bit registers. Used in Index addressing mode.
DPH
DPL
GATE
C/T
M1
M0
GATE C/T
M1
M0
Timer 1
Timer 0
GATE: Permits IN TX pin to enable/disable counter. - C/T: Set for counter operation, reset for timer operation.
- M1, M0:
00: Emulate 8048 counter/timer (13-bits). 01:16-bit counter/timer. 10: 8-bit auto-reload mode 11: Timer 0 = two 8-bit timers.
Timer 1 Counting disabled. Timing function allowed. It can be used as Baud Rate generator.
TIMER MODE:
Timer Mode 0 : Emulates 8048 counter/timer (13-bits). 8-bit counter (TL0 or TL1). 5-bit presales (TH0 or TH1). Timer Mode 1 :
31
Timer Mode 2
8-bit auto-reload.
Counter in TL0 or TL1. Reload value in TH0 or TH1. Provides a periodic flag or interrupt. Timer Mode 2 : Split timer mode
TF1
TR1
IT1
IE0
IT0
- TR1, TR0: Run control bits for Timer 1 and Timer 0. Set to run Reset to hold.
- IE1, IE0 : Edge flag for external interrupts 1 and 0. * Set by interrupt edge, cleared when interrupt is processed.
- IT1, IT0 : Type bit for external interrupts. * Set for falling edge interrupts, reset for 0 level interrupts.
SMO
SM1
RI
SM0, SM1 = Serial Mode: 00 = Mode 0 01 = Mode 1 : Shift register I/O expansion. : 8-bit UART with variable baud rate. 32
10 = Mode 2
: 9-bit UART with fixed baud rate. : 9-bit UART with variable baud rate.
11 = Mode 3 - SM2 :
Mode 0 : Not used. Mode 1 : 1 = Ignore bytes with no stop bit. Mode 2,3 : 0 = Set receive interrupt (RI) on all bytes.
: 1 = Set RI on bytes where bit 9 = 1. - REN = Enables receiver. - TB8 = Ninth bit transmitted (in modes 2 and 3). - RB8 = Ninth bit received: Mode 0 : Not used. Mode 1 : Stop bit. Mode 2, 3 : Ninth data bit. - TI = Transmit interrupt flag. - RI = Receive interrupt flag.
----
----
ES
ET1
EX1
ET0
EX0
: Global interrupt enable. : Serial interface. : Timer 1. : External interrupts 1. : Timer 0. : External interrupts 0.
0 = Disabled. 1 = Enabled.
-----
-----
----- PS
SMOD
----
----
----
GF1 GF0 PD
IDL
34
MACHINE LANGUAGES:
A program that consists of0s and 1s is called a machine language Deals directly with the internal structure of microprocessor and microcontroller CPU can work only in machine language
ASSEMBLY LANGUAGES:
.Defined by a set of rules that specify the symbols that can be used and they may be
combined to form a line of code.
Label:
Name of a label should be meaningful giving the reflection of the code functionality. E.g. (LED_ON: Label indicates the switch ON the LED) First character should be an alphabet. No. character should not be more than 8 characters. Reserve words must not be used as label.
35
COMMENT:
Begin with semicolon comment indication. Comments should be small and meaningful. Assembler ignores comments, but they are indispensable to programmer.
The language whose instruction set is more compatible with human languages and
human thought processes
HLL the programmer need not to be concern with internal detail of microprocessor
and microcontroller
36
MOV @R1, B; Move contents of B into RAM location whose address is held by R1.
Used in accessing data elements of look-up table located in ROM space. The 16-bit register DPTR and ACC are used to form the address of data element stored
on a chip ROM.
Arithmetic instructions
Mnemonic
Operands
Bytes/cycle
A, Rn A, direct A, @ RI A, #Data
INC DEC
A Rn Direct @ RI
DPTR AB AB A
38
LOGIC INSTRUCTIONS:
Mnemonic
Operands
Bytes/Cycle
1/1 2/1 1/1 2/1 2/1 3/2 2/2 2/2 1/1 1/1 2/1 1/1 1/1 1/1 1/1 1/1
CLR CPL
A C Bit
A A A A C
Mnemonic
operands
Bytes/Cycles
MOV
39
Rn, direct
2/2 Rn, #data Direct, A Direct, Rn Direct, direct Direct, @ RI Direct, #data 3/2 1/2 1/2 2/2 2/2 1/1 1/1 3/2 2/2 2/1 2/1 2/2
MOVC
A, @ A+DPTR A, @ A+PC
EDITOR: It provides the facility to write the programs and then immediate assemble
or compile the program. It gives us the facility to create new text, open existing text and save the written text.
ASSEMBLER:
number of files.
into machine language program called object code. After assembling it generates a
40
COMPILER:
A compiler is a program that translates a high level language program to machine level language instructions A compiler may use an assembly language as an intermediate step in the translation or may translate the program directly to machine code After assembling the code it generates a number of files like c file, asm file, lst file, obj file, rel file, link file, hex file etc depending on the compiler. The most popular microcontroller compilers are SDCC, READS, (PIC), PL/M, from Intel and many more,
PROGRAMMER:
Programmer is a device used to program the hex file generated by assembler/compiler into ROM of microcontroller.
SIMULATOR: It is a program which provides the facility to step through the code to see exactly what is happening as the program runs. The contents of register or variable can altered to change the way the program runs. A simulator cant support real interrupts or devices.
DEBUGGER: It is a tool that is used to help identify and fix problems in a program. It supports step by step execution of the code and viewing the contents of code variables. It allows monitoring of registers memory and program statements.
EMULATOR: an emulator is a sophisticated device that pretends that pretends that it is the
microprocessor itself, while at the same time capturing information. The emulator can either be a stand alone device. with its own display, or it can be a interface to a PC. It makes us assure that the hardware is performing accordingly or not.
41
Light emitting diodes, commonly called LEDs do dozens of different jobs and are found in all kinds of devices. Among other things, they form the numbers on digital clocks, transmit information from remote controls, light up watches and tell you when your appliances are turned on. Collected together, they can form images on a jumbo television screen or illuminate a traffic light. Basically, LEDs are just tiny light bulbs that fit easily into an electrical circuit. But unlike ordinary incandescent bulbs, they don't have a filament that will burn out, and they don't get especially hot. They are illuminated solely by the movement of electrons in a semiconductor material, and they last just as long as a standard transistor.
as they may allow the electron flow during both positive and negative half cycles. Four diodes can be arranged to make a full wave bridge rectifier. Different types of filter circuits are used to smooth out the pulsations in amplitude of the output voltage from a rectifier. The property of capacitor to oppose any change in the voltage applied across them by storing energy in the electric field of the capacitor and of inductors to oppose any change in the current flowing through them by storing energy in the magnetic field of coil may be utilized. To remove pulsation of the direct current obtained from the rectifier, different types of combination of capacitor, inductors and resistors may be also be used to increase to action of filtering.
2.16 RELAYS:
In industrial application we need to isolate one circuit electrically from another, while still allowing the first circuit to control the second. The way of providing electrical isolation between two circuits is to place a relay between them.
A relay consists of a coil, which may be energized by the low-voltage circuit, and one or more sets of switch contacts, which may be connected to the high-voltage circuit.
Fig 2.12
43
If a current is passed through the coil, the resulting magnetic field attracts the metal arm and there is now contact between the Normally Open (N.O.) switch contact and the common switch contact.
Coil contacts
N.C. contact
Common contact
N.O. contact
Fig 2.13
44
Fig 2.14
Crystal oscillators are usually, fixed frequency oscillators where stability and accuracy are the primary considerations. For example it is almost impossible to design a stable and accurate LC oscillator for the upper HF and higher frequencies without resorting to some sort of crystal control. Hence the reason for crystal oscillators. This is a typical example of the type of crystal oscillators which may be used for say converters. 45
The MCT2XXX series opt isolators consist of a gallium arsenide infrared emitting diode driving a silicon phototransistor in a 6-pin dual in-line package.
Fig 2.15 There are many situations where signals and data need to be transferred from one subsystem to another within a piece of electronics equipment, or from one piece of equipment to another, without making a direct electrical connection. Often this is because the source and destination are (or may be at times) at very different voltage levels. Relays provide this kind of isolation, but even small relays tend to be fairly bulky compared with ICs and many of todays other miniature circuit components. Because theyre electromechanical, relays are also not as reliable and only capable of relatively low speed operation. Where small size, higher speed and greater reliability are important, a much better alternative is 46
to use an optocoupler. These use a beam of light to transmit the signals or data across an electrical barrier, and achieve excellent isolation. Optocouplers typically come in a small 6-pin or 8-pin IC package, but are essentially a combination of two distinct devices: an optical transmitter, typically a gallium arsenide LED (light-emitting diode) and an optical receiver such as a phototransistor or lighttriggered diac. The two are separated by a transparent barrier which blocks any electrical current flow between the two, but does allow the passage of light. The basic idea is shown in Fig.1, along with the usual circuit symbol for an optocoupler.
Fig 2.16
Usually the electrical connections to the LED section are brought out to the pins on one side of the package and those for the phototransistor or diac to the other side, to physically separate them as much as possible. This usually allows optocouplers to withstand voltages of anywhere between 500V and 7500V between input and output. Optocouplers are essentially digital or switching devices, so theyre best for transferring either on-off control signals or digital data. Analog signals can be transferred by means of frequency or pulse-width modulation. 47
Fig 2.17 In some circuits, there may be a chance that at times the driving voltage fed to the input LED could have reversed polarity (due to a swapped cable connection, for example). This can cause damage to the device, because optocoupler LEDs tend to have quite a low reverse voltage rating: typically only 3 - 5V. So if this is a possibility, a reversed polarity diode should be connected directly across the LED as shown in Fig.3.
48
Fig 2.18
FEATURES:
UL recognized (File # E90700). VDE recognized (File # 94766). Add option V for white package (e.g., MCT2V-M). Add option 300 for black package (e.g., MCT2.300). MCT2 and MCT2E are also available in white package by specifying -M suffix, eg. MCT2-M.
APPLICATIONS:
49
Chapter 3: BIBILIOGRAPHY
WEBSITES
www.electronics-tutorials.com www.electroniccircuits-diagrams.com 2006 www.epanorama.net/links/telephone.html www.tapiex.com/link.htm www.gisdevelopment.net/application/miscellaneous/ma03192.html www.google.com www.8052.com
50
PREFACE
Engineering student gain theoretical knowledge only through their book. Only theoretical knowledge is not sufficient or absolute mastery in any field. It has been experienced that theoretical knowledge is volatile in nature, however practical knowledge make solid foundation in our mind. For the purpose board of technical education, Haryana has pre-scribed a practical training in various industries. So, that we may get more knowledge of Electronics & Communication. The policy behind the practical training is not only to provide the self-job but also produce more technical crops in the country to make the nation developed. So that there will be less import costly advanced technology.
iii