Showing posts with label PINS AND SIGNALS OF 8031/8051. Show all posts
Showing posts with label PINS AND SIGNALS OF 8031/8051. Show all posts

SERIAL DATA COMMUNICATION IN 8051 MICROCONTROLLER

•    The fastest way of transmitting data, within a microcomputer is parallel data transfer.

•    For transferring data over long distances, however, parallel data transmission requires too many wires.

•    For long distance transmission, data is usually converted from parallel form to serial form so that it can be sent on a single wire or pair of wires.

•    Serial data received from a distant source is converted to parallel form and it can be easily transferred on the microcomputer buses.

•    The types of communication systems are,

1.    Simplex   2.  Half-duplex    3.  Full-duplex
  •    In simplex communication, data can be transmitted only in one direction, ie. data from sensors to processor. Eg : commercial radio stations.
  •     In half-duplex transmission, data can be transmitted in either direction between two systems, but can occur only in one direction at a time. Eg : two-way radio system, where one user always listens while the other talks because the receiver circuitry is turned off during transmit.
  •   In full duplex, the data can be send and received at the same time. Eg : A normal phone conversation.

·         Serial data can be sent by two ways.
They are,
1.      Synchronous communication    
  
2.      2. Asynchronous communication

  In synchronous transmission, data are transmitted in block at a constant rate.

  The start and end of a block are identified with specific bytes or bit patterns.

  In asynchronous transmission, data is transmitted one by one.

  The beginning of a data character is indicated by the line going low for 1 bit time. This bit is called a start bit.

  The data bits are then sent out on the line one after the other. Note that the least-significant bit is sent out first. Depending on the system, the data word may consist of 5, 6, 7 or 8 bits.

 Following the data bits is a parity bit, which is used to check for errors in received data.

The line is returned high for at least 1-bit time to identify the end of the character. This always-high bit is referred to as a stop bit. Some systems may use 2 stop bits.


    The bit format for asynchronous data transmission is,







•    The term baud rate is used to indicate the rate at which serial data is being transferred.
Baud rate = 1/ time for a bit cell

•    A device such as INTEL 8251A, which can be programmed to do either asynchronous or synchronous communication, is often called USART (Universal Synchronous Asynchronous Receiver Transmitter).

•    A device such as the National 1NS8250, which can only do asynchronous communication, is often referred to as a Universal Asynchronous Receiver Transmitter (UART).

•    For sending serial data over long distances the standard telephone system is a convenient path, because the wiring and connections are already in place.

•    Standard phone lines often referred to as switched lines because any two points can be connected together through a series of switches and have a bandwidth of about 300 to 3000 Hz.

•    But digital signals require very large bandwidth (typically 5 MHz). Therefore, digital signals cannot be sent directly over standard phone lines. So, the digital signals are converted to audio-frequency tones, which are in the frequency range.

•    The device used to do this conversion and to convert transmitted tones back to digital information is called a MODEM.

•    Modems and other equipment used to send serial data over long distances are known as data communication equipment or DCE. The terminals and computers that are sending or receiving the serial data are referred to as data terminal equipment or DTE.

 RS-232C serial data standard:

•    In serial I/O, data can be transmitted as either current or voltage.

•    When data are transmitted as voltage, the commonly used standard is known as RS-232C.

•    This standard, proposes a maximum of 25 signals for the bus used for serial data transfer.

•    The 25 signals of RS-232C are,






•    In practice the first 9-signals are sufficient for most of the serial data transmission scheme and so the RS-232C bus signals are terminated on a D-type 9-pin connector.


•    When all the 25 signals are used, then RS-232C serial bus is terminated on a 25-pin connector.



•    The RS-232C signal levels are not compatible with TTL logic levels. Hence for interfacing TTL devices, level converters or RS-232C line drivers are employed.

•    The popularly used level converters are,

1.    MC1488 - TTL to RS-232C level converter.

2.    MC1489 - RS-232C to TTL level converter.

3.    MAX 232 - Bidirectional level converter.

(Max 232 is equivalent to a combination of MC 1488 and MCI 489 in single IC)

•    The pin diagram of MAX 232 is,



•    For MAX 232 all capacitor should be 1µF.

•    The voltage rating of all capacitor should above 10V.

Data Memory Of 8031/8051 Microcontroller

•    In 8031/8051 microcontroller the entire 64kb data memory space is external.

•    The address range of external data memory is 0000H to FFFFH.

•    Apart from external data memory the 8031/8051 has 256 bytes of internal data memory in which the first 128 bytes are called RAM and next 128 byte is called SFR.

•    The address range of SFRs and internal RAM are 00H to FFH

•    The “MOVX” instruction is used to access the external data memory.

•    The internal data memory space for 8051 is divided into three blocks: Lower 128bytes, Upper 128 bytes and SFRs.

•    The upper addresses and SFRs occupy the same block of address space, 80H through FFH, and they are physically separate entities.

•    The upper address is accessible by indirect addressing only and SFRS are accessible by direct addressing only.

•    Lower address space can be accessed either by direct addressing or by indirect addressing.


The 8051 Data Memory



•    The circuit diagram for connecting external data memory is shown. The multiplexed address / data bus is provided by port 0.

•    Port 2 gives the higher order address bus.

•     The RD (Low) and WR (Low) signals from 8051 selects the memory read and memory write operation, respectively.

Accessing External Data Memory



ARCHITECTURE OF 8031/8051 MICROCONTROLLER

ARCHITECTURE OF 8031/8051

CPU - Central processing Unit:

1. ALU:

•    It performs the arithmetic operations such as addition, subtraction, multiplication and division.

•    The unit can perform logical operations such as AND, OR; and Exclusive-OR, as well as rotate, clear, and complement.

•    The ALU can also manipulate one bit as well as eight-bit data types.

•    Individual bits may be set, cleared, complemented, tested, and used in logic computation.
   
2. Accumulator:

•    It is an 8-bit register.

•    It holds a data and receives the result of the arithmetic instructions.

3. B register: 

  An 8-bit general-purpose register.

4. Program Status Word:

•    Many instructions implicitly or explicitly affect (or are affected by) several status flags, which are grouped together to form the Program Status Word.

•    It also used to select the memory bank.


5. Stack Pointer (SP):

•    The stack pointer register is 8 bit wide.

•    It is incremented before data is stored during PUSH and CALL instructions.

•    After reset the value of SP is 07H.

6. Data Pointer (DPTR):

•    The data pointer is a 16-bit register used to hold the 16-bit address of data memory.

•    This can also be used as two numbers of 8-bit data pointer namely DPH and DPL.

•    The 8-bit data pointers are used for accessing internal RAM and SFR.

•    The 16-bit data pointer is used for accessing external data memory.

•    The contents of data pointer are programmable using instructions.

7. Program Counter (PC):

•    It is a 16 bit register.

•    PC is used, as address pointer to access program instructions and it is automatically incremented after every byte of instruction fetch.

I/O Devices:

•    The 8051 has four numbers of 8-bit ports namely port-0, port- 1, port-2 and port-3.

•    Each port has a latch and driver (or buffer).

•    When external memory is employed the port-0 lines will function as multiplexed low byte address/data lines and port-2 lines will function as high byte address lines.

•    Also the port pins P3.7 and P3.6 are used to output read and write control signals respectively.

•    The port-1 is dedicated I/O port and does not have any alternate function.

•    The ports are also mapped as internal memory in the controller and so they can be addressed as memory locations for 8-bit operation.

Instruction Register (IR) & timing and control unit:

•    The 8051 has 8-bit ALU, which performs arithmetic and logical operations on binary data.

•    The A and B registers are used to hold the input data and the result of ALU operation.

•    The controller will fetch the instructions one by one, starting from the address stored in PC and store in IR, which decodes the instructions and give information to timing and control unit.

•    Using the information supplied by the IR unit the control signals necessary for internal and external operations are generated by the timing and control unit.

Timer/Counter & Serial port:

•    The 8031/8051 has two 16-bit programmable timer/counter namely timer-1 and timer 0.

•    In the counter mode of operation they can count the number of high to low transitions of the signal applied to the timer pins.

•    In timer mode of operation they can be independently programmed to work in any one of the four operation modes. They are called mode-0, mode-1, mode-2 and mode-3.

•    In mode-0 the serial port can either receive or transmit at fixed baud rate.

•    In mode-2 it can simultaneously transmit and receive at any one of the two selectable baud rate.

•    In mode-1 and mode-3 it can work as full duplex serial port with variable baud rate, which is programmed using timer-1.

 Memory Organization:

•    Since the size of address pointers are 16-bit they can address up to 216 = 64kb memory locations.

•    A microcontroller based system requires both EPROM and RAM. The EPROM is required for permanent program and permanent data storage. The RAM is required for temporary data storage and stack. The 8031/8051 has 64kb program memory address space and 64kb data memory address space.

•    The microcontroller can only read from program memory such as ROM/EPROM/ EEPROM and the signal PSEN (Low) is used as read control for reading program memory.

•    The microcontroller can read and write with data memory RAM. It has separate read control signal RD(Low), and write control signal WR(Low) for reading and writing with data memory respectively.

•    In 8031/8051 based system only memory mapped I/O is possible.
  

Program Memory:

•    In 8031 there is no internal ROM/EPROM and so the entire 64 kb program memory space in the range 0000H to FFFFH is external. Therefore in 8031 based systems the pin EA(Low) is always tied low or grounded (0V).

•    The 8051 has 4kb internal ROM which can be mapped to first 4kb address space of program memory.

•    If EA(Low) pin is tied high or tied to VCC (+5V), then the internal 4kb ROM be mapped as program memory in the address range 0000H to 0FFFH and the external program memory 60kb will have the address range l000H to FFFFH.

•    If EA(Low) pin is tied low or grounded (0V), then the internal ROM is ignored or cannot be accessed. The entire 64 kb program memory address space is external with address range 0000H to FFFFH.


The 8051 Program Memory





•    The PSEN (Low) signal is used to activate output enable signal to access the external ROM/EPROM, as shown.

Accessing External Program Memory

•    The port 0 is used as a multiplexed address/bus. It gives lower order 8-bit address in the initial T-cycle and later it is used as a data bus.

•    The 8-bit address is latched using external latch and ALE signal generated by 8051.

•    The port 2 provides the higher order 8-bit address.

•    The lower part of program memory stores the vector addresses for various interrupt service routines.

•    Each interrupt is assigned with a fixed location in program memory.

Interrupt/Vector location


PINS AND SIGNALS OF 8031/8051 MICROCONTROLLER

•    The INTEL 805 F is an 8-bit microcontroller with 128 byte internal RAM and 4kb internal ROM.

•    The INTEL 8031 is same, as 8051 except that it does not have internal ROM.

•    The 8051 is a pin 40 pin IC available in Dual-In line package (DIP).

•    Requires a single power supply of +5V.

•    Its maximum internal clock frequency rating is 12 MHz.


Pin Diagram for 8051/8031 microcontroller


Signals of 8031/8051 microcontroller

Alternate functions of port pins

Ports: (pin 1 to 8, pin 10 to 17, pin 21 to 28 and pin 32 to 39)

•    The 8031/8051 microcontroller has 32 I/O pins and they are organized as four numbers of 8-bit parallel port.

•    The ports are denoted as port-0, port-1, port-2 and port-3. Each port can be used as either 8-bit parallel port or 8 numbers of 1-bit ports.

•    The ports behave as latches during output operation and behave as buffers during input operation.

•    Port-1 can be used only for I/O operation

•    When external memory is employed, the port-0 function as multiplexed low byte address or data lines, and port-2 function as high byte address lines. Therefore for accessing external memory the microcontroller uses 16-bit address and access the memory in bytes. Hence the addressable memory space is 64 kb (216 = 64kb).

•    The 8031/8051 allows the external memory to be organized as two banks of 64 kb. One is program/code memory and the other is data memory.

PSEN (low signal): pin 29

•    The signal PSEN (low) is used as read control/enable for program memory.

RD (low signal) and WR (low signal): pin 17 and pin 16

•    The port pin P3.7 function as read control and the port pin P3.6 function as write control for data memory.

•    When two external memory banks are not desirable, the PSEN (low) and RD (low) should be externally ANDed to provide a single read control signal. In such cases the controller will access a common memory space (of maximum capacity 64 kb) for program and data.

•    ALE is used to demultiplex the low byte address or data using an external latch.

EA (Low)/Vpp : pin 31

•    When the microcontroller access program from external memory, then this pin is low. ie. EA (low) is enabled.

•    When the microcontroller access program from internal memory, then this pin is high. At that time this pin is used to supply programming voltage +12V to EPROM/ROM.

XTAL 1 AND XTAL2: PIN 19 AND PIN18

•    The XTAL 1 and XTAL2 pins are provided for external quartz crystal connection, in order to generate the required clock for the microcontroller. The maximum frequency of quartz crystal that can be connected to 8031/8051 microcontroller is 12 MHz.

RST (low): pin 9


•    The RST(low) signal is used to reset the microcontroller in order to bring the controller to a known state.

Contents of register after reset

INTERRUPTS: pin 12 to 15

•    The 803 1/8051 has five interrupts.

•    In this two interrupts are external interrupt as INT0 (Low), INT1 (Low) and the remaining three are internal interrupts as timer-0, timer-1 and serial port.

•    All interrupts are maskable and vectored interrupts.

Vector address and priority of interrupts

Labels

PROJECTS 8086 PIN CONFIGURATION 80X86 PROCESSORS TRANSDUCERS 8086 – ARCHITECTURE Hall-Effect Transducers INTEL 8085 OPTICAL MATERIALS BIPOLAR TRANSISTORS INTEL 8255 Optoelectronic Devices Thermistors thevenin's theorem MAXIMUM MODE CONFIGURATION OF 8086 SYSTEM ASSEMBLY LANGUAGE PROGRAMME OF 80X86 PROCESSORS POWER PLANT ENGINEERING PRIME MOVERS 8279 with 8085 MINIMUM MODE CONFIGURATION OF 8086 SYSTEM MISCELLANEOUS DEVICES MODERN ENGINEERING MATERIALS 8085 Processor- Q and A-1 BASIC CONCEPTS OF FLUID MECHANICS OSCILLATORS 8085 Processor- Q and A-2 Features of 8086 PUMPS AND TURBINES 8031/8051 MICROCONTROLLER Chemfet Transducers DIODES FIRST LAW OF THERMODYNAMICS METHOD OF STATEMENTS 8279 with 8086 HIGH VOLTAGE ENGINEERING OVERVOLATGES AND INSULATION COORDINATION Thermocouples 8251A to 8086 ARCHITECTURE OF 8031/8051 Angle-Beam Transducers DATA TRANSFER INSTRUCTIONS IN 8051/8031 INSTRUCTION SET FOR 8051/8031 INTEL 8279 KEYBOARD AND DISPLAY INTERFACES USING 8279 LOGICAL INSTRUCTIONS FOR 8051/8031 Photonic Transducers TECHNOLOGICAL TIPS THREE POINT STARTER 8257 with 8085 ARITHMETIC INSTRUCTIONS IN 8051/8031 LIGHTNING PHENOMENA Photoelectric Detectors Physical Strain Gage Transducers 8259 PROCESSOR APPLICATIONS OF HALL EFFECT BRANCHING INSTRUCTIONS FOR 8051/8031 CPU OF 8031/8051 Capacitive Transducers DECODER Electromagnetic Transducer Hall voltage INTEL 8051 MICROCONTROLLER INTEL 8251A Insulation Resistance Test PINS AND SIGNALS OF 8031/8051 Physical Transducers Resistive Transducer STARTERS Thermocouple Vacuum Gages USART-INTEL 8251A APPLICATIONs OF 8085 MICROPROCESSOR CAPACITANCE Data Transfer Instructions In 8086 Processors EARTH FAULT RELAY ELECTRIC MOTORS ELECTRICAL AND ELECTRONIC INSTRUMENTS ELECTRICAL BREAKDOWN IN GASES FIELD EFFECT TRANSISTOR (FET) INTEL 8257 IONIZATION AND DECAY PROCESSES Inductive Transducers Microprocessor and Microcontroller OVER CURRENT RELAY OVER CURRENT RELAY TESTING METHODS PhotoConductive Detectors PhotoVoltaic Detectors Registers Of 8051/8031 Microcontroller Testing Methods ADC INTERFACE AMPLIFIERS APPLICATIONS OF 8259 EARTH ELECTRODE RESISTANCE MEASUREMENT TESTING METHODS EARTH FAULT RELAY TESTING METHODS Electricity Ferrodynamic Wattmeter Fiber-Optic Transducers IC TESTER IC TESTER part-2 INTERRUPTS Intravascular imaging transducer LIGHTNING ARRESTERS MEASUREMENT SYSTEM Mechanical imaging transducers Mesh Current-2 Millman's Theorem NEGATIVE FEEDBACK Norton's Polarity Test Potentiometric transducers Ratio Test SERIAL DATA COMMUNICATION SFR OF 8051/8031 SOLIDS AND LIQUIDS Speed Control System 8085 Stepper Motor Control System Winding Resistance Test 20 MVA 6-digits 6-digits 7-segment LEDs 7-segment A-to-D A/D ADC ADVANTAGES OF CORONA ALTERNATOR BY POTIER & ASA METHOD ANALOG TO DIGITAL CONVERTER AUXILIARY TRANSFORMER AUXILIARY TRANSFORMER TESTING AUXILIARY TRANSFORMER TESTING METHODS Analog Devices A–D BERNOULLI’S PRINCIPLE BUS BAR BUS BAR TESTING Basic measuring circuits Bernoulli's Equation Bit Manipulation Instruction Buchholz relay test CORONA POWER LOSS CURRENT TRANSFORMER CURRENT TRANSFORMER TESTING Contact resistance test Current to voltage converter DAC INTERFACE DESCRIBE MULTIPLY-EXCITED Digital Storage Oscilloscope Display Driver Circuit E PROMER ELPLUS NT-111 EPROM AND STATIC RAM EXCITED MAGNETIC FIELD Electrical Machines II- Exp NO.1 Energy Meters FACTORS AFFECTING CORONA FLIP FLOPS Fluid Dynamics and Bernoulli's Equation Fluorescence Chemical Transducers Foil Strain Gages HALL EFFECT HIGH VOLTAGE ENGG HV test HYSTERESIS MOTOR Hall co-efficient Hall voltage and Hall Co-efficient High Voltage Insulator Coating Hot-wire anemometer How to Read a Capacitor? IC TESTER part-1 INSTRUMENT TRANSFORMERS Importance of Hall Effect Insulation resistance check Insulator Coating Knee point Test LEDs LEDs Display Driver LEDs Display Driver Circuit LM35 LOGIC CONTROLLER LPT LPT PORT LPT PORT EXPANDER LPT PORT LPT PORT EXTENDER Life Gone? MAGNETIC FIELD MAGNETIC FIELD SYSTEMS METHOD OF STATEMENT FOR TRANSFORMER STABILITY TEST METHODS OF REDUCING CORONA EFFECT MULTIPLY-EXCITED MULTIPLY-EXCITED MAGNETIC FIELD SYSTEMS Mesh Current Mesh Current-1 Moving Iron Instruments Multiplexing Network Theorems Node Voltage Method On-No Load And On Load Condition PLC PORT EXTENDER POTIER & ASA METHOD POWER TRANSFORMER POWER TRANSFORMER TESTING POWER TRANSFORMER TESTING METHODS PROGRAMMABLE LOGIC PROGRAMMABLE LOGIC CONTROLLER Parallel Port EXPANDER Paschen's law Piezoelectric Wave-Propagation Transducers Potential Transformer RADIO INTERFERENCE RECTIFIERS REGULATION OF ALTERNATOR REGULATION OF THREE PHASE ALTERNATOR Read a Capacitor SINGLY-EXCITED SOLIDS AND LIQUIDS Classical gas laws Secondary effects Semiconductor strain gages Speaker Driver Strain Gages Streamer theory Superposition Superposition theorem Swinburne’s Test TMOD TRANSFORMER TESTING METHODS Tape Recorder Three-Phase Wattmeter Transformer Tap Changer Transformer Testing Vector group test Virus Activity Voltage Insulator Coating Voltage To Frequency Converter Voltage to current converter What is analog-to-digital conversion Windows work for Nokia capacitor labels excitation current test magnetic balance voltage to frequency converter wiki electronic frequency converter testing voltage with a multimeter 50 hz voltages voltmeter

Search More Posts

Followers