You are on page 1of 30

A SUMMER TRAINING REPORT ON EMBEDDED SYSTEM

0 SUBMITTED TO: SUBMITTED BY:

MS. ANILA DHINGRA HOD ECE

ABHILASH JAIN ECE

LIST OF CONTENTS:
Preface Acknowledgment Table of content List of tables List of figures List of appendices Chapter 1 1. Introduction 2. Conclusion

Preface:
This training report is all about the embedded systems and its application in various fields of real world. We are living in the Embedded World. We are surrounded with many embedded products and our daily life largely depends on the proper functioning of these gadgets. Television, Radio, CD player, Washing Machine or Microwave Oven in our kitchen, Card readers, Access Controllers, Palm devices of our work space enable us to do many of our tasks very effectively. Apart from all these, many controllers embedded in our car take care of car operations between the bumpers. All kinds of magazines and journals regularly dish out details about latest technologies, new devices; fast applications which make us believe that our basic survival is controlled by these embedded products. Now we can agree to the fact that these embedded products have successfully invaded into our world. What is this Embedded System? Theoretically, an embedded controller is a combination of piece of microprocessor based hardware and the suitable software to undertake a specific task.

ACKNOWLEDGEMENT:
Success is a sweet fruit, which everyone strives to taste. To achieve this goal, one has to put in a lot of physical and mental efforts. Each time we write this report, gain stronger appreciation for the following fact: we couldnt do it without the help of many talented and dedicated people. So we wish to express our appreciation to those whose help has been most valuabl Firstly, we would like to express our gratitude and appreciation to Mr. Tarun shrivastav (Head of company).who explained us everything

about the training process at the company and made us familiar with the company staff. We are equally grateful to Mr.Dinesh saini (Instructor who sorted out many of our problems regarding the training and gave us proper material to work with). I am deeply indebted to my HOD Ms. ANILA DHINGRA for their suggestions and encouragements.

Finally,I would like to say thanks to all the people of company for their kind of co-operation.

Company profile: Introduction:

ENERTRAK METERS global IT consulting firm of ambitious and aggressive professionals specializing in researching (electronics, circuit designing) and core IT Sector In today's competitive business environment, quick and timely responses to changes in business dynamics are key to survival. They work closely with us and help to carry out any project from conception to implementation. .

CONCLUSION:
ENERTRAK METERS is committed to offering short-term training that is specific in nature. It helped us to develop a sense of professionalism in relation to our job skills and performance. All learning areas utilized industry an Industry, We got to learn about various processes like Toner Transformation thermal process, embedded interfacing. Excellent, competitive, dynamic learning environment, with full time lab monitors, open at weekends, well equipped labs helped us to understand the various processes efficiently. Practical implementation & minute details helped us to develop our own logic with basic understanding of the circuits. This turned our raw ideas turn into something useful. working visual on CAD tools, micro PCB designing, coding languages with like basic, controller RS232 standards equipment and technologies, which gave us the real environment of working in

Embedded system INTRODUCTION:


An embedded system is a computer system designed to perform one or few dedicated function, often with real time computing constraints. It is usually embedded as part of a complete device including hardware and mechanical parts. In contrast, a general-purpose computer, such as a personal computer, is designed to be flexible and to meet a wide range of end users needs. Embedded systems control many of the common devices in use today. Embedded system is controlled by a main processing core that is typically either a microcontroller or a digital signal processor (DSP). Since the embedded system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product, or increasing the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale. Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations like traffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure. In general, "embedded system" is not an exactly defined term, as many systems have some element of programmability. For example, Handheld computers share some elements with embedded systems such as the operating systems and microprocessors which power them but are not truly embedded systems, because they allow different applications to be loaded and peripherals to be connected.

Variety of Embedded system:


Embedded systems span all aspects of modern life and there are many examples of their use. Automated tiller machine(ATMS) Telecommunications systems employ numerous embedded systems from telephone switches for the network to mobile phones at the end-user. Computer networking uses dedicated routers and network bridges to route data. Transportation systems from flight to automobiles increasingly use embedded systems. New airplanes contain advanced avionics such as inertial guidance systems and GPS receivers that also have considerable safety requirements Consumer electronics include personal digital assistants (PDAs), mp3 players, mobile phones, videogame consoles, digital cameras, DVD players, GPS receivers, and printers. Various electric motors brushless DC motors, induction motors and DC motors are using electric/electronic motor controllers. Home Automation products like thermostat, air conditioners sprinkles & security monitoring system. Household appliances including microwave ovens, washing machines, recorders.

Multimedia appliances: internet radio receivers, TV set top boxes. Engine controllers and autilock brake controllers for automobiles. Measurment equipment such as digital storage oscilloscope, logic analyzer & spectrum analyzers. Wearable computers. Stationary video game controllers. Programmable logic controllers (PLCS) for industrial automation & monitoring. Personal digital assistants (PDAS) i.e. small hand held computer with PLMS and other applications. Cellular telephones & telephonic switches. Medical equipment: electronic stethoscopes for amplifying sounds, and various medical imaging (PET, SPECT, CT, MRI) for non-invasive internal inspections.

CHARACTERSTICS:
1. 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. For example, the Gibson Robot Guitar features an embedded system for tuning the strings, but the overall purpose of the Robot Guitar is, of course, to play music. Similarly, an embedded system in an automobile provides a specific function as a subsystem of the car itself. 2. 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. Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have realtime 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.

Microprocessor V/s Microcontroller:


Microprocessor and microcontroller are two popular terms in world of computer.however microprocessor and microcontroller has different functions and features. 1) Microprocessor requires external components or circuits to implement program memory, RAM memory and Input/Output, whereas microcontrollers incorporate program memory, RAM memory, and Input/Output port into one chip. 2) Intels 8085, 80386 and Pentium are examples of microprocessor whereas Microchips PIC series and Atmels AVR series are example of microcontroller. 3) MP is expensive and MC is comparatively cheap. 4) MP is bulkier with the addition of external RAM and ROM, whereas MC occupies less space. 5) The prime use of mp is to read data,perform extensive calculations on the data and store them in mass storage device or display it.The

prime function of mc is to read data,perform limited calculations on it,control its environment based on these data. 6) Thus the mp is said to be general -purpose digital computer whereas the mc are intend to be special purpose digital controller. 7) Mp needs many opcodes to for moving data from external memory to the CPU,mc may require just one or two,also mp may have one or two types of bit handling instructions whereas mcs have many. 8) Thus mp is concerned with the rapid movement of code and data from the external addresses to the chip, mc is concerned with the rapid movement of the bits within the chip. 9) Lastly, the mp design accomplishes the goal of flexibility in the hardware configuration by enabling large amounts of memory and I/O that could be connected to the address and data pins on the IC package.The mc design uses much more limited set of single and double byte instructions to move code and data.

Various Microcontrollers:
First Microcontroller is 8031:
FEATURES 1. It is neither an Intels product.neither a microprocessor nor a microcontroller. 2. It is an 8-bit controller. 3. Internally no ROM is provided i.e. code is outside the chip. Second Microcontroller is 8051: FEATURES 1. It is a first complete 8-bit microcontroller.

2. It is a name of family, in which the instruction set, pin configuration, architecture are same, only memory storage capacity is different. 3. Internally PROM (programmable read only memory) is provided so it is called one time programmable (OTP).

Third Microcontroller isAT89C51:


FEATURES
1. It is similar to the 8051 microcontroller i.e. having same instruction

set, pin configuration, architecture. 2. It is also an 8-bit microcontroller. Its cost is only Rs 10 more than 8051. 3. It uses EPROM (erasable programmable read only memory) or FLASH memory. 4. It is multiple time programmable (MTP) i.e. 1000 times. So it is better than 8051.

8051 Microcontroller:
The 8051 provides the following standard features 4Kbytes of ROM, 128 bytes of RAM, 32 I/O lines, two 16 bit timer/counter, A five vector two- level interrupt architecture, a full duplex serial port, on-chip oscillator and lock circuitry .In addition, 8051 is designed with static logic for operation down to zero frequency

and supports two software selectable power saving modes. The Idle mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

The 8051 Microcontrollers Architecture consists of these specific


features

8-bit data bus 16-bit address bus 32 general purpose register each of 8-bits

16 bit timers (usually 2, but may have more, or less). y 3 internal and 2 external interrupts Bit as well as byte addressable RAM area of 16 bytes. Four 8-bit ports, (short models have two 8-bit ports). 16-bit program counter and data pointer

PIN DESCRIPTION OF 8051:

PIN 9: PIN 9 is the reset pin which is used reset the microcontrollers internal registers and Ports upon starting up.2 machine cycle should be high at this pin.

PINS 18 & 19: The 8051 has a built-in oscillator amplifier hence we need to only connect a Crystal at these pins to provide clock pulses to the circuit.

PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. The 8051 chip needs +5V 500mA to function properly.

PINS 29, 30 & 31: As described in the features of the 8051, this chip contains a built-in flash memory. In order to program this we need to supply a voltage of +12V at pin 31. If external memory is connected then PIN 31, also called EA/VPP, should be connected to ground to indicate the presence of external memory. PIN 30 is called ALE (address latch enable), which is used when multiple memory chips are connected to the controller and only one of them needs to be selected. PIN 29 is called PSEN. This is "program select enable". In order to use the external memory it is required to provide the low voltage (0) on both PSEN and EA pins.

Ports: There are 4 8-bit ports: P0, P1, P2 and P3. PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or additional functions associated with them based upon the context of their usage. PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3 has additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2 external counter inputs, read and write pins for memory access. PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P2 acts as A8- A15. PORT P0 (pins 32 to 39): PORT P0 can be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0-AD7.

REGISTERS:
The Accumulator: The Accumulator, as its name suggests, is used as a general register to accumulate the results of a large number of instructions. It can hold an 8-bit (1-byte) value and is the most versatile register the 8051 has due to the shear number of instructions that make use of the accumulator. More than half of the 8051s 255 instructions manipulate or use the accumulator in some way

The "R" registers: The "R" registers are a set of eight registers that are named R0, R1, etc. up to and including R7.These registers are used as auxiliary registers in many operations. The "B" Register: The "B" register is very similar to the Accumulator in the sense that it may hold an 8bit (1- byte) value. The "B" register is only used by two 8051 instructions: MUL AB and DIV AB. Thus, if you want to quickly and easily multiply or divide A by another number, you may store the other number in "B" and make use of these two instructions. Aside from the MUL and DIV an instruction, the B register is often used as yet another temporary storage register much like a ninth "R" register. The Data Pointer (DPTR): The Data Pointer (DPTR) is the 8051s only user-accessible 16-bit (2-byte) register. The Accumulator, "R" registers, and "B" register are all 1-byte values. DPTR, as the name suggests, is used to point to data. It is used by a number of commands which allow the 8051 to access external memory. When the 8051 accesses external memory, it will access external memory at the address indicated by DPTR. The Program Counter (PC): The Program Counter (PC) is a 2-byte address which tells the 8051 where the next instruction to execute is found in memory. When the 8051 is initialized PC always starts at 0000h and is incremented each time an instruction is executed. It is important to note that PC isnt always incremented by one. Since some instructions require 2 or 3 bytes the PC will be incremented by 2 or 3 in these cases. The Program Counter is special in that there is no way to directly modify its value.
The Stack Pointer (SP) : The Stack Pointer, like all registers except DPTR and PC, may hold an 8-bit (1-byte) value. The Stack Pointer is used to indicate where the next value to be removed from the stack should be taken from. When you push a value onto the stack, the 8051 first increments the value of SP and then stores the value at the resulting memory location. When you pop a value off the stack, the 8051 returns the value from the memory location indicated by SP and then decrements the value of SP.

This order of operation is important. When the 8051 is initialized SP will be initialized to 07h. If you immediately push a value onto the stack, the value will be stored in Internal RAM address 08h. This makes sense taking into account what was mentioned two paragraphs above

First the 8051 will increment the value of SP (from 07h to 08h) and then will store the pushed value at that memory address (08h). The Special Function Register (SFR): The Special Function Register (SFR) is the upper area of addressable memory, from address 0x80 to 0xFF. This area of memory cannot be used for data or program storage, but is instead a series of memory-mapped ports and registers. All port input and output can therefore be performed by memory move operations on specified addresses in the SFR. Also, different status registers are mapped into the SFR, for use in checking the status of the 8051, and changing some operational parameters of the 8051. The 4 ports, register A, B, and stack pointer SP have already been explained above. The rest of the SFR are explained below. DPL/DPH (Data Pointer Low/High, Addresses 82h/83h): The SFRs DPL and DPH work together to represent a 16-bit value called the Data Pointer. The data pointer is used in operations regarding external RAM and some instructions involving code memory. Since it is an unsigned twobyte integer value, it can represent values from 0000h to FFFFh (0 through 65,535 decimal).

ADDRESSING MODES:
TCON (Timer Control, Addresses 88h, Bit-Addressable): The Timer Control SFR is used to configure and modify the way in which the 8051's two timers operate. This SFR controls whether each of the two

timers is running or stopped and contains a flag to indicate that each timer has overflowed. Additionally, some non-timer related bits are located in the TCON SFR. These bits are used to configure the way in which the external interrupts are activated and also contain the external interrupt flags which are set when an external interrupt has occurred.

TMOD (timer mode, Adderess 89h): The Timer Mode SFR is used to configure the mode of operation of each of the two timers. Using this SFR your program may configure each timer to be a 16-bit timer, an 8-bit auto reload timer, a 13-bit timer, or two separate timers. Additionally, you may configure the timers to only count when an external pin is activated or to count "events" that are indicated on an external pin.

TL0/TH0 (Timer 0 Low/High, Addresses 8Ah/8Ch): These two SFRs, taken together, represent timer 0. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value.

TL1/TH1 (Timer 1 Low/High, Addresses 8Bh/8Dh): These two SFRs, taken together, represent timer 1. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value. SCON (serial Control, Addresses 98h, bit Addressable): The Serial Control SFR is used to configure the behavior of the 8051's onboard serial port. This SFR controls the baud rate of the serial port, whether the serial port is activated to receive data, and also contains flags that are set when a byte is successfully sent or received...

SBUF (Serial Control, Addresses 99h): The Serial Buffer SFR is used to send and receive data via the on-board serial port. Any value written to SBUF will be sent out the serial port's TXD pin. Likewise, any value which the 8051 receives via the serial port's RXD pin will be delivered to the user program via SBUF. In other words, SBUF serves as the output port when written to and as an input port when read from. IE (Interrupt Enable, Addresses A8h): The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the specific interrupts, where as the highest bit is used to enable or disable ALL interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an individual interrupt is enabled by setting a lower bit.

TYPES OF MEMORY:
The 8051 has three very general types of memory. To effectively program the 8051 it is necessary to have a basic understanding of these memory types. The memory types are illustrated in the following graphic. They are: On-Chip Memory, External Code Memory, and External RAM. On-Chip Memory refers to any memory (Code, RAM, or other) that physically exists on the microcontroller itself. On-chip memory can be of several types, but we'll get into that shortly. External Code Memory is code (or program) memory that resides off-chip. This is often in the form of an external EPROM. External RAM is RAM memory that resides off-chip. This is often in the form of standard static RAM or flash RAM.

TIMERS:
The 8051 comes equipped with two timers, both of which may be controlled, set, read, and configured individually. The 8051 timers have three general functions: 1) Keeping time and/or calculating the amount of time between events, 2) Counting the events themselves, or 3) Generating baud rates for the serial port.

As mentioned before, the 8051 has two timers which each function essentially the same way. One timer is TIMER0 and the other is TIMER1. The two timers share two SFRs (TMOD and TCON) which control the timers, and each timer also has two SFRs dedicated solely to itself (TH0/TL0 and TH1/TL1).

13-bit time mode: Timer mode "0" is a 13-bit timer. This is a relic that was kept around in the 8051 to maintain compatibility with its predecessor, the 8048. Generally the 13-bit timer mode is not used in new development. When the timer is in 13bit mode, TX will count from 0 to 31. When TLx is incremented from 31, it will "reset" to 0 and increment THx. Thus, effectively, only 13 bits of the two timer bytes are being used: bits 0-4 of TLx and bits 0-7 of THx. This also means, in essence, the timer can only contain 8192 values. If you set a 13-bit timer to 0, it will overflow back to zero 8192 machine cycles later. 16-bit Time Mode (mode 1): Timer mode "1" is a 16-bit timer. This is a very commonly used mode. It functions just like 13- bit mode except that all 16 bits are used. TLx is incremented from 0 to 255. When TLx is incremented from 255, it resets to 0 and causes THx to be incremented by 1. Since this is a full 16bit timer, the timer may contain up to 65536 distinct values. If you set a 16-bit timer to 0, it will overflow back to 0 after 65,536 machine cycles. 8-bit Time Mode (mode 2) Timer mode "2" is an 8-bit auto-reload mode. What is that, you may ask? Simple. When a timer is in mode 2, THx holds the "reload value" and TLx is the timer itself. Thus, TLx starts counting up. When TLx reaches 255 and is subsequently incremented, instead of resetting to 0 (as in the case of modes 0 and 1), it will be reset to the value stored in THx.

For example, lets say TH0 holds the value FDh and TL0 holds the value FEh. If we were to watch the values of TH0 and TL0 for a few machine cycles this is what wed see: As you can see, the value of TH0 never changed. In fact, when you use mode 2 you almost always set THx to a known value and TLx is the SFR that is constantly incremented. Split Timer Mode (mode 3): Timer mode "3" is a split-timer mode. When Timer 0 is placed in mode 3, it essentially becomes two separate 8-bit timers. That is to say, Timer 0 is TL0 and Timer 1 is TH0. Both timers count from 0 to 255 and overflow back to 0. All the bits that are related to Timer 1 will now be tied to TH0. While Timer 0 is in split mode, the real Timer 1 (i.e. TH1 and TL1) can be put into modes 0, 1 or 2 normally--however, you may not start or stop the real timer 1 since the bits that do that are now linked to TH0. The real timer 1, in this case, will be incremented every machine cycle no matter what.

INTERRUPTS:
As the name implies, an interrupt is some event which interrupts normal program execution. As stated earlier, program flow is always sequential, being altered only by those instructions which expressly cause program flow to deviate in some way. However, interrupts give us a mechanism to "put on hold" the normal program flow, execute a subroutine, and then resume normal program flow as if we had never left it. This subroutine, called an interrupt handler, is only executed when a certain event (interrupt) occurs. The event may be one of the timers "overflowing," receiving a character via the serial port, transmitting a character via the serial port, or one of two "external events." The 8051 may be configured so that when any of these events occur the main program is temporarily suspended and control passed to a special section code which presumably would execute some function related to the event that occurred. Once complete, control would be returned to the original program. The main program never even knows it was interrupted. The ability to interrupt normal program execution when certain events occur makes it much easier and much more efficient to handle certain conditions. If it were not for interrupts we would have to manually check in our main program whether the timers had over flown, whether we had received another character via the serial port, or if some external event had occurred. Besides making the main program ugly and hard to read, such a situation would make our program inefficient since wed be burning precious "instruction cycles" checking for events that usually dont happen.

We can configure the 8051 so that any of the following events will cause an interrupt: >Timer 0 Overflow. >Timer 1 Overflow. >Reception/Transmission of Serial Character. >External Event 0. >External Event 1. In other words, we can configure the 8051 so that when Timer 0 overflows or when a character is sent/received, the appropriate interrupt handler routines are called. Polling Sequence: The 8051 automatically evaluates whether an interrupt should occur after every instruction. When checking for interrupt conditions, it checks them in the following order. >External 0 Interrupt >Timer 0 Interrupt >External 1 Interrupt >Timer 1 Interrupt >Serial Interrupt This means that if a Serial Interrupt occurs at the exact same instant that an External 0 Interrupt occurs, the External 0 Interrupt will be executed first and the Serial Interrupt will be executed once the External 0 Interrupt has completed.

SERIAL PORT COMMUNICATION


One of the 8051s many powerful features is its integrated UART, otherwise known as a serial port. The fact that the 8051 has an integrated serial port means that you may very easily read and write values to the serial port. If it were not for the integrated serial port, writing a byte to a Serial line would be a rather tedious process requiring turning on and off one of the I/O lines in rapid succession to properly "clock out" each individual bit, including start bits, stop bits, and parity bits. However, we do not have to do this. Instead, we simply need to configure the serial ports operation mode and baud rate. Once configured, all we have to do is write to an SFR to write a value to the serial port or read the same SFR to read a value from the serial port. The 8051 will automatically let us know when it has finished sending the character we wrote and will also let us know whenever it has received a byte so that we can process it. We do not have to worry about transmission at the bit level--which saves us quite a bit of coding and processing time

The first thing we must do when using the 8051s integrated serial port is, obviously, configure it. This lets us tell the 8051 how many data bits we want, the baud rate we will be using, and how the baud rate will be determined. First, lets present the "Serial Control" (SCON) SFR and define what each bit of the SFR represents:

COMPONENT DESCRIPTION:
Resistors
Example: Function Resistors restrict the flow of electric current, for example a resistor is placed in series with a light-emitting diode (LED) to limit the current passing through the LED. Connecting and soldering Resistors may be connected either way round. They are not damaged by heat when soldering. The Resistor Colour Code Colour Number Black Brown Red Orange Yellow Green Blue Violet Grey White Resistor values - the resistor colour code Resistance is measured in ohms, the symbol for ohm is an omega 1 is quite small so resistor values are often given in k and M . 1 k = 1000 1 M = 1000000 . Resistor values are normally shown using coloured bands. Each colour represents a number as shown in the table. Most resistors have 4 bands:

Circuit symbol:

0 1 2 3 4 5 6 7 8 9

The first band gives the first digit. The second band gives the second digit. The third band indicates the number of zeros. The fourth band is used to shows the tolerance (precision) of the resistor, this may be ignored for almost all circuits but further details are given below.

This resistor has red (2), violet (7), yellow (4 zeros) and gold bands. So its value is 270000 = 270 k . On circuit diagrams the is usually omitted and the value is written 270K.

LED

Example:

Circuit symbol:

Function LEDs emit light when an electric current passes through them.

Connecting and soldering LEDs must be connected the correct way round, the diagram may be labelled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and there may be a slight flat on the body of round LEDs. If you can see inside the LED the cathode is the larger electrode (but this is not an official identification method).

LEDs can be damaged by heat when soldering, but the risk is small unless you are very slow. No special precautions are needed for soldering most LEDs. Testing an LED Never connect an LED directly to a battery or power supply! It will be destroyed almost instantly because too much current will pass through and burn it out. LEDs must have a resistor in series to limit the current to a safe value, for quick testing purposes a 1k resistor is suitable for most LEDs if your supply voltage is 12V or less. Remember to connect the LED the correct way round!

Colours of

LEDs

LEDs are available in red, orange, amber, yellow, green, blue and white. Blue and white LEDs are much more expensive than the other colours. The colour of an LED is determined by the semiconductor material, not by the colouring of the 'package' (the plastic body). LEDs of all colours are available in uncoloured packages which may be diffused (milky) or clear (often described as 'water clear'). The coloured packages are also available as diffused (the standard type) or transparent.

Capacitors
Function
Capacitors store electric charge. They are used with resistors in timing circuits because it takes time for a capacitor to fill with charge. They are used to smooth varying DC supplies by acting as a reservoir of charge. They are also used in filter circuits because capacitors easily pass AC (changing) signals but they block DC (constant) signals.

Capacitance:

This is a measure of a capacitor's ability to store charge. A large capacitance means that more charge can be stored. Capacitance is measured in farads, symbol F. However 1F is very large, so prefixes are used to show the smaller values. Three prefixes (multipliers) are used, (micro), n (nano) and p (pico):

Colour Code Colour Number Black Brown 0 1 2 3 4 5 6 7 8 9

means 10-6 (millionth), so 1000000F = 1F n means 10-9 (thousand-millionth), so 1000nF = 1F p means 10-12 (million-millionth), so 1000pF = 1nF

Capacitor values can be very difficult to find because there Red are many types of capacitor with different labelling systems! Orange

Capacitor Colour Code:


A colour code was used on polyester capacitors for many

Yellow Green

years. It is now obsolete, but of course there are many still Blue around. The colours should be read like the resistor code, Violet the top three colour bands giving the value in pF. Ignore the Grey 4th band (tolerance) and 5th band (voltage rating). For example: brown, black, orange means 10000pF = 10nF = 0.01F. Note that there are no gaps between the colour bands, so 2 identical bands actually appear as a wide band. For example: wide red, yellow means 220nF = 0.22F.

White

REFERENCES:
1. www.8051projects.net 2.www.atmel.com 3.www.google.com 4.www.encyclopedia.com 5.www.wikipedia.com

You might also like