Microcontroller Solutions discusses microcontroller concepts including:
1. 8-bit and 16-bit registers including the Program Status Word. Bit operations and addressing modes are described.
2. Memory addressing from 0000H to FFFFH. Programming techniques like loops, jumps and calls are demonstrated.
3. Timings are calculated based on clock speeds from 10MHz to 25MHz. Delay routines using NOP and DJNZ are provided.
4. I/O ports P0-P3 are used for input, output and toggling individual bits. The bit addressable nature of ports allows control of single pins.
This document contains information about microcontroller solutions from Ali Akbar Siddiqui of Sir Syed University of Engineering and Technology. It includes sections on 8-bit microcontrollers, programming, memory organization, I/O ports, bit manipulation, registers, and data transfer. The document provides code examples and explanations of microcontroller concepts such as register banks, stack pointers, bit addressing, and data transfer using direct memory access.
The document provides an overview of microprocessors and microcontrollers. It discusses the history and evolution of microprocessors from early minicomputers in the 1960s to modern microcontrollers that integrate CPU, memory and I/O onto a single chip. The document outlines common microprocessor components like registers, ALU, buses and control units. It also covers digital logic gates, memory systems, number representations and instruction sets.
The document discusses different aspects of microprocessors and microcontrollers including hardware, software, common components like CPU, memory, I/O ports, and differences between microprocessors and microcontrollers. It provides block diagrams of a general microprocessor system and microcontroller with descriptions of each component. Examples given include the Intel 8051 microcontroller and its pin descriptions and registers.
Applications of microcontroller(8051) vijaydeepakg
The document discusses various applications of microcontrollers including the 8051 microcontroller. It describes how microcontrollers can be used in mobile phones, automobiles, consumer electronics and more. It also provides examples of using microcontrollers to interface with displays like 7-segment LEDs and LCDs. Circuit diagrams and code are given to illustrate controlling stepper motors and reading input pins to control stepper motor direction.
The document describes the different interrupt sources for the PIC16F87X microcontroller. It lists 14 external and internal sources including port change interrupts, timer interrupts, USART interrupts, ADC interrupts, and more. It also discusses the interrupt control and peripheral interrupt enable registers which are used to enable or disable specific interrupt sources.
This document summarizes sections from a book on microcontroller solutions. It discusses 8-bit microcontrollers and provides examples of code. It covers topics like registers, ports, bit manipulation, timers, and interrupts. It gives code examples to blink LEDs, delay, use timers, and perform math operations with registers. Overall it provides an overview of programming and interfacing with an 8-bit microcontroller.
This document contains information about Rahil Vyas, a 5th semester ECE student at Amiraj college with enroll number 131080111012. It describes the basic components, features, and specifications of the 8051 microcontroller including its internal ROM, RAM, I/O ports, timers, serial interface, and addressing modes. It provides block diagrams of the 8051 architecture and examples of different instruction types like data transfer, arithmetic, and stack operations.
This document discusses timers on the 8051 microcontroller. It covers:
1. The 8051 has two 16-bit timers, T0 and T1, that can operate in different modes set by the TMOD register to function as timers or counters.
2. The timers use two 8-bit registers each, TL and TH, to store the 16-bit timer value. They are clocked by the system clock divided by 12.
3. Timer mode 1 is a 16-bit timer where the TF flag is set when the timer rolls over from 0xFFFF to 0x0000, which can trigger an interrupt. Timers can generate waveforms and measure time intervals.
This document contains information about microcontroller solutions from Ali Akbar Siddiqui of Sir Syed University of Engineering and Technology. It includes sections on 8-bit microcontrollers, programming, memory organization, I/O ports, bit manipulation, registers, and data transfer. The document provides code examples and explanations of microcontroller concepts such as register banks, stack pointers, bit addressing, and data transfer using direct memory access.
The document provides an overview of microprocessors and microcontrollers. It discusses the history and evolution of microprocessors from early minicomputers in the 1960s to modern microcontrollers that integrate CPU, memory and I/O onto a single chip. The document outlines common microprocessor components like registers, ALU, buses and control units. It also covers digital logic gates, memory systems, number representations and instruction sets.
The document discusses different aspects of microprocessors and microcontrollers including hardware, software, common components like CPU, memory, I/O ports, and differences between microprocessors and microcontrollers. It provides block diagrams of a general microprocessor system and microcontroller with descriptions of each component. Examples given include the Intel 8051 microcontroller and its pin descriptions and registers.
Applications of microcontroller(8051) vijaydeepakg
The document discusses various applications of microcontrollers including the 8051 microcontroller. It describes how microcontrollers can be used in mobile phones, automobiles, consumer electronics and more. It also provides examples of using microcontrollers to interface with displays like 7-segment LEDs and LCDs. Circuit diagrams and code are given to illustrate controlling stepper motors and reading input pins to control stepper motor direction.
The document describes the different interrupt sources for the PIC16F87X microcontroller. It lists 14 external and internal sources including port change interrupts, timer interrupts, USART interrupts, ADC interrupts, and more. It also discusses the interrupt control and peripheral interrupt enable registers which are used to enable or disable specific interrupt sources.
This document summarizes sections from a book on microcontroller solutions. It discusses 8-bit microcontrollers and provides examples of code. It covers topics like registers, ports, bit manipulation, timers, and interrupts. It gives code examples to blink LEDs, delay, use timers, and perform math operations with registers. Overall it provides an overview of programming and interfacing with an 8-bit microcontroller.
This document contains information about Rahil Vyas, a 5th semester ECE student at Amiraj college with enroll number 131080111012. It describes the basic components, features, and specifications of the 8051 microcontroller including its internal ROM, RAM, I/O ports, timers, serial interface, and addressing modes. It provides block diagrams of the 8051 architecture and examples of different instruction types like data transfer, arithmetic, and stack operations.
This document discusses timers on the 8051 microcontroller. It covers:
1. The 8051 has two 16-bit timers, T0 and T1, that can operate in different modes set by the TMOD register to function as timers or counters.
2. The timers use two 8-bit registers each, TL and TH, to store the 16-bit timer value. They are clocked by the system clock divided by 12.
3. Timer mode 1 is a 16-bit timer where the TF flag is set when the timer rolls over from 0xFFFF to 0x0000, which can trigger an interrupt. Timers can generate waveforms and measure time intervals.
The document discusses various jump, loop, and call instructions for the 8051 microcontroller. It provides examples of using conditional and unconditional jumps to transfer program flow. Looping is achieved using decrement and jump if not zero instructions. Nested loops allow repeating an action more than 256 times. Subroutines are called using call instructions which save the return address on the stack. Parameters can be passed into subroutines using registers or push/pop instructions.
This document discusses the 8051 assembly language. It covers assembler directives, data transfer instructions, addressing modes, and data processing instructions. Data transfer instructions include MOV, PUSH, POP, and XCH. Addressing modes allow accessing data using immediate, direct, register, indirect, indexed, and stack addressing. Data processing instructions include arithmetic instructions like ADD, SUB, INC, DEC, MUL, DIV, and logic instructions like AND, OR, XOR for performing operations on data.
Chp5 pic microcontroller instruction set copymkazree
The document provides an outline and descriptions of the instruction set for PIC microcontrollers, including common instructions like MOVLW, ADDWF, ANDLW, CALL, RETURN, and SLEEP. It describes the functionality of each instruction, their operands, and how they affect status register bits. Examples are given to illustrate how each instruction works and the resulting register values.
This document contains the description of 9 experiments conducted using an 8051 microcontroller. The experiments include writing assembly programs for arithmetic operations, memory block transfer, number squaring, arranging numbers in descending order, generating square waves using timers and DAC, driving a stepper motor, and reading a keyboard to display codes on a seven segment display. Assembly and C code are provided for the various experiments. The results of each experiment are also shown.
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd Technogroovy India
This document discusses numerical bases used in programming such as hexadecimal, binary, and BCD. It provides examples of converting between decimal, binary, hexadecimal, and BCD representations of numbers. It also discusses registers, memory mapping, addressing modes, instructions, and other concepts related to the 8051 microcontroller.
The document describes various functions available for the Nano 5 card including I2C communication, LCD display control, analog and digital I/O, ADC, DAC, timers, PWM, flash memory, real-time clock, and interfacing with a Raspberry Pi. It provides code examples to initialize and use functions for I2C, LCD, analog input, digital I/O, UART communication, flash memory reading and writing, and real-time clock time setting and reading. Diagrams depict the hardware setup and connections for testing various functions.
The document discusses numerical bases used in programming such as hexadecimal, binary, and BCD. It provides examples of converting between decimal, binary, hexadecimal and BCD representations of numbers. It also describes registers and memory organization in 8051 microcontrollers including register banks, memory mapping, and addressing modes. Finally, it outlines common instructions of the 8051 instruction set such as MOV, ADD, CALL, JUMP, LOGICAL operations and flag manipulation.
The document describes code for an Arduino project that uses a PIR sensor and sonar sensors to detect humans. It includes code for an auto mode and manual mode, with the auto mode using sensors to control motors and the manual mode allowing control via radio signals. Functions are defined for the sensors, motors and radio communication.
This document describes using a finite state machine (FSM) approach to handle asynchronous events in microcontroller units (MCUs). It provides an example of toggling LEDs in response to button presses without using busy-waiting. The example encodes the button states as states in a FSM with states like "CHECK FOR PRESS" and "CHECK FOR RELEASE". Transitioning between these states based on button input allows handling events asynchronously and without blocking other tasks. It also describes adding a software timer to flash an LED while still handling button presses.
Addressing mode and instruction set using 8051logesh waran
Here are the key steps for programming timer 0 in mode 2:
1. Select mode 2 for timer 0 by writing to the TMOD register:
MOV TMOD,#02h
2. Write the initial count value to TH0:
MOV TH0,#0FCh
3. Clear the timer flag TF0:
CLR TF0
4. Start the timer by setting TR0:
SETB TR0
5. The timer will now count down from the value in TH0 (0FCh) to 0 in TL0.
6. When TL0 underflows to 0, TF0 will be set.
7. Check TF0 to detect overflow:
lb instruments by using microcontroller , Rabi MoirangthemRabi Moirangthem
This document describes the design of a Langmuir-Blodgett film deposition setup using an AT89C51 microcontroller. It includes block diagrams of the setup, descriptions of the programming procedures used to control stepper motors and read analog pressure values, and provides the program code written for the microcontroller to run the setup. Key elements of the program code include routines for initializing an LCD display, reading analog conversions from an ADC, and controlling the stepper motors through interrupts from timers 0 and 1.
In this unit we introduce interrupts in processors and microcontrollers. We explain how the UoS processor (which doesn't support interrupts currently) could be extended to support interrupts.
Unit duration: 50mn.
License: LGPL 2.1
This document contains code for initializing and controlling a LCD display module connected to a PIC16F887 microcontroller. It defines macros for the LCD pins and functions for initializing the LCD, writing data, clearing the display, moving the cursor, and printing strings. The main program initializes the LCD, prints two strings to different rows, and loops continuously displaying them.
The document describes various data transfer and branching instructions in 8051 assembly language. It explains instructions like MOV, MOVC, MOVX that transfer data between registers and memory. It also covers conditional and unconditional jump instructions like JZ, JNZ, DJNZ, JNC that control program flow. Examples are given to illustrate the use of these instructions for operations like loading values, complementing data, and creating time delays.
The document discusses UART (Universal Asynchronous Receiver/Transmitter) and RS-232 communication standards. It describes the voltage levels used, the need for a converter chip between UART and RS-232, synchronous vs asynchronous transmission, baud rates, frame formats, and provides VHDL code for a UART transmitter and receiver implementation including state machines and registers.
Embedded Systems Project Based Training|Engineering Projects,Summer TrainingTechnogroovy
like our page for more updates:
https://www.facebook.com/Technogroovyindia
With Best Regard's
Technogroovy Systems India Pvt. Ltd.
www.technogroovy.com
Call- +91-9582888121
Whatsapp- +91-8800718323
This document contains assembly language code for three different functions:
1. A function called "chips" that returns an integer value indicating the CPU type and presence of a math coprocessor.
2. A function that checks for the presence of a game port by writing and reading from port 201h.
3. An interrupt service routine called "CLK" that updates the system clock display on the screen every minute and calls the original clock update routine.
This document discusses cascaded RC circuits and their analysis in both open loop and closed loop configurations. It presents the transfer function for a cascaded RC circuit in the open loop case. For the closed loop case, it derives the transfer function including a proportional feedback controller. It also discusses using an Arduino board to implement analog input and output to experimentally validate the closed loop control of a cascaded RC circuit.
Ei502microprocessorsmicrtocontrollerspart4 8051 MicrocontrollerDebasis Das
The document discusses the applications and features of microcontrollers. It provides examples of using microcontrollers for interfacing seven segment displays, temperature control, and other applications. It also discusses where microcontrollers can commonly be found, such as in cell phones, laptops, appliances, toys and more. The document outlines reasons for learning about microprocessors/controllers and provides an overview of the 8051 microcontroller, including its architecture, pins, registers and memory mapping.
1. The document discusses interrupts in the 8085 microprocessor. It lists the 5 hardware interrupts - INTR, RST 5.5, RST 6.5, RST 7.5, and TRAP - and their priorities, with TRAP being the highest. It distinguishes between vectored interrupts, which provide the interrupt address, and non-vectored interrupts, where the address must be supplied.
2. An example assembly language program is provided to create a time delay of 1.8 seconds using nested loops and decrement instructions. Interrupt basics are reviewed, such as the differences between maskable and non-maskable interrupts.
The document discusses numerical bases used in programming such as hexadecimal, binary, and BCD. It provides examples of converting between decimal, binary, hexadecimal and BCD representations of numbers. It also summarizes common registers, memory mapping, addressing modes, and basic instructions of the 8051 microcontroller.
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineTechnogroovy
like our page for more updates:
https://www.facebook.com/Technogroovyindia
With Best Regard's
Technogroovy Systems India Pvt. Ltd.
www.technogroovy.com
Call- +91-9582888121
Whatsapp- +91-8800718323
The document discusses various jump, loop, and call instructions for the 8051 microcontroller. It provides examples of using conditional and unconditional jumps to transfer program flow. Looping is achieved using decrement and jump if not zero instructions. Nested loops allow repeating an action more than 256 times. Subroutines are called using call instructions which save the return address on the stack. Parameters can be passed into subroutines using registers or push/pop instructions.
This document discusses the 8051 assembly language. It covers assembler directives, data transfer instructions, addressing modes, and data processing instructions. Data transfer instructions include MOV, PUSH, POP, and XCH. Addressing modes allow accessing data using immediate, direct, register, indirect, indexed, and stack addressing. Data processing instructions include arithmetic instructions like ADD, SUB, INC, DEC, MUL, DIV, and logic instructions like AND, OR, XOR for performing operations on data.
Chp5 pic microcontroller instruction set copymkazree
The document provides an outline and descriptions of the instruction set for PIC microcontrollers, including common instructions like MOVLW, ADDWF, ANDLW, CALL, RETURN, and SLEEP. It describes the functionality of each instruction, their operands, and how they affect status register bits. Examples are given to illustrate how each instruction works and the resulting register values.
This document contains the description of 9 experiments conducted using an 8051 microcontroller. The experiments include writing assembly programs for arithmetic operations, memory block transfer, number squaring, arranging numbers in descending order, generating square waves using timers and DAC, driving a stepper motor, and reading a keyboard to display codes on a seven segment display. Assembly and C code are provided for the various experiments. The results of each experiment are also shown.
Embedded Systems Training & Live Projects @Technogroovy Systems India Pvt Ltd Technogroovy India
This document discusses numerical bases used in programming such as hexadecimal, binary, and BCD. It provides examples of converting between decimal, binary, hexadecimal, and BCD representations of numbers. It also discusses registers, memory mapping, addressing modes, instructions, and other concepts related to the 8051 microcontroller.
The document describes various functions available for the Nano 5 card including I2C communication, LCD display control, analog and digital I/O, ADC, DAC, timers, PWM, flash memory, real-time clock, and interfacing with a Raspberry Pi. It provides code examples to initialize and use functions for I2C, LCD, analog input, digital I/O, UART communication, flash memory reading and writing, and real-time clock time setting and reading. Diagrams depict the hardware setup and connections for testing various functions.
The document discusses numerical bases used in programming such as hexadecimal, binary, and BCD. It provides examples of converting between decimal, binary, hexadecimal and BCD representations of numbers. It also describes registers and memory organization in 8051 microcontrollers including register banks, memory mapping, and addressing modes. Finally, it outlines common instructions of the 8051 instruction set such as MOV, ADD, CALL, JUMP, LOGICAL operations and flag manipulation.
The document describes code for an Arduino project that uses a PIR sensor and sonar sensors to detect humans. It includes code for an auto mode and manual mode, with the auto mode using sensors to control motors and the manual mode allowing control via radio signals. Functions are defined for the sensors, motors and radio communication.
This document describes using a finite state machine (FSM) approach to handle asynchronous events in microcontroller units (MCUs). It provides an example of toggling LEDs in response to button presses without using busy-waiting. The example encodes the button states as states in a FSM with states like "CHECK FOR PRESS" and "CHECK FOR RELEASE". Transitioning between these states based on button input allows handling events asynchronously and without blocking other tasks. It also describes adding a software timer to flash an LED while still handling button presses.
Addressing mode and instruction set using 8051logesh waran
Here are the key steps for programming timer 0 in mode 2:
1. Select mode 2 for timer 0 by writing to the TMOD register:
MOV TMOD,#02h
2. Write the initial count value to TH0:
MOV TH0,#0FCh
3. Clear the timer flag TF0:
CLR TF0
4. Start the timer by setting TR0:
SETB TR0
5. The timer will now count down from the value in TH0 (0FCh) to 0 in TL0.
6. When TL0 underflows to 0, TF0 will be set.
7. Check TF0 to detect overflow:
lb instruments by using microcontroller , Rabi MoirangthemRabi Moirangthem
This document describes the design of a Langmuir-Blodgett film deposition setup using an AT89C51 microcontroller. It includes block diagrams of the setup, descriptions of the programming procedures used to control stepper motors and read analog pressure values, and provides the program code written for the microcontroller to run the setup. Key elements of the program code include routines for initializing an LCD display, reading analog conversions from an ADC, and controlling the stepper motors through interrupts from timers 0 and 1.
In this unit we introduce interrupts in processors and microcontrollers. We explain how the UoS processor (which doesn't support interrupts currently) could be extended to support interrupts.
Unit duration: 50mn.
License: LGPL 2.1
This document contains code for initializing and controlling a LCD display module connected to a PIC16F887 microcontroller. It defines macros for the LCD pins and functions for initializing the LCD, writing data, clearing the display, moving the cursor, and printing strings. The main program initializes the LCD, prints two strings to different rows, and loops continuously displaying them.
The document describes various data transfer and branching instructions in 8051 assembly language. It explains instructions like MOV, MOVC, MOVX that transfer data between registers and memory. It also covers conditional and unconditional jump instructions like JZ, JNZ, DJNZ, JNC that control program flow. Examples are given to illustrate the use of these instructions for operations like loading values, complementing data, and creating time delays.
The document discusses UART (Universal Asynchronous Receiver/Transmitter) and RS-232 communication standards. It describes the voltage levels used, the need for a converter chip between UART and RS-232, synchronous vs asynchronous transmission, baud rates, frame formats, and provides VHDL code for a UART transmitter and receiver implementation including state machines and registers.
Embedded Systems Project Based Training|Engineering Projects,Summer TrainingTechnogroovy
like our page for more updates:
https://www.facebook.com/Technogroovyindia
With Best Regard's
Technogroovy Systems India Pvt. Ltd.
www.technogroovy.com
Call- +91-9582888121
Whatsapp- +91-8800718323
This document contains assembly language code for three different functions:
1. A function called "chips" that returns an integer value indicating the CPU type and presence of a math coprocessor.
2. A function that checks for the presence of a game port by writing and reading from port 201h.
3. An interrupt service routine called "CLK" that updates the system clock display on the screen every minute and calls the original clock update routine.
This document discusses cascaded RC circuits and their analysis in both open loop and closed loop configurations. It presents the transfer function for a cascaded RC circuit in the open loop case. For the closed loop case, it derives the transfer function including a proportional feedback controller. It also discusses using an Arduino board to implement analog input and output to experimentally validate the closed loop control of a cascaded RC circuit.
Ei502microprocessorsmicrtocontrollerspart4 8051 MicrocontrollerDebasis Das
The document discusses the applications and features of microcontrollers. It provides examples of using microcontrollers for interfacing seven segment displays, temperature control, and other applications. It also discusses where microcontrollers can commonly be found, such as in cell phones, laptops, appliances, toys and more. The document outlines reasons for learning about microprocessors/controllers and provides an overview of the 8051 microcontroller, including its architecture, pins, registers and memory mapping.
1. The document discusses interrupts in the 8085 microprocessor. It lists the 5 hardware interrupts - INTR, RST 5.5, RST 6.5, RST 7.5, and TRAP - and their priorities, with TRAP being the highest. It distinguishes between vectored interrupts, which provide the interrupt address, and non-vectored interrupts, where the address must be supplied.
2. An example assembly language program is provided to create a time delay of 1.8 seconds using nested loops and decrement instructions. Interrupt basics are reviewed, such as the differences between maskable and non-maskable interrupts.
The document discusses numerical bases used in programming such as hexadecimal, binary, and BCD. It provides examples of converting between decimal, binary, hexadecimal and BCD representations of numbers. It also summarizes common registers, memory mapping, addressing modes, and basic instructions of the 8051 microcontroller.
Buy Embedded Systems Projects Online,Buy B tech Projects OnlineTechnogroovy
like our page for more updates:
https://www.facebook.com/Technogroovyindia
With Best Regard's
Technogroovy Systems India Pvt. Ltd.
www.technogroovy.com
Call- +91-9582888121
Whatsapp- +91-8800718323
This document contains 4 problems related to interfacing an ADC to an 8051 microcontroller and displaying temperature readings. Problem 1 describes converting a binary number to BCD. Problem 2 shows displaying the BCD digits. Problem 3 involves reading the ADC every 1 second using a timer interrupt. Problem 4 integrates it all to read a temperature sensor and display the temperature continuously in degrees Celsius.
This program demonstrates a simple console interface to call FTP2 in a batch environment, allowing the operator to retry a failed process. This is most useful for situations where receiving servers might be down for short periods of time and thus unable to receive a file transmission on the first attempt.
Chp6 assembly language programming for pic copymkazree
The document discusses assembly language programming for PIC microcontrollers. It covers number representation in assembler, basic elements of PIC assembly like labels, instructions, operands, and directives. It also discusses assembling and linking a PIC program, subroutines, macros, and local directives. An example program is provided to count from 0 to FF and send the count value to port B using subroutines for displaying and delay.
The document discusses various topics related to microcontroller simulation and interfacing including:
1) A simulation represents a simpler model of a real situation that can be manipulated to determine experimental results. The document discusses using a simulator to show the effects of a given situation.
2) It describes Top View Simulator which simulates the popular 8-bit MCS 51 microcontroller family and includes windows to view the program, registers, memory, and other components.
3) Examples are given of interfacing microcontrollers with common devices like LEDs, LCDs, stepper motors, and 7-segment displays through programming and circuit diagrams.
This document discusses stacks, subroutines, counters, time delays, and creating time delays using register pairs in assembly language. It provides examples of creating counters and time delays using loops. It explains how CALL and RET instructions work with stacks to transfer program flow to subroutines and back. It also discusses using register pairs and decrementing them with DCX to create longer time delays compared to a single register counter.
Microcontroller (8051) general and simple alp n cprogramsVedavyas PBurli
microcontroller 8051 based ALP's and c programs
ALP's on simple and basic programs , which you can understand it very easily by executing in keil_3 . purposely made for micro controller based program executing.thank you
This document contains information for the setup of the GCPU including debug signals, video signals, and power connections. It lists specific component values and settings for resistors, capacitors, and other parts used in the GCPU setup. Notes provide labeling rules and design rules to be followed, such as keeping inputs on the left and outputs on the right.
This document discusses basic digital concepts including digital circuits, binary, hexadecimal, microcontroller registers, addressing modes, and examples of instructions used in microcontroller programming. It covers:
1) How a digital circuit outputs either 5V or 0V depending on a 1 or 0 bit.
2) Conversions between decimal, binary, and hexadecimal numbering systems.
3) Microcontroller registers that can store and operate on 8-bit binary words like the accumulator, B register, general purpose registers, and more.
4) Addressing modes used in instructions like register addressing, immediate addressing, direct addressing, indirect addressing through registers, and 16-bit addresses.
5) How the microcontroller fetches
This document describes experiments with analog to digital converters (ADCs) using an 8-bit and 10-bit converter to read voltage input and display the results on a 7-segment LED display. It provides algorithms and code for initializing the ADC, taking samples, and performing conversions to extract the digital values for display. Procedures are outlined for 8-bit and 10-bit conversions using interrupts or polling and arithmetic operations to handle the 10-bit values.
This document provides an appendix with information about the 8085 instruction set, including a table that lists each instruction opcode and a brief description. It includes sections on data transfer instructions, arithmetic instructions, logical instructions, branching instructions, I/O instructions, stack and machine control instructions, and interrupt control and processor control instructions. Tables are also provided that list the instruction set grouped by opcode and clock cycles.
This document provides an appendix with information about the 8085 instruction set, including a table that lists each instruction opcode and a brief description. It includes sections on data transfer instructions, arithmetic instructions, logical instructions, branching instructions, I/O instructions, stack and machine control instructions, and interrupt control and processor control instructions. Tables are also provided that list the instruction set grouped by opcode and clock cycles.
This document provides a SPICE model for the TC74LCX244F CMOS digital integrated circuit octal bus buffer manufactured by Toshiba. It includes the model parameters, subcircuit definitions for various components, and simulation results validating the timing characteristics against measurements.
The document describes several programs written for microcontrollers to perform various tasks:
1) A program to convert packed BCD to ASCII and store the results in registers.
2) A program to display the text "SGBAU ME 1st" on an LCD screen using a microcontroller.
3) A program to multiplex the numbers 1, 2, 2, 4 on a four digit seven segment display using a microcontroller.
4) A program in GNUSim 8085 that performs all basic arithmetic operations like addition, subtraction, multiplication, and division on 8-bit numbers by loading values from memory locations and storing results back to memory locations.
5) A program to exchange
This document provides a SPICE model for the TC74LCX244FT CMOS digital integrated circuit octal bus buffer manufactured by Toshiba. It includes the model parameters, subcircuit definitions for various components, and simulation results validating the timing characteristics against measurements.
This document provides a SPICE model for the TC74LCX244FW CMOS digital integrated circuit octal bus buffer manufactured by Toshiba. It includes the model parameters, subcircuit definitions for various components, and simulation results validating the timing characteristics against measurements.
MICROCONTROLLER 8051-BASED SOLAR CHARGE CONTROLLER.pptx37PaduriHrishitha
As the sources of conventional energy deplete day by day, resorting to alternative
sources of energy like solar and wind energy has become need of the hour. Solar-powered
lighting systems are already available in rural as well as urban areas. These include solar
lanterns, solar home lighting systems, solar streetlights, solar garden lights and solar
power packs. All of them consist of four components: solar photovoltaic module,
rechargeable battery, solar charge controller and load. In the solar-powered lighting
system, the solar charge controller plays an important role as the system‘s overall success
depends mainly on it. It is considered as an indispensable link between the solar panel,
battery and load.
The document describes the instruction set of the Atmel 8051 microcontroller. It includes 3 tables that list the instructions, describing the operation, number of bytes in the instruction, and the oscillator period in cycles to execute the instruction. The tables provide a summary of arithmetic, logical, branch, and data transfer instructions available on the 8051 microcontroller.
Similar to Solutionmanual8051microcontrollerbymazidi 131215070701-phpapp02 (20)
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
This document provides an overview of wound healing, its functions, stages, mechanisms, factors affecting it, and complications.
A wound is a break in the integrity of the skin or tissues, which may be associated with disruption of the structure and function.
Healing is the body’s response to injury in an attempt to restore normal structure and functions.
Healing can occur in two ways: Regeneration and Repair
There are 4 phases of wound healing: hemostasis, inflammation, proliferation, and remodeling. This document also describes the mechanism of wound healing. Factors that affect healing include infection, uncontrolled diabetes, poor nutrition, age, anemia, the presence of foreign bodies, etc.
Complications of wound healing like infection, hyperpigmentation of scar, contractures, and keloid formation.
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Diana Rendina
Librarians are leading the way in creating future-ready citizens – now we need to update our spaces to match. In this session, attendees will get inspiration for transforming their library spaces. You’ll learn how to survey students and patrons, create a focus group, and use design thinking to brainstorm ideas for your space. We’ll discuss budget friendly ways to change your space as well as how to find funding. No matter where you’re at, you’ll find ideas for reimagining your space in this session.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
How to Fix the Import Error in the Odoo 17Celine George
An import error occurs when a program fails to import a module or library, disrupting its execution. In languages like Python, this issue arises when the specified module cannot be found or accessed, hindering the program's functionality. Resolving import errors is crucial for maintaining smooth software operation and uninterrupted development processes.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
1. Microcontroller Solutions
Chapter 2
Section 2.1:-
1. 8 bit
2. 8 bit
3. 8 bit
4. PSW (Program Status Word) is of 16 bit.
5. Necessary (for literal value).
6. 28H and it is kept in accumulator.
7. (a),(d),(g) are illegal and for f only 0 is required before F5H
8. (c),(d) are illegal.
9. 44H and kept in Accumulator (A).
10.1EH and kept in Accumulator (A).
Section 2.4
21.0000H
22.Program counter will look for the location 0000H and if the program is not
starting for that address, it will consider that there is no program written so
program has to start from the location 0000H.
26.Lowest Memory is 0000H and the Highest memory is FFFFH.
2. Microcontroller Solutions
From Ali Akbar Siddiqui. Sir Syed University of Eng& Tech
Section 2.5:-
29.Solved below,
(Data) (Locations)
E 200
A 201
R 202
T 203
H 204
9 205
8 206
7 207
- 208
6 209
5 20A
Section 2.6:-
31.8 bit
32.And 33.
D7 D6 D5 D4 D3 D2 D1 D0
CY AC F0 RS1 RS0 OV -- P
34.We know that in 8051 registers are of 8 bits CY Flag is raised when the carry
is generated beyond past the max value that a register can store like FFH +
1.
35.AC is raised when a carry is generated from D3 to D4. Like
Mov a,#0FH
Add a,#1
3. Microcontroller Solutions
36.CLR C ;CY=0
CPL C; CY
37.G
a. CY=1
b. CY=0
c. CY=0
38.ORG 0000H
MOV A,#55H
ADD A,#55H
ADD A,#55H
ADD A,#55H
ADD A,#55H
END
39.RS0 and RS1.
40.On Startup Stack Location is 07H.
42.24 Bytes.
43.Register Bank 0
44.Register Bank 0 from 00H to 07H.
Register Bank 1 from 08H to 0FH.
Register Bank 2 from 10H to 17H.
Register Bank 3 from 18H to 1FH.
45.(a) 04H (b) 00H (c) 07H (d) 05H
4. Microcontroller Solutions
48.
INSTRUCTIONS STACK Pointer Stack pointer STACK
before after
execution. execution.
PUSH 0 07H 08H 66H
PUSH3 08H 09H 7FH
PUSH 7 09H 0AH 5DH
POP 3 0AH 09H
POP 7 09H 08H
POP 0 08H 07H
49.NO.
POP 7
POP 3
POP 0
REST OF THE PROGRAM WILL REMAIN THE SAME.
50.After execution of ( Mov SP,#70H ), Stack Pointer location has now become
70H instead of 07H.
INSTRUCTIONS STACK Pointer Stack pointer STACK
before after execution.
execution.
Push 5 70H 71H 66H
Push 2 71H 72H 7FH
Push 7 72H 73H 5DH
Pop 7 73H 72H
Pop 2 72H 71H
Pop 5 71H 70H
6. Microcontroller Solutions
23.That’s because Stack works on the concept of LIFO so if the push is implied
2 times for instance, then pop must be used 2 times exactly.
Section 3.3:-
27. T = 1.2usec
F = 1/T = 833.333KHz
System frequency = 833.333KHz*12 = 10MHz
28. F = 18MHz
F =18MHZ/12 =1.5MHz
T = 1/F =1/1.5MHz
T = 0.666usec
29. F = 12MHz
F =12MHZ/12 =1MHz
T = 1/F =1/1.5MHz
T = 1usec
30. F = 25MHz
F =25MHZ/12 = 2.08MHz
T = 1/F =1/2.08MHz
T = 0.48usec
32. F = 11.0592MHz
F =11.0592MHZ/12 = 921.6KHz
T = 1/F = 1/921.6KHZ
T = 1.085usec
7. Microcontroller Solutions
DELAY:MOV R3,#150 1 machine cycle
HERE:NOP 1 mc
NOP 1
NOP 1
DJNZ R3,HERE 2 mc
RET 2
The time delay of the HERE loop is [150(2+1+1+1)]*1.085usec=0.813msec
Now for the instruction outside the loop (mov and ret),
(2+1)*1.085Usec = 3.25usec
Now 0.813ms + 3.25usec = 0.8162msec
33. F = 16MHz
F =16MHZ/12 = 1.33333MHz
T = 1/F = 1/1.33333MHZ
T = 0.75usec
DELAY:MOV R3,#200 1
HERE:NOP 1
NOP 1
NOP 1
DJNZ R3,HERE 2
RET 2
The time delay of the HERE loop is [200(2+1+1+1)]*0.75usec=0.75msec
Now for the instruction outside the loop (mov and ret),
(2+1)*0.75usec = 2.25usec
Now 0.75ms + 2.25usec = 0.75225msec
34. F = 11.0592MHz
F =11.0592MHZ/12 = 921.6KHz
T = 1/F = 1/921.6KHZ
T = 1.085usec
8. Microcontroller Solutions
DELAY:MOV R5,#100 1
BACK: MOV R2,#200 1
AGAIN:MOV R3,#250 1
HERE:NOP 1
NOP 1
DJNZ R3,HERE 2
DJNZ R3,AGAIN 2
DJNZ R3,BACK 2
RET 2
The time delay of the HERE loop is [250(2+1)]*1.085usec=1.085msec
The time delay of the AGAIN loop it repeats 200 times so ,
1.085msec*200 = 0.217 + (3*200*1.085usec) = 0.2176s
The time delay of the BACK loop, it is repeated 100 times so
0.2176*100=21.76sec
Time Delay = 21.76sec
35.Try it yourself it’s just like 34 with only 2 loops instead of 3 loope.
36. To 39.
For the problems from 36 to 39 everything remains the same except the
time delay that is changed due to the change of Microcontroller now you
must take Clock of DS89C420/30 Microcontroller i.e equal to 1 rather
than 12 that was for 8051.
40.Yes it is 12 times faster because it only have 1 clock and on the other hand
8051 have 12 clocks so if we decrease the clocks our microcontroller
becomes faster.
9. Microcontroller Solutions
Chapter 4:-
Section 4.1:-
1. 40
2. VCC 40
TH
PIN And GND9
TH
PIN
3. 32 Pins
4. 8 Pins and from 32 to 39.
5. 8 Pins and from 1 to 8.
6. 8 Pins and from 21 to 28.
7. 8 Pins and from 10 to 17.
8. Input
9. P0 (Port 0)
10.P1 (Port 1)
11.ORG 000H
MOV P1,#0FFH; MAKE IT AN INPUT PORT
MOV A,P1
MOV P2,A
MOV P0,A
MOV
P3,A END
12.ORG 000H
MOV P2,#0FFH; MAKE IT AN INPUT PORT
MOV A,P2
MOV P1,A
MOV
P0,A END
10. Microcontroller Solutions
13.P3.0 AND P3.1
14.0000H is the address upon reset.
15.
(A) ORG 0000H
BACK:MOV
A,#0AAH MOV P1,A
MOV P2,A
CALL DELAY
MOV A,#55H
MOV P1,A
MOV P2,A
SJMP BACK
(B) ORG 0000H
MOV A,#0AAH
BACK:MOV
P1,A MOV P2,A
CALL DELAY
CPL A MOV
P1,A MOV
P2,A SJMP
BACK
Section 4.2:-
16.All ports are bit addressable.
17.The advantages for Bit addressable mode is that u con manipulate aa single
bit without disturbing and other bits of the port by using Setb and Clr.
18.Setb P1.X OrClr P1.X where X can vary from 0 to 7.
11. Microcontroller Solutions
19.No , a whole port cannot be complemented at a time.
20.ORG 0000H
SETB P1.2
SETB P1.5
BACK:CALL DELAY
CPL P1.2
CPL P1.5
SJMP BACK
END
21.ORG 0000H
SETB P2.5
SETB P1.7
SETB P1.3
BACK:CALL DELAY
CPL P1.3
CPL P1.7
CPL P2.5
SJMP BACK
END
22.ORG 0000H
SETB P1.3
BACK:JB P1.3,HERE
SJMP BACK
HERE:MOV A,#55H
12. Microcontroller Solutions
MOV P2,A
END
23.ORG 0000H
SETB P2.7
BACK:JNB P2.7,HERE
SJMP BACK
HERE:MOVA,#55H
MOV P0,A
CALL DELAY
MOC A,#0AAH
MOV P0,A
SJMP HERE
END
24.ORG 0000H
SETB P2.0
JNB P2.0,HERE
MOV A,#99H
MOV PI,A
SJMP BACK
HERE:MOV A,#66H
MOV P1,A
BACK:
END
13. Microcontroller Solutions
25.ORG 0000H
SETB P1.5
AGAIN:JB P1.5,HERE
SJMP AGAIN
HERE:CLR PI.3
CALL DELAY
SETB P1.3
CALL DELAY
CLR P1.3
END
26.ORG 0000H
BACK:MOV C,P1.3 ;C IS FOR CARRY FLAG.
MOV P1,4,C
SJMP BACK
END
27. 5
TH
Bit
28.ORG 0000H
BACK:MOV C,P1.7
MOV P1.0,C MOV
C,P1.6 MOV
P1.7,C SJMP BACK
14. Microcontroller Solutions
Chapter 5:-
Section 5.1 and 5,2:-
3. See on page 123 Figure 5-1, and on page 124 figure 5-2.
4. Register bank 1 , 2 , 3 share the space with stack because by default stack
starts from 07H and after increment data is stored in 08H on the other hand
Register bank 1 address starts from 08H as well see page 123 fig 5-1.
6. It copies the contents of the location 0F0H into the accumulator rather than
the value 0F0H.
7. Same as question nos 6.
8. ORG 0000H
MOV R0,#50H
MOV R1,#40H
MOV R3,#30H
PUSH 00H
PUSH 01H
PUSH 03H
POP 1DH POP
1EH
POP 1FH
END
9. Registers R0 and R1.
10.ORG 0000H
MOV A,#0FFH
MOV R7,#32
MOV R0,#50H
NAME:MOV @R0,A
15. Microcontroller Solutions
INC R0
CALL DELAY
DJNZ R7,NAME
11.ORG 0000H
MOV DPTR,#400H
MOV R7,#10
MOV R0,#30H
HERE:CLR A
MOVC A,@A+DPTR
CALL DELAY
INC DPTR
MOV @R0,A
INC R0
DJNZ R7,HERE
BACK:SJMP BACK
END
12.ORG 0000
MOV P1,#0FFH
MOV A,P1
MOV R0,A ; R0=x
MOV B,R0 ; B=x
MUL AB ; MULTIPLY A WITH B ANSWER STORE IN A=x*x
DA A
MOV R1,A ;R1=x*x Or x^2
MOV A,R0 ;A=x
MOV B,#2 ; B=2
MUL AB ; A=2*x
DA A
MOV R7,#5
16. Microcontroller Solutions
ADD A,R1 ; A=x^2 + 2*x
DA A
ADD A,R7 ;A=x^2 + 2*x + 5
END
13.ORG 0000H
LJMP MAIN
ORG 20H
MYDATA: DB 06,09,02,05,07
ORG 300H
Main:MOV R0,#30H
MOV DPTR,#MYDATA
MOV R7,#5
HERE:CLR A
MOVC A,@A+DPTR
CALL DELAY
INC DPTR
PUSH 0E0H; Push the Accumulator into stack
DJNZ R7,HERE
POP 01
POP 02
POP 03
POP 04
POP 0E0H
ADD A,R1
ADD A R2
ADD A,R3
ADD A,R4; A Holds the added data.
17. Microcontroller Solutions
MOV @R0,A
END
Section 5.3:-
14.INVALID
15.VALID
16.VALID
17.All ports are bit addressable.
18.See for answer on page124 figure 5-2.
19. (b),(c),(d),((f),(g),(h) are valid.
20.ORG 0000H
AGAIN:SETB
P1.5 CALL DELAY
CALL DELAY
CALL DELAY
CLR P1.5
CALL DELAY
SJMP AGAIN
DELAY:MOV R1,#240
HERE:DHNZ R1,HERE
RET
END
21.ORG 0000H
AGAIN:SETB P2.7
CALL DELAY
CALL DELAY
CALL DELAY
18. Microcontroller Solutions
CALL DELAY
CLR P2.7
CALL DELAY
SJMP AGAIN
DELAY:MOV R1,#240
HERE:DJNZ R1,HERE
RET
END
22.ORG 0000H
SETB P1.4
HERE:JNB P1.4,HERE
CMD:SETB P2,7
CALL DELAY
CLR P2.7
CALL DELAY
SJMP CMD
DELAY:MOV R1,#240
HERE:DJNZ R1,HERE
RET
END
23.ORG 0000H
SETB P2.1
HERE:JB P1.4,HERE
MOV P0,#55H
SJMP $
END
19. Microcontroller Solutions
24.80H TO 87H
25.90H TO 97H
26.A0H TO A7H
27.B0H TO B7H
28.Not bit addressable register.
29.88H TO 8FH
30.E0H TO E7H
31.F0H TO F7H
32.D0H TO D7H
33.(a) P0 (b)87H (c)TCON (d)TCON (e)P1H (f)P2 (g)P2 (h)P3 (i)PSW (j)PSW (K)B
34.ORG 0000H
SETB RS1; FOR SELECTING REGISTER BANK 2
SETB RS0;FOR SELECTING REGISTER BANK 2
MOV R3,A
MOV
R5,B END
35.CLR 0D7H
37.See example 5-14.
38.To check the carry flag there are instructions namely JC and JNC.
39. And 40 see example 5-14.
41.CY0D7H
P0D0H
AC0D6H
OV0D2H
42.For this question see page 124 fig 5-2.
46.For this question see page 123 fir 5-1.
47.(a)20H (b)28H (c)18H (d)2DH (e)53H (f)15H (g)2CH (h)2AH (i)14H
(j)37H (k)7FH
20. Microcontroller Solutions
50.MOV 04,C
51.MOV 16H,0D6H ; Auxiliary carry
52.MOV 12H,0D0H
53.ORG 0000H
JB ACC.0,HERE
SJMP AGAIN
HERE :JB ACC.1,HERE1
SJMP AGAIN
HERE1:MOV B,#4
DIV AB
AGAIN:
END
54.ORG 0000H
JB ACC.7,LCD_DISPLAY
SJMP NACK
LCD_DISPLAY:
NACK:
END
55.ORG 0000H
JB 0F7H,HERE
SJMP NACK
LCD_DISPLAY:
NACK:
END
21. Microcontroller Solutions
56.
(A)ORG 0000H
MOV R0,#24H; PROGRAM IS DONE WITH THE HELP OF FIG 5-
1. MOV A,#0FFH
MOV @R0,A
MOV R0,#25H
MOV A,#0FFH
MOV
@R0,A END
(B)ORG
0000H SETB
20H SETB 21H
SETB 22H
SETB 23H
SETB 24H
SETB 25H
SETB 26H
SETB 27H
SETB 28H
SETB 29H
SETB 2AH
SETB 2BH
SETB 2CH
SETB 2DH
SETB 2EH
SETB 2FH END
22. Microcontroller Solutions
57.ORG 0000H
MOV B,#8
DIV AB
CJNE B,#00,HERE
SJMP FIN
HERE:MOV R0,A
FIN:
END
58.ORG 0000H
MOV R1,#8
BACK:MOV A,R2
RRC A; Rotate Right through carry means instead of 8 bit rotation it
JC HERE ;include carry flag as an MSB(most significant bit).
INC R0
HERE:DJNZ R1,BACK
END
Section 5.4:-
67.ORG 0000G
MOV A,#55H
MOV R0,#0C0H
MOV R7,#16
HERE:MOV @RO,A
INC R0
CALL DELAY
DJNZ R7,HERE
END
25. Microcontroller Solutions
MYDATA: DB 53,94,56,92,74,65,43,23,83
END
4. Just use DA( Decimal Adjust instruction in question 3)
5. (a) AND (b)
ORG 0000H
MOV R0,#40H
MOV R7,#16
MOV A,#55H
HERE:MOV @R0,A
INC R0
DJNZ R7,HERE
MOV R7,#16
MOV R1,#60H
MOV R0,#40H
CLR A
BACK:ADD A,@R0
JNC HERE1
INC @R1
HERE1:INC R0
DJNZ R7,BACK
MOV R0,#61H
MOV @R0,A
SJMP $
END
9. ORG 0000H
MOV R4,#00H
26. Microcontroller Solutions
MOV A,#48H
MOV R0,#9AH
ADD A,R0
MOV R7,A
MOV A,#0BCH
MOV R0,#7FH
ADDC A,R0 ;ADC is add with carry, if by adding A and R0
MOV R6,A ;Carry generates .What will it do , it will add both A and R0 With
MOV A,#34H;the Upside to it, it will also add the carry flag if it generates.
MOV R0,#89H
ADDC A,R0
MOV R5,A
JNC HERE
INC R4
HERE:MOV R0,#40H
MOV A,R4
MOV @R0,A
INC R0
MOV A,R5
MOV @R0,A
INC R0
MOV A,R6
MOV @R0,A
INC R0
MOV A,R7
MOV @R0,A
END
Here R5=BE,R6=3BH,R7=E2.The and is BE3BE2H.
27. Microcontroller Solutions
12.ORG 0000H
mov a,#77
mov b,#34
mulab
end
13.ORG 0000H
mov a,#77
mov b,#3
divab
end
14.No, Only on A and B.
15.ORG 0000H
MOV DPTR,#MYDATA
MOV R0,#30H
CALL TRANSFER
CALL ADDITION
CALL AVERAGE
LJMP FIN
TRANSFER:
MOV R7,#9
HERE:
CLR A
MOVC A,@A+DPTR
MOV @R0,A
INC DPTR
INC R0
DJNZ R7,HERE
29. Microcontroller Solutions
ADDITION:
MOV R7,#9
MOV R0,#30H
CLR A
HERE1:
ADD A,@R0
INC R0
DJNZ R7,HERE1
RET
AVERAGE:
MOV B,#9
DIV AB
MOV R7,A
RET
ORG 250H
MYDATA: DB 3,9,6,9,7,6,4,2,8
FIN:
END
Section 6.3:-
23.(a) A=40h (b)A=F6H (c)A=86H
Rest do it yourself just use Keil write instruction and see the result
in project window.
24.Just as in Question no 23 write those instruction in Kiel and view the result
of accumulator in Project window.
30. Microcontroller Solutions
27.There is no such instruction like CJE.
28.In this question you must monitor the status of the carry flag after the
execution of CJNE. Write a program below and check the status of the carry
flag in the PSW resister.
(a) ORG 0000H
BACK:MOV A,#25H ;Here the carry flag will go high.Always remember
CJNE A,#44H,over ; that carry will only go high when the value of source
SJMP BACK ; of CJNE instruction is greater than its destination.
OVER:
END ;
(b)
ORG 0000H
back:mov a,#0ffh ;Here carry flag will not go high as the value of the
cjne a,#6fh,over ;destination is greater than that of the source. sjmp
back
over:
end
Rest of the parts of question 28 now you can do them on your own.
30.(a)MOV A,#56H
SWAP A; What swap do is swap the upper and lower nibble now A
becomes ; A=65H
RR A
RR A
31. Microcontroller Solutions
(C)CLR C
MOV A,#4DH ; A=0100 1101B
SWAP A; A=D4 OR A= 1101 0100B
RRC A ;9 BIT ROTATION, A= 0 0110 1010B. You can see the zero before
;8-bit that is the carry bit that you included through RRC instructin. RRC
A ; A= 0 0011 0101b
RRC A ; A= 1 0001 1010b
32.ORG 0000H
MOV P1,#0FFH
MOV R7,#8
MOV A,P1
AGAIN:RRC A
JC HERE
INC R0
HERE:DJNZ
R7,AGAIN END
33.ORG 0000H
MOV R7,#8
MOV A,#68H
AGAIN:RRC A
JC HERE
INC R0
HERE:DJNZ
R7,AGAIN END
34.ORG 0000H
MOV R7,#8
MOV A,#68H
32. Microcontroller Solutions
AGAIN:RLC A
JC HERE
INC R0
HERE:DJNZ R7,AGAIN
END
40.ORG 0000H
MOV R7,#9
MOV P1,#0FFH
AGAIN1:MOV A,P1
ANL A,#0FH
ORL A,#30H
MOV R1,A
MOV R4,#34H
HERE:CJNE A,#30H,HERE1
SJMP BACK
HERE1:CJNE A,#31H,HERE2
SJMP BACK
HERE2:CJNE A,#32H,HERE3
SJMP BACK
HERE3:CJNE A,#33H,HERE4
SJMP BACK
HERE4:CJNE A,#34H,HERE5
SJMP BACK
HERE5:CJNE A,#35H,HERE6
SJMP BACK
HERE6:CJNE A,#36H,HERE7
SJMP BACK
HERE7:CJNE A,#37H,HERE8
SJMP BACK
33. Microcontroller Solutions
HERE8:CJNE A,#38H,HERE9
SJMP BACK
HERE9:CJNE A,#39H,HERE10
SJMP BACK
HERE10:ANL A,#0FH
ADD A,#37H
CJNE A,#41H,HERE11
SJMP BACK
HERE11:CJNE A,#42H,HERE12
SJMP BACK
HERE12:CJNE A,#43H,HERE13
SJMP BACK
HERE13:CJNE A,#44H,HERE14
SJMP BACK
HERE14:CJNE A,#45H,HERE15
SJMP BACK
HERE15:CJNE A,#46H,AGAIN1
BACK:
MOV P2,A
SJMP $
END
34. Microcontroller Solutions
43.This program is same as the check-sum program, right next to 6-36
example. The only difference is here you have to find the checksum byte of
a whole sentence and in the program you had to find the check sum of HEX
values. I point out the difference that has to make for this program the rest
of the program will remain the same,
------------------------------------------------------
DATA_ADDR EQU 400H
COUNT EQU 31 ; Nos of characters in the whole sentence.
RAM_ADDR EQU 20H
ORG 0000H
CALL COPY_DATA
CALL CAL_CHKSUM
CALL TEST_CHKSUM
COPY_DATA: --- ;THERE SUBROUTINES ARE PRESENTIS THE BOOK Pg 172.
--------------------
--------------------
RET
CAL_CHKSUM:---
---------------------
---------------------
RET
TEST_CHKSUM:---
----------------------
----------------------
RET
ORG 400H
MYBYTE: DB ‘Hello, my fellow World citizens’
END
35. Microcontroller Solutions
46.ORG 0000H
MOV R7,#9
MOV P1,#0FFH
AGAIN1:MOV A,P1
ANL A,#0FH
ORL A,#30H
MOV R1,A
MOV R4,#34H
HERE:CJNE A,#30H,HERE1
SJMP BACK
HERE1:CJNE A,#31H,HERE2
SJMP BACK
HERE2:CJNE A,#32H,HERE3
SJMP BACK
HERE3:CJNE A,#33H,HERE4
SJMP BACK
HERE4:CJNE A,#34H,HERE5
SJMP BACK
HERE5:CJNE A,#35H,HERE6
SJMP BACK
HERE6:CJNE A,#36H,HERE7
SJMP BACK
HERE7:CJNE A,#37H,HERE8
SJMP BACK
HERE8:CJNE A,#38H,HERE9
SJMP BACK
HERE9:CJNE A,#39H,AGAIN1
BACK:
MOV P2,A
37. Microcontroller Solutions
Chapter 9:-
1. 2 timers
2. 16 bit, Timer 0 and Timer 1.
3. TH0 AND TL0.
4. TH1 AND TL1.
5. NO,These register are not bit addressable.
6. 8 bit
7. TMOD is used to initialize the Timer0 or Timer1 and also Mode of timer to
which we have to use.it also let us to select that weather we have to use
Timer or Counter.
8. No
9. Use the Figure 9-3 of TMOD register.
Gate C/T M1 M0 Gate C/T M1 M0
0 1 1 0 0 1 1 0
10.Just Divide the XTAL values with 12 for frequencies and for the time period
take the inverse of frequence.
11.(a)13 bit (b)16 bit (c)8 bit
12.(a)Mode 08192 in decimal you can find out by 2^(13)=8192, that is
because our Mode is of 13 bit and 2000H
(b)Mode 165536 in decimal 2^(16)=65536, it is 16 bit and HEX Value is
FFFFH.
(c)Mode 2256 in decimal 2^(8)-256, it is 8 bit and HEX value i