Advantages of at89c51 microcontroller over 8051 microcontroller?
the 8051 microcontrroller is the name doesnt matter easy or not....but the maiin and imp diff between both is at89s51 represents the 8051 chip no....along with the name of company i.e atmel, so all n all both are same thing ......
89c51 have RISC architecture and contains less no of opcodes which are easy for programming. so iti is preferred than 8051.
* More than one thread doing I/O on the same device (on an I/O bound task)
* More than one thread using the same data that must be locked
What function for stack pointer of the register?
A stack pointer is a register pointing to the top of a stack. It supports the fundamental stack manipulations (push and pop) in an efficient manner.
Most micro processor hardware has build-in hardware support for stack pointers, typically both in form of dedicated stack pointer registers and in form of addressing modes which support the creation and maintenance of stacks through general-purpose pointer registers.
In software, many programming languages feature constructs suited for implementation of stack pointers within the high-level language (such as post-increment and pre-decrement operators in C).
What is a bus in a microprocessor?
A bus consists of wires which is used to transfer data either in serial or parallel transmission.
What is message passing explain the advantages of message passing?
message passing is the way of exchanging information between systems or individuals,at d same time.advantage is that we can interact by getting all the necessary details
How did the microprocessor change computers?
The micro processor made today's computer possible.
Pre-microprocessor computers, while being ingenious engineering accomplishments, are outperformed by microprocessor based systems by an order of magnitudes. Even microprocessor based systems from over a decade ago, in terms of speed and complexity of calculations, general purpose use, power consumption, physical size, reliability and cost.
What are the four task that a CPU performs to process information that has been input by a user?
1)Fetch
2)Decode
3)Execute
4)Store
What are the advantages of an assembly language in comparison with high level languages?
Assembly language is lower level language. it can under stand only (who knows the assembly)assembly language program developers. actually assembly language is the effect way to implement programes.
74 basic instructions set in 8085 microprocessor?
8085 Instruction Set Page 1
8085 INSTRUCTION SET
INSTRUCTION DETAILS
DATA TRANSFER INSTRUCTIONS
Opcode Operand Description
Copy from source to destination
MOV Rd, Rs This instruction copies the contents of the source
M, Rs register into the destination register; the contents of
Rd, M the source register are not altered. If one of the operands is a
memory location, its location is specified by the contents of
the HL registers.
Example: MOV B, C or MOV B, M
Move immediate 8-bit
MVI Rd, data The 8-bit data is stored in the destination register or
M, data memory. If the operand is a memory location, its location is
specified by the contents of the HL registers.
Example: MVI B, 57H or MVI M, 57H
Load accumulator
LDA 16-bit address The contents of a memory location, specified by a
16-bit address in the operand, are copied to the accumulator.
The contents of the source are not altered.
Example: LDA 2034H
Load accumulator indirect
LDAX B/D Reg. pair The contents of the designated register pair point to a memory
location. This instruction copies the contents of that memory
location into the accumulator. The contents of either the
register pair or the memory location are not altered.
Example: LDAX B
Load register pair immediate
LXI Reg. pair, 16-bit data The instruction loads 16-bit data in the register pair
designated in the operand.
Example: LXI H, 2034H or LXI H, XYZ
Load H and L registers direct
LHLD 16-bit address The instruction copies the contents of the memory location
pointed out by the 16-bit address into register L and copies
the contents of the next memory location into register H. The
contents of source memory locations are not altered.
Example: LHLD 2040H
8085 Instruction Set Page 2
Store accumulator direct
STA 16-bit address The contents of the accumulator are copied into the memory
location specified by the operand. This is a 3-byte instruction,
the second byte specifies the low-order address and the third
byte specifies the high-order address.
Example: STA 4350H
Store accumulator indirect
STAX Reg. pair The contents of the accumulator are copied into the memory
location specified by the contents of the operand (register
pair). The contents of the accumulator are not altered.
Example: STAX B
Store H and L registers direct
SHLD 16-bit address The contents of register L are stored into the memory location
specified by the 16-bit address in the operand and the contents
of H register are stored into the next memory location by
incrementing the operand. The contents of registers HL are
not altered. This is a 3-byte instruction, the second byte
specifies the low-order address and the third byte specifies the
high-order address.
Example: SHLD 2470H
Exchange H and L with D and E
XCHG none The contents of register H are exchanged with the contents of
register D, and the contents of register L are exchanged with
the contents of register E.
Example: XCHG
Copy H and L registers to the stack pointer
SPHL none The instruction loads the contents of the H and L registers into
the stack pointer register, the contents of the H register
provide the high-order address and the contents of the L
register provide the low-order address. The contents of the H
and L registers are not altered.
Example: SPHL
Exchange H and L with top of stack
XTHL none The contents of the L register are exchanged with the stack
location pointed out by the contents of the stack pointer
register. The contents of the H register are exchanged with
the next stack location (SP+1); however, the contents of the
stack pointer register are not altered.
Example: XTHL
8085 Instruction Set Page 3
Push register pair onto stack
PUSH Reg. pair The contents of the register pair designated in the operand are
copied onto the stack in the following sequence. The stack
pointer register is decremented and the contents of the highorder
register (B, D, H, A) are copied into that location. The
stack pointer register is decremented again and the contents of
the low-order register (C, E, L, flags) are copied to that
location.
Example: PUSH B or PUSH A
Pop off stack to register pair
POP Reg. pair The contents of the memory location pointed out by the stack
pointer register are copied to the low-order register (C, E, L,
status flags) of the operand. The stack pointer is incremented
by 1 and the contents of that memory location are copied to
the high-order register (B, D, H, A) of the operand. The stack
pointer register is again incremented by 1.
Example: POP H or POP A
Output data from accumulator to a port with 8-bit address
OUT 8-bit port address The contents of the accumulator are copied into the I/O port
specified by the operand.
Example: OUT F8H
Input data to accumulator from a port with 8-bit address
IN 8-bit port address The contents of the input port designated in the operand are
read and loaded into the accumulator.
Example: IN 8CH
8085 Instruction Set Page 4
ARITHMETIC INSTRUCTIONS
Opcode Operand Description
Add register or memory to accumulator
ADD R The contents of the operand (register or memory) are
M added to the contents of the accumulator and the result is
stored in the accumulator. If the operand is a memory
location, its location is specified by the contents of the HL
registers. All flags are modified to reflect the result of the
addition.
Example: ADD B or ADD M
Add register to accumulator with carry
ADC R The contents of the operand (register or memory) and
M the Carry flag are added to the contents of the accumulator
and the result is stored in the accumulator. If the operand is a
memory location, its location is specified by the contents of
the HL registers. All flags are modified to reflect the result of
the addition.
Example: ADC B or ADC M
Add immediate to accumulator
ADI 8-bit data The 8-bit data (operand) is added to the contents of the
accumulator and the result is stored in the accumulator. All
flags are modified to reflect the result of the addition.
Example: ADI 45H
Add immediate to accumulator with carry
ACI 8-bit data The 8-bit data (operand) and the Carry flag are added to the
contents of the accumulator and the result is stored in the
accumulator. All flags are modified to reflect the result of the
addition.
Example: ACI 45H
Add register pair to H and L registers
DAD Reg. pair The 16-bit contents of the specified register pair are added to
the contents of the HL register and the sum is stored in the
HL register. The contents of the source register pair are not
altered. If the result is larger than 16 bits, the CY flag is set.
No other flags are affected.
Example: DAD H
8085 Instruction Set Page 5
Subtract register or memory from accumulator
SUB R The contents of the operand (register or memory ) are
M subtracted from the contents of the accumulator, and the result
is stored in the accumulator. If the operand is a memory
location, its location is specified by the contents of the HL
registers. All flags are modified to reflect the result of the
subtraction.
Example: SUB B or SUB M
Subtract source and borrow from accumulator
SBB R The contents of the operand (register or memory ) and
M the Borrow flag are subtracted from the contents of the
accumulator and the result is placed in the accumulator. If
the operand is a memory location, its location is specified by
the contents of the HL registers. All flags are modified to
reflect the result of the subtraction.
Example: SBB B or SBB M
Subtract immediate from accumulator
SUI 8-bit data The 8-bit data (operand) is subtracted from the contents of the
accumulator and the result is stored in the accumulator. All
flags are modified to reflect the result of the subtraction.
Example: SUI 45H
Subtract immediate from accumulator with borrow
SBI 8-bit data The 8-bit data (operand) and the Borrow flag are subtracted
from the contents of the accumulator and the result is stored
in the accumulator. All flags are modified to reflect the result
of the subtracion.
Example: SBI 45H
Increment register or memory by 1
INR R The contents of the designated register or memory) are
M incremented by 1 and the result is stored in the same place. If
the operand is a memory location, its location is specified by
the contents of the HL registers.
Example: INR B or INR M
Increment register pair by 1
INX R The contents of the designated register pair are incremented
by 1 and the result is stored in the same place.
Example: INX H
8085 Instruction Set Page 6
Decrement register or memory by 1
DCR R The contents of the designated register or memory are
M decremented by 1 and the result is stored in the same place. If
the operand is a memory location, its location is specified by
the contents of the HL registers.
Example: DCR B or DCR M
Decrement register pair by 1
DCX R The contents of the designated register pair are decremented
by 1 and the result is stored in the same place.
Example: DCX H
Decimal adjust accumulator
DAA none The contents of the accumulator are changed from a binary
value to two 4-bit binary coded decimal (BCD) digits. This is
the only instruction that uses the auxiliary flag to perform the
binary to BCD conversion, and the conversion procedure is
described below. S, Z, AC, P, CY flags are altered to reflect
the results of the operation.
If the value of the low-order 4-bits in the accumulator is
greater than 9 or if AC flag is set, the instruction adds 6 to the
low-order four bits.
If the value of the high-order 4-bits in the accumulator is
greater than 9 or if the Carry flag is set, the instruction adds 6
to the high-order four bits.
Example: DAA
8085 Instruction Set Page 7
BRANCHING INSTRUCTIONS
Opcode Operand Description
Jump unconditionally
JMP 16-bit address The program sequence is transferred to the memory location
specified by the 16-bit address given in the operand.
Example: JMP 2034H or JMP XYZ
Jump conditionally
Operand: 16-bit address
The program sequence is transferred to the memory location
specified by the 16-bit address given in the operand based on
the specified flag of the PSW as described below.
Example: JZ 2034H or JZ XYZ
Opcode Description Flag Status
JC Jump on Carry CY = 1
JNC Jump on no Carry CY = 0
JP Jump on positive S = 0
JM Jump on minus S = 1
JZ Jump on zero Z = 1
JNZ Jump on no zero Z = 0
JPE Jump on parity even P = 1
JPO Jump on parity odd P = 0
8085 Instruction Set Page 8
Unconditional subroutine call
CALL 16-bit address The program sequence is transferred to the memory location
specified by the 16-bit address given in the operand. Before
the transfer, the address of the next instruction after CALL
(the contents of the program counter) is pushed onto the stack.
Example: CALL 2034H or CALL XYZ
Call conditionally
Operand: 16-bit address
The program sequence is transferred to the memory location
specified by the 16-bit address given in the operand based on
the specified flag of the PSW as described below. Before the
transfer, the address of the next instruction after the call (the
contents of the program counter) is pushed onto the stack.
Example: CZ 2034H or CZ XYZ
Opcode Description Flag Status
CC Call on Carry CY = 1
CNC Call on no Carry CY = 0
CP Call on positive S = 0
CM Call on minus S = 1
CZ Call on zero Z = 1
CNZ Call on no zero Z = 0
CPE Call on parity even P = 1
CPO Call on parity odd P = 0
8085 Instruction Set Page 9
Return from subroutine unconditionally
RET none The program sequence is transferred from the subroutine to
the calling program. The two bytes from the top of the stack
are copied into the program counter, and program execution
begins at the new address.
Example: RET
Return from subroutine conditionally
Operand: none
The program sequence is transferred from the subroutine to
the calling program based on the specified flag of the PSW as
described below. The two bytes from the top of the stack are
copied into the program counter, and program execution
begins at the new address.
Example: RZ
Opcode Description Flag Status
RC Return on Carry CY = 1
RNC Return on no Carry CY = 0
RP Return on positive S = 0
RM Return on minus S = 1
RZ Return on zero Z = 1
RNZ Return on no zero Z = 0
RPE Return on parity even P = 1
RPO Return on parity odd P = 0
8085 Instruction Set Page 10
Load program counter with HL contents
PCHL none The contents of registers H and L are copied into the program
counter. The contents of H are placed as the high-order byte
and the contents of L as the low-order byte.
Example: PCHL
Restart
RST 0-7 The RST instruction is equivalent to a 1-byte call instruction
to one of eight memory locations depending upon the number.
The instructions are generally used in conjunction with
interrupts and inserted using external hardware. However
these can be used as software instructions in a program to
transfer program execution to one of the eight locations. The
addresses are:
Instruction Restart Address
RST 0 0000H
RST 1 0008H
RST 2 0010H
RST 3 0018H
RST 4 0020H
RST 5 0028H
RST 6 0030H
RST 7 0038H
The 8085 has four additional interrupts and these interrupts
generate RST instructions internally and thus do not require
any external hardware. These instructions and their Restart
addresses are:
Interrupt Restart Address
TRAP 0024H
RST 5.5 002CH
RST 6.5 0034H
RST 7.5 003CH
8085 Instruction Set Page 11
LOGICAL INSTRUCTIONS
Opcode Operand Description
Compare register or memory with accumulator
CMP R The contents of the operand (register or memory) are
M compared with the contents of the accumulator. Both
contents are preserved . The result of the comparison is
shown by setting the flags of the PSW as follows:
if (A) < (reg/mem): carry flag is set
if (A) = (reg/mem): zero flag is set
if (A) > (reg/mem): carry and zero flags are reset
Example: CMP B or CMP M
Compare immediate with accumulator
CPI 8-bit data The second byte (8-bit data) is compared with the contents of
the accumulator. The values being compared remain
unchanged. The result of the comparison is shown by setting
the flags of the PSW as follows:
if (A) < data: carry flag is set
if (A) = data: zero flag is set
if (A) > data: carry and zero flags are reset
Example: CPI 89H
Logical AND register or memory with accumulator
ANA R The contents of the accumulator are logically ANDed with
M the contents of the operand (register or memory), and the
result is placed in the accumulator. If the operand is a
memory location, its address is specified by the contents of
HL registers. S, Z, P are modified to reflect the result of the
operation. CY is reset. AC is set.
Example: ANA B or ANA M
Logical AND immediate with accumulator
ANI 8-bit data The contents of the accumulator are logically ANDed with the
8-bit data (operand) and the result is placed in the
accumulator. S, Z, P are modified to reflect the result of the
operation. CY is reset. AC is set.
Example: ANI 86H
8085 Instruction Set Page 12
Exclusive OR register or memory with accumulator
XRA R The contents of the accumulator are Exclusive ORed with
M the contents of the operand (register or memory), and the
result is placed in the accumulator. If the operand is a
memory location, its address is specified by the contents of
HL registers. S, Z, P are modified to reflect the result of the
operation. CY and AC are reset.
Example: XRA B or XRA M
Exclusive OR immediate with accumulator
XRI 8-bit data The contents of the accumulator are Exclusive ORed with the
8-bit data (operand) and the result is placed in the
accumulator. S, Z, P are modified to reflect the result of the
operation. CY and AC are reset.
Example: XRI 86H
Logical OR register or memory with accumulaotr
ORA R The contents of the accumulator are logically ORed with
M the contents of the operand (register or memory), and the
result is placed in the accumulator. If the operand is a
memory location, its address is specified by the contents of
HL registers. S, Z, P are modified to reflect the result of the
operation. CY and AC are reset.
Example: ORA B or ORA M
Logical OR immediate with accumulator
ORI 8-bit data The contents of the accumulator are logically ORed with the
8-bit data (operand) and the result is placed in the
accumulator. S, Z, P are modified to reflect the result of the
operation. CY and AC are reset.
Example: ORI 86H
Rotate accumulator left
RLC none Each binary bit of the accumulator is rotated left by one
position. Bit D7 is placed in the position of D0 as well as in
the Carry flag. CY is modified according to bit D7. S, Z, P,
AC are not affected.
Example: RLC
Rotate accumulator right
RRC none Each binary bit of the accumulator is rotated right by one
position. Bit D0 is placed in the position of D7 as well as in
the Carry flag. CY is modified according to bit D0. S, Z, P,
AC are not affected.
Example: RRC
8085 Instruction Set Page 13
Rotate accumulator left through carry
RAL none Each binary bit of the accumulator is rotated left by one
position through the Carry flag. Bit D7 is placed in the Carry
flag, and the Carry flag is placed in the least significant
position D0. CY is modified according to bit D7. S, Z, P, AC
are not affected.
Example: RAL
Rotate accumulator right through carry
RAR none Each binary bit of the accumulator is rotated right by one
position through the Carry flag. Bit D0 is placed in the Carry
flag, and the Carry flag is placed in the most significant
position D7. CY is modified according to bit D0. S, Z, P, AC
are not affected.
Example: RAR
Complement accumulator
CMA none The contents of the accumulator are complemented. No flags
are affected.
Example: CMA
Complement carry
CMC none The Carry flag is complemented. No other flags are affected.
Example: CMC
Set Carry
STC none The Carry flag is set to 1. No other flags are affected.
Example: STC
8085 Instruction Set Page 14
CONTROL INSTRUCTIONS
Opcode Operand Description
No operation
NOP none No operation is performed. The instruction is fetched and
decoded. However no operation is executed.
Example: NOP
Halt and enter wait state
HLT none The CPU finishes executing the current instruction and halts
any further execution. An interrupt or reset is necessary to
exit from the halt state.
Example: HLT
Disable interrupts
DI none The interrupt enable flip-flop is reset and all the interrupts
except the TRAP are disabled. No flags are affected.
Example: DI
Enable interrupts
EI none The interrupt enable flip-flop is set and all interrupts are
enabled. No flags are affected. After a system reset or the
acknowledgement of an interrupt, the interrupt enable flipflop
is reset, thus disabling the interrupts. This instruction is
necessary to reenable the interrupts (except TRAP).
Example: EI
8085 Instruction Set Page 15
Read interrupt mask
RIM none This is a multipurpose instruction used to read the status of
interrupts 7.5, 6.5, 5.5 and read serial data input bit. The
instruction loads eight bits in the accumulator with the
following interpretations.
Example: RIM
Set interrupt mask
SIM none This is a multipurpose instruction and used to implement the
8085 interrupts 7.5, 6.5, 5.5, and serial data output. The
instruction interprets the accumulator contents as follows.
Example: SIM
What are Characteristics of a coaxial cable?
Optical-fiber systems have many advantages over metallic-based communication systems. These advantages include interference, attenuation, and bandwidth characteristics. Furthermore, the relatively smaller cross section of fiber-optic cables allows room for substantial growth of the capacity in existing conduits. Fiber-optic characteristics can be classified as linear and nonlinear. Nonlinear characteristics are influenced by parameters, such as bit rates, channel spacing, and power levels.
Difference between 8031 8051 and 8751 microcontrollers?
Answer It is both 8 bit processors in a 40 pin package but it is not pin compatible, it have almost the same functions but it is very difficult to compare the two because it is not the same family.
What size breaker do i need for a central heat and air unit?
The breaker type be it a single pole or double pole will depend on what voltage the air conditioner operates on. Once the voltage is established, the sizing of the breaker depends on what the current draw of the air conditioner is.
Assembler directives in microprocessor?
Manual coding of 8086 is difficult hence we use a assembler or a compiler. Note that the microprocessor should be able to interpret your discussions via the program. Suppose if the instruction corresponds to word(16 bits), we use assembler directive WORD PTR, but when assembler is contacting the processor it sets a bit called 'w' indicating its a byte operation.
What is the decimal equivalent of 0XFFFF?
0X at the beginning represent a number in the hexadecimal system of units.
FFFF is the hexadecimal equivalent of
i) 65535 in decimal system of units
ii) 1111111111111111 in binary system of units
What is the difference between microcontroller and psoc microcontroller?
Psoc includes the analog and digital component where else in controller only digital. :P
What do RISC and CISC stand for and what are the differences in practice?
RISC stands for Reduced Instruction Set Computer CISC stands for Complex Instruction Set Computer RISC processors have a simpler set of machine instructions than CISC processors, but are intended to be more efficient and flexible in processing programs and data. Because of the reduced instruction set, RISC processors demand more effort on the part of the compiler (not the end user) and use longer machine language programs. RISC processors are more flexible in the sense that they are not as preconfigured in how they process programs and data. CISC microprocessors actually preceded RISC microprocessors and were derived from microcontroller based mini-computers such as the HP2100. See the Wikipedia entries on "Complex Instruction Set Computer" and "Reduced Instruction Set Computer" for more.
What is difference between micro controller and micro processor?
* Microcontrollers are sub class of Microprocessor. * Microcontrollers are generally target specific. * For example when the application requirement is to capture 2 analog signals, 5 digital signals, store 512 bytes of data, and to place a time stamp (date & time). Ø Here in the case of processor we need a ADC to process the analog signal, ROM (512 bytes or greater memory size) to store 512 bytes of data, RTC (Real time clock) to get present date and time, of course digital signals can be captured using the I/O port pins, and a RAM also has to be added. This makes the size of the PCB pretty big. Ø In the case of controller all these are found inside it, our task is to select the controller based on the requirement. The microcontroller is basically a processor with some special features like ADC, DAC, RAM, ROM, etc., in it.
microprocessor is able to perform all the task done by micro controller but the microprocessor does not have any timers and counters internally for that operations it need the timers and counters from external. but micro controller can perform all the operations
....
Why is silicon used in the manufacture of microprocessors?
Silicon is used for making most semiconductor devices today, so it is used for making microprocessors too. It is the only inexpensive, easy to process semiconductor material currently available to use in making integrated circuits.
Germanium is not practical to make any type of integrated circuit for several reasons.
Gallium arsenide can be used to make integrated circuits, but is too expensive and difficult to process for devices as complicated as microprocessors. Also there is the issue of arsenic toxicity during processing.
Diamond offers possibilities as a semiconductor for very high temperature operation, but processing issues have yet to be worked out.
Carbon nanotubes also offer possibilities for making semiconductor devices, but use in microprocessors is in the far distant future (if ever).
An alloy of silicon and germanium offers many of the advantages of gallium arsenide but without the toxicity issue, but again many processing issues need to be worked out before it is practical to use.
How does AVR on generator work?
The function of AVR is to automatically regulate the voltage of Generators. As the terminal voltage of a generators drops the AVR boosts the voltage.
What is a latch in microprocessor?
A latch is a type of flip-flop circuit that is used to store digital information in a microprocessor or other digital system. A latch is essentially a digital memory element that can hold a single bit of information (i.e. a "1" or "0"). Latches can be used to store data that needs to be held temporarily, such as the current state of a program, or to create a temporary buffer for data that is being moved between different parts of a system.
What is the difference between transistor and processor?
Transistor is an tiny electronic device called electronic switch,which is building block of a processor.
Processor is a data processing device consists of thousands or millions of transistors. Eg- Intel 8086 microprocessor has around 29000 transistors.
What refers to the number of bits that a microprocessor can manipulate at one time?
As quoted from Google Books, "Word size refers to the number of bits that a microprocessor can manipulate at one time."
What is the difference between three address instruction and two address instruction?
the differebce between three address instruction and two address instruction is
three adresss instructoion two address instruction
1) here 3 oprarend fields are used 1) here 2 oprerand fields are used
2) the result is stored in 3rd operand 2) here the result is stored in 2nd oparend
What does URL mean and what do you use it for?
URL stands for Uniform Resource Locator. It is used like a postal address on the Internet. An URL looks like this:
http://www.google.com/search.html
Similar to a postal address, URLs have different parts to it:
http:// is the protocol to use to get to the resource. This is just like saying whether you want to send a letter using registered mail, air or ground mail.
www.google.com is the name of the webserver holding the resource you want to access. This is equivalent to the town and its postal code.
/search.html is the resource you want to access. This is just like the road and its house number.