Introduction In this chapter a hardware configuration for an 805 I microcontroller, which will be used for all of the example applications in Chapters 8 and 9, is defined. Programs that check the initial prototype of the design (debugging programs) are given in this chapter, followed by several common subroutines that can be used by […]
Continue reading…
Posts by Farahat
8051 Jump and Call Opcodes ,Calls and Subroutines, Interrupts and Returns,With Problems on Jump and Call
Calls and Subroutines The life of a microcontroller would be very tranquil if all programs could run with no thought as to what is going on in the real world outside. However, a microcontroller is specifically intended to interact with the real world and to react, very quickly, to events that require program attention to […]
Continue reading…
8051 Jump and Call Opcodes ,Introduction,The Jump and Call Program Range ,and Jumps
Introduction The opcodes that have been examined and used in the preceding chapters may be thought of as action codes. Each instruction performs a single operation on hytes of data. The jumps and calls discussed in this chapter are decision codes that alter the flow of the program by examining the results of the action […]
Continue reading…
8051 Arithmetic Operations Subtraction, Multiplication, Division, Decimal Arithmetic ,Example Programs, AND Summary
Subtraction Subtraction can be done by taking the 2’s complement of the number to be subtracted, the subtrahend, and adding it to another number, the minuend. The 8051, however, has commands to perform direct subtraction of two signed or unsigned numbers. Register A is the destination address for subtraction. All four addressing modes may […]
Continue reading…
8051 Arithmetic Operations Flags, Incrementing and Decrementing,AND Addition
Introduction Applications of microcontrollers often involve performing mathematical calculations on data in order to alter program flow and modify program actions. A microcontroller is not designed to be a "number cruncher," as is a general-purpose computer. The domain of the microcontroller is that of controlling events as they change (real-time control). A sufficient number of […]
Continue reading…
8051 Logical Operations Rotate and Swap Operations Example Programs and Summary
Rotate and Swap Operations The ability to rotate data is useful for inspecting bits of a byte without using individual bit opcodes. The A register can be rotated one bit position to the left or right with or without including the C flag in the rotation. If the C flag is not included, then the […]
Continue reading…
8051 Logical Operations Byte-Level Logical Operations and Bit-Level Logical Operations
Introduction One application area the 8051 is designed to fill is that of machine control. A large part of machine control concerns sensing the on-off states of external switches, making decisions based on the switch states. and then turning external circuits on or off. Single point sensing and control implies a need for byte and […]
Continue reading…
ASSIGNMENTS on INTRODUCTION TO Z80 INSTRUCTIONS AND PROGRAMMING TECHNIQUES (part2)
ASSIGNMENTS on INTRODUCTION TO Z80 INSTRUCTIONS AND PROGRAMMING TECHNIQUES (part2) 25. Rewrite the instructions in Figures 8.2 (a), (b), and (c) using the index registers IX and IY as memory pointers. 26. Write instructions to load XX70H into the IY index register. Using the register IY as a memory pointer with appropriate offsets, store the […]
Continue reading…
ASSIGNMENTS on INTRODUCTION TO Z80 INSTRUCTIONS AND PROGRAMMING TECHNIQUES( part 1)
ASSIGNMENTS on INTRODUCTION TO Z80 INSTRUCTIONS AND PROGRAMMING TECHNIQUES Note: In the following assignments, substitute high-order memory address XX with the high-order address and PORT with the output port address of your single-board microcomputer system, Use your own data if data are not given, and specify memory addresses for labels such as INBUF and OUTBUF. […]
Continue reading…
SUMMARY off INTRODUCTION TO Z80 INSTRUCTIONS AND PROGRAMMING TECHNIQUES
SUMMARY off INTRODUCTION TO Z80 INSTRUCTIONS AND PROGRAMMING TECHNIQUES In this chapter, we illustrated a group of instructions from the Z80 set frequently used in writing programs. Instructions were selected from three groups: data copy, arithmetic, and branch. These instructions range from 1 byte to 4 bytes long. General characteristics of these instructions are […]
Continue reading…