You are on page 1of 15

What is a microcontroller?

A microcontroller is a microprocessor system but


smaller and usually have additional features built for
a specific task.

What are some examples of devices that use Some examples of devices that use
microcontrollers? microcontrollers are robots, calculators, traffic lights,
security systems, washing machines, electronic
billboards, and microwave ovens.

What is a microprocessor system? A microprocessor system is a computer system that


comprises of many elements, including a Central
Processing Unit (CPU), Storage Elements,
Read-only Memory (ROM), Random Access
Memory (RAM), Input/Output Module (IO),
Serial/Parallel Communication Ports, and
Timer/Interrupt Modules.

What is the difference between a microprocessor A microprocessor system is a general-purpose


system and a microcontroller? microprocessor, while a microcontroller is a
microprocessor system but smaller and usually has
additional features built for a specific task.

What are the additional features that a The additional features that a microcontroller has
microcontroller has? are integrated altogether into one single chip.

ware that is typically burned into the A microcontroller has on-chip RAM, ROM, and I/O
microcontroller's ROM •Examples of embedded ports, while a general-purpose microprocessor
products include o Microwave o VCR o TV remote requires external RAM, ROM, and I/O ports to
control o Telephone o Digital camera o Automobile function.
o Washing machine o Printer What is the difference
between a microcontroller and a general-purpose
microprocessor?

What are the advantages of using a microcontroller The fixed amount of on-chip ROM, RAM, and
in applications where cost and space are critical number of I/O ports makes them ideal for many
considerations? applications in which cost and space are critical.

What is an embedded product? An embedded product uses a microprocessor (or


microcontroller) to do one task and one task only.

What is the typical application software burned into There is only one application software that is
a microcontroller's ROM in an embedded product? typically burned into the microcontroller's ROM in an
embedded product.
What are some examples of embedded products? Examples of embedded products include a
microwave, VCR, TV remote control, telephone,
digital camera, automobile, washing machine, and
printer.

al, Binary, Octal, and Hexadecimal What is an An embedded system uses a microprocessor (or
embedded system? microcontroller) to do one task and one task only.

What is the difference between an embedded A PC can be used for any number of applications,
system and a PC? while an embedded system has only one
application software that is typically burned into
ROM.

What is the purpose of RAM memory in a PC? RAM memory in a PC allows the operating system
to load a variety of applications into RAM and lets
the CPU run them.

What is the function of a microcontroller in a Each peripheral has a microcontroller inside it that
peripheral? performs only one task.

What topics are considered pre-learned in this Numbering systems, binary/octal/hexadecimal


subject? numbers, decimal to binary/octal/hexadecimal
conversions, binary data, standard data codes,
combinational logic circuits and its operations,
adder, decoder, multiplexer, electronic operating
characteristics, input switch, keypad matrix,
common anode/cathode LEDs, and 7 segment
display.

What is the Intel 8051 microcontroller? The Intel 8051 is a microcontroller discussed in this
chapter.

What are the four numbering systems covered in Decimal, Binary, Octal, and Hexadecimal.
the pre-learned topics?

What is the purpose of representing binary numbers To make negative numbers possible.
in a certain data magnitude?

What is the difference between signed number Signed number representation uses the leftmost bit
representation and magnitude representation? to represent the number as positive or negative,
while magnitude representation uses a certain
number of bits to represent the value.
What is Gray Code? A code used to control analog power switching by
coding binary values.

What is ASCII Code? A code that assigns unique binary data values to
characters and is 7 bits wide.

What is EBCDIC Code? A code that assigns unique binary data values to
characters and is called Extended Binary Coded
Decimal Interchange Code.

What is the EBCDIC Code? The EBCDIC Code is the Extended Binary Coded
Decimal Interchange Code, which is widely used by
IBM systems and is 8 bits wide.

What is a half adder? A half adder is a combinational logic system that


adds two single binary digits and produces a sum
and a carry output.

What is a decoder? A decoder is a combinational logic system that


converts a binary code into a specific output.

What is an input switch? An input switch is an electronic operating


characteristic that is a two or three-pin device used
to control the flow of current in a circuit.

What is a keypad matrix? A keypad matrix is an electronic operating


characteristic that is a grid of buttons used to input
data into a microcontroller or microprocessor.

What is a common anode/cathode display? A common anode/cathode display is an electronic


operating characteristic that is a type of light
emitting diode (LED) 7-segment display.

What are the four digital components that a Registers, Arithmetic Logic Unit (ALU), Control Unit
processor can be built on? (CU), and Internal Interconnections.

What is the function of Registers in a processor? Registers are internal storage components for
temporary data access and processing.

What is the Arithmetic Logic Unit (ALU) in a The ALU is the component where data are
processor? processed arithmetically or logically.
What is the Control Unit (CU) in a processor? The CU is the component where instructions are
defined for the data to be processed.

What is the function of Internal Interconnections in a Internal Interconnections provide the


processor? communication between registers, ALU, and CU.

What is the Program Counter (PC) register in a The PC points to the memory address location of a
processor? program code due to be fetched.

What are General Purpose Registers in a General Purpose Registers support internal storage
processor? for process, control, reference, etc.

What is the Accumulator (ACC) register in a The ACC is the main register for storing ALU
processor? resulting data and can shift, rotate, add, subtract,
and invert.

What is the Program Status Word (PSW) register in The PSW is a register that contains control bits for a
a processor? processor and also contains flag signals of the
Accumulator status such as Zero, Parity, Overflow,
Sign, etc.

What is the purpose of the flag signals in a They indicate the status of Zero, Parity, Overflow,
processor's accumulator status? Sign, etc.

What is the Stack Pointer (SP)? It is a register that stores the specific address for
stacking data.

What happens every time an address is used for the The stack register will update a new pointer
stack? address.

Is initializing and enabling the stack pointer required Yes.


in certain processor architectures?

What is the Arithmetic Logic Unit (ALU)? It is the fundamental building block of the processor
designed to perform arithmetic, logic, and shift
operations.

What kind of operations can the ALU perform? It can perform arithmetic operations such as
addition, subtraction, multiplication, and division,
logic operations such as AND, OR, XOR, and shift
operations such as rotate, shift, and swap.
What are the status signals generated by the ALU They are stored in the PSW register.
operations stored in?

What is the Control Unit (CU)? It is the brain of the processor that directs the
processor's operation and tells the memory, ALU,
and input/output peripherals how to respond to a
program instruction.

What does the Control Unit consist of? It consists of multiple levels of sequences and
events that interpret the program code and transmit
and receive control signals throughout the
processor.

What is the purpose of the program counter (PC) The program counter register points to the memory
register in a processor? address location for the processor to fetch and
execute program instructions.

What is the default value of the program counter The default value of the program counter register is
(PC) register when a processor is powered up or 00H.
reset?

What is the stack in a processor or microcontroller? The stack is a place to temporarily store important
data when a subroutine or interrupt program is
executed.

What are program instructions in a processor or Program instructions are binary codes, also known
microcontroller? as machine codes or hex codes, that are read from
memory and executed by the processor.

What is the Fetch-Decode-Execute cycle in a The Fetch-Decode-Execute cycle is the process by


processor or microcontroller? which the processor fetches program instructions
from memory, decodes them, and executes them.

What is the hexadecimal radix used for in program The hexadecimal radix is used to describe program
instructions? instructions in a more human-readable format.

What is the purpose of the DIV AB instruction in the The DIV AB instruction divides the values stored in
assembly code example provided? registers A and B and stores the result in register A.

What is the purpose of the END instruction in the The END instruction marks the end of the program.
assembly code example provided?

What is the purpose of the ORG 00H instruction in The ORG 00H instruction sets the memory location
the assembly code example provided? where the program will be stored to 00H.
What is the purpose of the MOV A,24H instruction The MOV A,24H instruction moves the value 24H
in the assembly code example provided? into register A.

What is the purpose of the MOV B,34H instruction The MOV B,34H instruction moves the value 34H
in the assembly code example provided? into register B.

What is the purpose of the stack in It operates as a reserved area to store current
microcontrollers? important values such as program counter,
accumulator, program status word and others.

What does the value shown by the stack pointer It represents the address in the RAM.
register represent?

What is the concept used by the stacking operation Last In First Out (LIFO) concept.
in microcontrollers?

What is the term used for putting data into the stack PUSH.
in microcontrollers?

What is the term used for getting data out of the POP.
stack in microcontrollers?

What are the key factors that a microcontroller Ability to detect or sense the surrounding (input
should have? feature), ability to provide a certain amount of
response (output feature), ability to exploit the
response frequency (timer/delay feature), ability to
provide prioritize response (interrupt feature),
contain storage for program (non-volatile memory
feature), contain storage for temporary data
processing (RAM feature).

What are some additional features that may be ADC/DAC module, IP module, GSM module.
taken into consideration for microcontrollers?

What is the Z80 processor architecture based on? The Z80 processor architecture is based on the
Intel 8080 architecture.

What are the features of the MC6811 processor? The MC6811 processor has a stack-based
architecture, built-in EEPROM and RAM, digital I/O,
a timer, and an ADC.
What is the MCS-51 processor architecture? The MCS-51 processor architecture is an 8-bit
Harvard architecture with 4KByte ROM on-chip and
64KByte ROM external, RAM, 2 timers, 1 serial,
and 4 8-bit parallel ports.

What is the most widely used microcontroller family The MCS-51 is currently the most widely used
currently? microcontroller family.

What is the 8051 microcontroller? The 8051 microcontroller is the original member of
the Intel MCS-51 family of microcontrollers.

What are the two types of memory in the 8051 The two types of memory in the 8051
microcontroller? microcontroller are program memory (ROM) and
data memory (RAM).

What is the OADDC instruction used for? It performs an 8-bit addition between the
accumulator, a second operand, and the previous
value of the CY flag.

What is the usefulness of the OADDC instruction? It is useful for 16-bit addition in two steps.

What is the mechanism of the DA A instruction? It formats the accumulator into a proper 2 digit
packed BCD number.

What happens if the lower nibble is greater than 9 in The A flag is set to 1, and 6 is added to the lower
the DA A instruction? nibble.

What happens if the upper nibble is greater than 9 The C flag is set to 1, and 6 is added to the upper
in the DA A instruction? nibble.

What is the mechanism of the SUBB instruction? It subtracts an operand and the previous value of
the borrow (carry) flag from the accumulator.

What is the result of the SUBB instruction always The accumulator.


saved in?

What is the purpose of the CLR C instruction? It sets the carry flag to 0.

wing code: ADD A,#38H ADD A,#2FH What is the 67H.


value of A after the execution of the above code?
What is the purpose of the SUBB instruction in the To subtract the value of R3 from A and store the
given code? result in A.

What is the result of the 2's complement of the 1101 1100.


source operand in the given code?

What is the purpose of the OINC instruction? To increment the operand by one.

What is the purpose of the OMUL AB instruction? To multiply A by B and place the result in A (lower
byte) and B (higher byte).

What is the purpose of the ODIV AB instruction? To divide A (numerator) by B (denominator) and
place the result in A (quotient) and B (remainder).

What is the value of A and B after the execution of A = 99H, B = 0EH.


the OMUL AB instruction with A = 25H and B =
65H?

What is the status of the CY, OV, and P flags after CY = 0, OV = 0.


the execution of the DIV AB instruction with A = 95
and B = 10?

What is the value of B after the instruction 'MOV 10.


B,#10'?

What is the result of the instruction 'O DIV AB'? A = 9, B = 5.

What is the status of the CY, AC, and P flag after CY = 0 since there is no carry beyond the D7 bit.
the addition of 38H and 2FH?

What is the status of the CY, AC, and P flag after This information is not provided in the text.
the addition of 9CH and 64H?

What is the purpose of the ANL, ORL, and XRL They are used to perform logical operations on one
logical operations? or two bytes of data.

What is the effect of ANL and ORL operations on ANL and ORL operations have no effect on flags.
flags?

What are the different operands that can be used ANL A, Rn, ANL A, direct, ANL A, @Ri, ANL A,
with ANL operations? #data, ANL direct, A, ANL direct, #data, ANL C, bit,
and ANL C, /bit.
What is the result of the ANL operation 'ANL A = A AND 0FH, A = 05H.
A,#OFH' when A = 35H?

What is the purpose of the CPL and CLR logical They are used to complement and clear a byte,
operations? respectively.

What is the difference between RL and RLC logical RL rotates the bits of a byte to the left, while RLC
operations? rotates the bits of a byte to the left through carry.

What is the purpose of the RR and RRC logical They are used to rotate the bits of a byte to the right
operations? and to the right through carry, respectively.

lower nibble of the accumulator •What is ANL? ANL is a logical operation that performs a bitwise
AND between two operands.

•What is the result of the ANL operation between The result is 05H.
35H and 0FH?

•What is ORL? ORL is a logical operation that performs a bitwise


OR between two operands.

•What is the result of the ORL operation between The result is 34H.
04H and 30H?

•What is XRL? XRL is a logical operation that performs a bitwise


XOR between two operands.

•What is the result of the XRL operation between The result is 2CH.
54H and 78H?

•What is OCPL? OCPL is a logical operation that complements a bit


or a group of bits.

•What is the result of OCPL A when A is 55H? The result is AAH.

•What is RR? RR is a logical operation that rotates the bits of the


accumulator to the right.

•What is the result of RR A when A is 36H? The result is 1BH.

•What is RL? RL is a logical operation that rotates the bits of the


accumulator to the left.
•What is the result of RL A when A is 72H? The result is E4H.

•What is RRC? RRC is a logical operation that rotates the bits of the
accumulator to the right through the carry flag.

•What is the result of RRC A when A is 26H? The result is 13H and the carry flag is 0.

•What is RLC? RLC is a logical operation that rotates the bits of the
accumulator to the left through the carry flag.

•What is the result of RLC A when A is 55H and the The result is 6AH and the carry flag is 1.
carry flag is 1?

•What is OSWAP? OSWAP is a logical operation that swaps the upper


and lower nibble of the accumulator.

What is the binary value of A after the first RRC 0010 1010.
operation?

What is the binary value of A after the second RRC 1010 1010.
operation?

What is the purpose of the SWAP operation? To exchange the upper and lower nibbles of the
accumulator.

What is the value of A after the SWAP operation? 72H.

What is the purpose of the MOV instruction? To move data within or between various memory
spaces.

What is the difference between MOV and MOVC? MOV moves data within internal data memory and
SFR, while MOVC loads the accumulator with a
byte from program memory.

What is the purpose of the PUSH instruction? To push data onto the stack.

What is the purpose of the POP instruction? To pop data from the stack.

What is the purpose of the XCH instruction? To exchange data.

What is the purpose of the XCHD instruction? To exchange low-order data.


What is the difference between MOV and MOVX? MOV transfers 8-bit data, while MOVX transfers
external RAM data.

What is the purpose of the MMOV instruction? To move 1-bit data involving the CY flag.

What is the purpose of the MDPTR instruction? To transfer 16-bit data involving the DPTR.

What is the purpose of the MOVC instruction? To move code byte and load the accumulator with a
byte from program memory.

What is the MOV instruction used for? To copy data within internal data memory and SFR.

What is the purpose of the OMOVX instruction? Data transfer between the accumulator and a byte
from external data memory.

What is the syntax for using the OMOVC instruction OMOVC A, @A+DPTR.
to access data elements of look-up table entries
located in the program space ROM at 8051?

What is the purpose of the PUSH/POP instructions? To push and pop a data byte onto the stack,
increment/decrement the stack pointer, and copy
the byte into/from the stack.

What is the syntax for using the XCH instruction to XCH A, Rn.
exchange the accumulator and a byte variable?

What is the purpose of the XCHD instruction? To exchange the lower digit of the accumulator with
the lower digit of the memory location specified.

•JNC LABEL Jump to LABEL if Carry flag is not set.

•JC LABEL Jump to LABEL if Carry flag is set.

What is the purpose of the instruction 'MOV C, To copy the CY flag to bit 3F of the bit addressable
3FH'? memory.

What is the purpose of the instruction 'MOV P1.2, To copy the CY flag to bit 2 of P1.
C'?

What is the purpose of the OJC/JNC instructions? To jump to a relative address if CY is set/cleared.
What is the purpose of the OJB/JNB instructions? To jump to a relative address if a bit is set/cleared.

What is the purpose of the OJB ACC.2, <label> To jump to a relative address if a bit is set and clear
instruction? the bit.

What is the purpose of branching instructions? To allow execution of different flows of program
according to different input situations.

What is the difference between unconditional and Unconditional branching instructions allow for
conditional branching instructions? jumping to a specific location in the program without
any conditions, while conditional branching
instructions allow for jumping to a specific location
in the program based on certain conditions being
met.

What are the four types of unconditional jump Short Jump (SJMP), Long Jump (LJMP), Absolute
instructions provided by the 8051? Jump (AJMP), and Indirect Jump (JMP).

What is the difference between Short Jump and Short Jump is a 2-byte instruction with a relative
Long Jump instructions? address range of 00-FFH, while Long Jump is a
3-byte instruction with a 16-bit address range
allowing for jumping to any memory location
0000-FFFFH.

What is the purpose of the Absolute Jump To jump to a destination address using a 2-byte
instruction? instruction with an 11-bit destination address.

What is the maximum memory location that can be FFFFH.


jumped to in the 8051 microcontroller?

What is the difference between an absolute jump An absolute jump uses an 11-bit address and
and an indirect jump in the 8051 microcontroller? replaces the low-order 11 bits in the PC, while an
indirect jump uses a register to hold the address to
jump to.

What is the purpose of a subroutine in a program? A subroutine is often used to perform tasks that
need to be performed frequently, making the
program more structured and saving memory
space.
What is the difference between an absolute call and An absolute call uses an 11-bit address and the
a long call in the 8051 microcontroller? subroutine must be within the same 2K byte, while a
long call uses a 22-bit address and can call
subroutines located anywhere in the program
memory.

What happens after a subroutine is executed in the The program returns to the original location where
8051 microcontroller? the subroutine was called, and the returning
address is recorded in the stack.

What is the difference between Absolute Call and Absolute Call uses an 11-bit address and the
Long Call in 8051? subroutine must be within the same 2K byte, while
Long Call uses a 16-bit address and the subroutine
can be anywhere within 64K byte address.

What does the subroutine instruction 'RET' do in It pops the return address from the stack and
8051? continues execution there.

What does the subroutine instruction 'RETI' do in It pops the return address from the stack, restores
8051? the interrupt logic to accept additional interrupts at
the same priority level as the one just processed,
and continues execution at the address retrieved
from the stack.

What is Conditional Jump in 8051? It is a jump instruction that only jumps if a certain
condition is met.

What are the conditional jump instructions The 8051 supports 5 different conditional jump
supported by 8051? instructions: jz, jnz, jc, jnc, and sjmp.

What is the purpose of the 'jz' instruction in 8051 It jumps if A is zero.


assembly language?

What is the purpose of the 'djnz' instruction in 8051 It decrements a byte and jumps if not equal to zero.
assembly language?

What is the purpose of the 'jnc' instruction in 8051 It is conditional on the carry CY flag.
assembly language?

What is the purpose of the 'cjne' instruction in 8051 It compares and jumps if not equal.
assembly language?
How do you add 3 to A ten times in 8051 assembly Move A to 0, move 10 to R2, add 3 to A, decrement
language? R2 and jump to 'AGAIN' until R2 equals 0, then
move the result to R5.

How do you move Rm to Rn in 8051 assembly Use the 'mov' instruction and specify the registers
language? with their corresponding numbers.

How do you switch the upper 4-bits and lower 4-bits Use the 'swap' instruction.
of a given data in 55H in 8051 assembly language?

What is the purpose of machine cycles in 8051 Instructions executed in an assembly program are
assembly language? done in sequence based on the ROM address
pointed by the Program Counter.

The CPU takes a certain number of clock cycles


(machine cycles) to execute an instruction.

What is the formula for calculating the period of a Period of Machine cycle = 1/[oscillator
machine cycle? frequency/12].

What is the time delay for executing an instruction in Instruction set machine cycle x period of machine
an 8051 system? cycle.

What is the machine cycle for a crystal frequency of 0.75us.


16MHz?

How long does it take to execute the instruction 1.085 us.


"MOV R3,#55H" in an 8051 system of 11.0592
MHz?

What is the size of the delay in the program if the 436.255µs.


crystal frequency is 11.0592MHz?

What is the machine cycle for the loop in the 1.


program with the instruction "MOV R2,#200"?

What is the time delay for the loop in the program 2x250x1.085µs.
with the instruction "DJNZ R3,HERE"?

What is the purpose of the code in the provided It is a delay loop that waits for a specific amount of
text? time.
What is the total delay time for the code in the The total delay time is 217651µs.
EXAMPLE section?

What is the purpose of the code in the DELAY It is a delay loop that waits for a specific amount of
section? time.

What is the value of Tmc in the DELAY section? Tmc is 1.085us.

What is the purpose of the LOOP1 and LOOP2 in They are nested loops that create a delay.
the DELAY section?

What is the total Tmc for the code in the DELAY The total Tmc is not provided in the text.
section?

You might also like