You are on page 1of 12

DIFFERENCES BETWEEN MICROCONTROLLER AND MICROPROCESSOR: Microprocessors have many instructions for moving data from external memory

y to internal memory. But microcontrollers have a few such instructions. Microprocessors have less bit handling instructions, but microcontrollers have many such instructions. Microprocessors are concerned with rapid movement of code and data from external memory. But Microcontroller is concerned with that of bits within the chip. Of course Microprocessor needs additional chips for memory, parallel port, timer etc and microcontroller needs no such external ports.


Figure 2 - 8031 Microcomputer Pinout Diagram

Figure 3 - 8031 Microcomputer logic symbol


The 8051 architecture provides both on chip memory as well as off chip memory expansion capabilities. It supports several distinctive physical address spaces, functionally separated at the hardware level by different addressing mechanisms, read and write controls signals or both: On chip Program Memory On chip Data Memory Off chip Program Memory Off chip Data Memory On chip Special Function Registers The Program Memory area (EPROM incase of external memory or Flash/EPROM incase of internal one) is extremely large and never lose information when the power is removed. Program Memory is used for information needed each time power is applied: Initialization values, Calibration data, Keyboard lookup tables etc along with the program itself. The Program Memory has a 16 bit address and any particular memory location is addressed using the 16 bit Program Counter and instructions which generate a 16 bit address. On chip Data memory is smaller and therefore quicker than Program Memory and it goes into a random state when power is removed. Onchip RAM is used for variables which are calculated when the program is executed. In contrast to the Program Memory, On chip Data Memory accesses need a single 8 bit value (may be a constant or another variable) to specify a unique location. Since 8 bits are more than sufficient to address 128 RAM locations, the onchip RAM address generating register is single byte wide.

Different addressing mechanisms are used to access these different memory spaces and this greatly contributes to microcomputers operating efficiency. The 64K byte Program Memory space consists of an internal and an external memory portion. If the EA pin is held high, the 8051 executes out of internal Program Memory unless the address exceeds 0FFFH and locations 1000H through FFFFH are then fetched from external Program Memory. If the EA pin is held low, the 8031 fetches all instructions from the external Program Memory. In either case, the 16 bit Program Counter is the addressing mechanism.

Figure 4 - Program Memory The Data Memory address space consists of an internal and an external memory space. External Data Memory is accessed when a MOVX instruction is executed.

Apart from onchip Data Memory of size 128/256 bytes, total size of Data Memory can be expanded up to 64K using external RAM devices. Total internal Data Memory is divided into three blocks: Lower 128 bytes. Higher 128 bytes Special Function Register space. Higher 128 bytes are available only in 8032/8052 devices.

Even though the upper RAM area and SFR area share same address locations, they are accessed through different addressing modes. Direct addresses higher than 7FH access SFR memory space and indirect addressing above 7FH access higher 128 bytes (in 8032/8052).

Figure 5 - Internal Data Memory The next figure indicates the layout of lower 128 bytes. The lowest 32 bytes (from address 00H to 1FH) are grouped into 4 banks of 8 registers. Program instructions refer these registers as R0 through R7. Program Status Word indicates which register bank is being used at any point of time.

Figure 7 - Lower 128 Bytes of Internal RAM The next 16 bytes above these register banks form a block of bit addressable memory space. The instruction set of 8031 contains a wide range of single bit processing instructions and these instructions can directly access the 128 bits of this area. The SFR space includes port latches, timer and peripheral control registers. All the members of 8031 family have same SFR at the same SFR locations. There are some 16 unique locations which can be accessed as bytes and as bits.

POWER SUPPLY Block Diagram The ac voltage, typically 220V rms, is connected to a transformer, which steps that ac voltage down to the level of the desired dc output. A diode rectifier then provides a full-wave rectified voltage that is initially filtered by a simple capacitor filter to produce a dc voltage. This resulting dc voltage usually has some ripple or ac voltage variation. A regulator circuit removes the ripples and also remains the same dc value even if the input dc voltage varies, or the load connected to the output dc voltage changes. This voltage regulation is usually obtained using one of the popular voltage regulator IC units.






Fig 5.3 Block Diagram of Power supply

Working principle Transformer The potential transformer will step down the power supply voltage (0-230V) to (06V) level. Then the secondary of the potential transformer will be connected to the precision rectifier, which is constructed with the help of opamp. The advantages of using precision rectifier are it will give peak voltage output as DC, rest of the circuits will give only RMS output.

Bridge rectifier When four diodes are connected as shown in figure, the circuit is called as bridge rectifier. The input to the circuit is applied to the diagonally opposite corners of the network, and the output is taken from the remaining two corners. Let us assume that the transformer is working properly and there is a positive potential, at point A and a negative potential at point B. the positive potential at point A will forward bias D3 and reverse bias D4. The negative potential at point B will forward bias D1 and reverse D2. At this time D3 and D1 are forward biased and will allow current flow to pass through them; D4 and D2 are reverse biased and will block current flow. The path for current flow is from point B through D1, up through RL, through D3, through the secondary of the transformer back to point B. this path is indicated by the solid arrows. Waveforms (1) and (2) can be observed across D1 and D3. One-half cycle later the polarity across the secondary of the transformer reverse, forward biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be from point A through D4, up through RL, through D2, through the secondary of T1, and back to point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can be observed across D2 and D4. The current flow through RL is always in the same direction. In flowing through RL this current develops a voltage corresponding to that shown waveform (5). Since current flows through the load (RL) during both half cycles of the applied voltage, this bridge rectifier is a full-wave rectifier. One advantage of a bridge rectifier over a conventional full-wave rectifier is that with a given transformer the bridge rectifier produces a voltage output that is nearly twice that of the conventional full-wave circuit.

This may be shown by assigning values to some of the components shown in views A and B. assume that the same transformer is used in both circuits. The peak voltage developed between points X and y is 1000 volts in both circuits. In the conventional full-wave circuit shownin view A, the peak voltage from the center tap to either X or Y is 500 volts. Since only one diode can conduct at any instant, the maximum voltage that can be rectified at any instant is 500 volts. The maximum voltage that appears across the load resistor is nearly-but never exceeds-500 v0lts, as result of the small voltage drop across the diode. In the bridge rectifier shown in view B, the maximum voltage that can be rectified is the full secondary voltage, which is 1000 volts. Therefore, the peak output voltage across the load resistor is nearly 1000 volts. With both circuits using the same transformer, the bridge rectifier circuit produces a higher output voltage than the conventional full-wave rectifier circuit. IC voltage regulators Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the circuitry for reference source, comparator amplifier, control device, and overload protection all in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative voltage, or an adjustably set voltage. The regulators can be selected for operation with load currents from hundreds of milli amperes to tens of amperes, corresponding to power ratings from milli watts to tens of watts.

Fig 2.6 Circuit Diagram of Power Supply A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi, applied to one input terminal, a regulated dc output voltage, Vo, from a second terminal, with the third terminal connected to ground. The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts. Similarly, the series 79 regulators provide fixed negative regulated voltages from 5 to 24 volts. For ICs, microcontroller, LCD --------- 5 volts For alarm circuit, op-amp, relay circuits ---------- 12 volts