Back to Practice Microprocessors

Peripheral Interfacing - Practice MCQs for CCAT

50 Questions Section C: Hardware Microprocessors

Peripheral Interfacing Question Bank for C-CAT

Topic-wise Peripheral Interfacing MCQs for CDAC C-CAT preparation with answers and explanations.

Q1.
8255 is:
ATimer
BDMA controller
CUART
DPPI (Programmable Peripheral Interface)
Show Answer & Explanation

Correct Answer: D - PPI (Programmable Peripheral Interface)

8255 is PPI - provides 3 ports for parallel I/O.

Q2.
8255 has how many ports?
A1
B2
C4
D3
Show Answer & Explanation

Correct Answer: D - 3

8255 has 3 ports: Port A, Port B, Port C.

Q3.
8254 is:
APPI
BProgrammable Interval Timer
CUART
DMemory
Show Answer & Explanation

Correct Answer: B - Programmable Interval Timer

8254 is a programmable timer/counter.

Q4.
8259 is:
ATimer
BProgrammable Interrupt Controller
CPPI
DUART
Show Answer & Explanation

Correct Answer: B - Programmable Interrupt Controller

8259 PIC manages hardware interrupts.

Q5.
8257 is:
ATimer
BPPI
CDMA Controller
DUART
Show Answer & Explanation

Correct Answer: C - DMA Controller

8257 is a DMA controller for direct memory access.

Q6.
8251 is:
ATimer
BPPI
CUSART
DDMA
Show Answer & Explanation

Correct Answer: C - USART

8251 USART handles serial communication.

Q7.
Maximum 8259 PICs cascaded:
A4
B9 (1 master + 8 slaves)
C8
D16
Show Answer & Explanation

Correct Answer: B - 9 (1 master + 8 slaves)

8259 can cascade: 1 master + 8 slaves = 64 interrupt levels.

Q8.
8255 Mode 0 is:
AStrobed I/O
BBidirectional
CSimple I/O (no handshaking)
DCounter mode
Show Answer & Explanation

Correct Answer: C - Simple I/O (no handshaking)

Mode 0: Basic I/O without handshaking.

Q9.
8254 has how many counters?
A1
B2
C3
D4
Show Answer & Explanation

Correct Answer: C - 3

8254 has 3 independent 16-bit counters.

Q10.
DMA advantage:
AUses more CPU
BNo advantage
CSlower than programmed I/O
DTransfers data without CPU
Show Answer & Explanation

Correct Answer: D - Transfers data without CPU

DMA transfers data directly between I/O and memory without CPU.

Q11.
The 8255 PPI (Programmable Peripheral Interface) has how many 8-bit ports?
A2
B4
C3
D8
Show Answer & Explanation

Correct Answer: C - 3

The 8255 PPI has three 8-bit ports: Port A, Port B, and Port C. Port C can be further split into two 4-bit ports (upper and lower).

Q12.
How many operating modes does the 8255 PPI support?
A2
B4
C3
D5
Show Answer & Explanation

Correct Answer: C - 3

The 8255 supports three operating modes: Mode 0 (Simple I/O), Mode 1 (Strobed I/O with handshaking), and Mode 2 (Bi-directional bus for Port A only).

Q13.
In the 8255, Mode 0 is also known as:
AStrobed I/O mode
BSimple I/O or Basic Input/Output mode
CBi-directional mode
DDMA mode
Show Answer & Explanation

Correct Answer: B - Simple I/O or Basic Input/Output mode

Mode 0 is the simple (basic) I/O mode where ports are configured as simple input or output ports without handshaking. No interrupt capability is available in this mode.

Q14.
The control word register of the 8255 is accessed at which address offset?
A00
B11
C10
D01
Show Answer & Explanation

Correct Answer: B - 11

The control word register is selected when A1=1 and A0=1 (address offset 11 binary or 03H). Port A=00, Port B=01, Port C=10, Control=11.

Q15.
In the 8255 control word, if bit D7 = 1, it indicates:
AI/O mode (mode definition)
BBSR (Bit Set/Reset) mode
CPort A is input
DPort B is output
Show Answer & Explanation

Correct Answer: A - I/O mode (mode definition)

When D7=1 in the control word, it indicates the I/O mode definition format, used to configure ports as input/output and select operating modes. D7=0 indicates BSR mode.

Q16.
Which mode of the 8255 supports bidirectional data transfer on Port A?
AMode 0
BMode 1
CBSR mode
DMode 2
Show Answer & Explanation

Correct Answer: D - Mode 2

Mode 2 is the bidirectional bus mode available only for Port A. It allows data to flow in both directions on Port A with handshaking signals from Port C.

Q17.
The 8253 Programmable Interval Timer has how many independent counters?
A1
B2
C4
D3
Show Answer & Explanation

Correct Answer: D - 3

The 8253 has three independent 16-bit counters (Counter 0, Counter 1, and Counter 2). Each counter can be programmed individually in different modes.

Q18.
How many modes of operation does the 8253 timer support?
A4
B5
C8
D6
Show Answer & Explanation

Correct Answer: D - 6

The 8253 supports 6 modes: Mode 0 (Interrupt on Terminal Count), Mode 1 (Hardware Retriggerable One-Shot), Mode 2 (Rate Generator), Mode 3 (Square Wave Generator), Mode 4 (Software Triggered Strobe), Mode 5 (Hardware Triggered Strobe).

Q19.
In the 8253, Mode 2 (Rate Generator) produces:
AA single pulse
BA low-going pulse for one clock period at the end of count
CA square wave with 50% duty cycle
DA hardware triggered strobe
Show Answer & Explanation

Correct Answer: B - A low-going pulse for one clock period at the end of count

Mode 2 (Rate Generator) produces a low-going pulse for one clock period when the count reaches zero, then reloads and repeats. It acts as a divide-by-N counter.

Q20.
Which mode of 8253 generates a square wave output?
AMode 3
BMode 1
CMode 2
DMode 0
Show Answer & Explanation

Correct Answer: A - Mode 3

Mode 3 (Square Wave Generator) generates a continuous square wave. For even counts, the duty cycle is 50%. For odd counts N, output is high for (N+1)/2 and low for (N-1)/2 clocks.

Q21.
The 8259 PIC (Programmable Interrupt Controller) can handle how many interrupt levels?
A8
B4
C16
D32
Show Answer & Explanation

Correct Answer: A - 8

A single 8259 PIC can handle 8 interrupt levels (IR0 to IR7). Multiple 8259s can be cascaded to handle up to 64 interrupt levels.

Q22.
How many 8259 PICs can be cascaded together?
A4 (up to 32 interrupts)
B9 (up to 64 interrupts)
C8 (up to 64 interrupts)
D16 (up to 128 interrupts)
Show Answer & Explanation

Correct Answer: B - 9 (up to 64 interrupts)

Up to 9 PICs can be cascaded: 1 master and 8 slaves, supporting up to 64 interrupt levels. Each slave connects to one of the 8 IR lines of the master.

Q23.
The 8259 PIC uses ICW (Initialization Command Words). How many ICWs are there?
A2
B4
C3
D5
Show Answer & Explanation

Correct Answer: B - 4

The 8259 has 4 ICWs: ICW1 (initialization), ICW2 (vector address), ICW3 (cascade configuration), and ICW4 (additional parameters). ICW1 and ICW2 are mandatory; ICW3 and ICW4 are conditional.

Q24.
What is the function of OCW1 in the 8259 PIC?
ASets the interrupt vector
BSends End of Interrupt
CMasks or unmasks individual interrupt lines
DConfigures cascade mode
Show Answer & Explanation

Correct Answer: C - Masks or unmasks individual interrupt lines

OCW1 (Operation Command Word 1) is used to set the Interrupt Mask Register (IMR). Each bit corresponds to an IR line; setting a bit to 1 masks (disables) that interrupt.

Q25.
In the 8259, the ISR (In-Service Register) indicates:
AInterrupts that are masked
BThe interrupt vector address
CInterrupts that are pending
DInterrupts that are currently being serviced
Show Answer & Explanation

Correct Answer: D - Interrupts that are currently being serviced

The ISR tracks which interrupt(s) are currently being processed by the CPU. A bit is set when an interrupt is acknowledged and cleared when an EOI command is issued.

Q26.
What does EOI (End of Interrupt) command do in the 8259?
AEnables all interrupts
BResets the interrupt controller
CClears the corresponding bit in the ISR
DMasks low-priority interrupts
Show Answer & Explanation

Correct Answer: C - Clears the corresponding bit in the ISR

The EOI command clears the highest-priority bit in the ISR (In-Service Register), indicating that the interrupt service routine has completed, allowing lower-priority interrupts.

Q27.
The 8257 DMA controller has how many DMA channels?
A2
B4
C8
D16
Show Answer & Explanation

Correct Answer: B - 4

The 8257 has 4 independent DMA channels (CH0 to CH3). Each channel can handle data transfer between memory and an I/O device independently.

Q28.
What is the maximum number of bytes that can be transferred in a single DMA block transfer by the 8257?
A256 bytes
B16384 bytes
C1024 bytes
D65536 bytes
Show Answer & Explanation

Correct Answer: B - 16384 bytes

Each DMA channel of the 8257 has a 14-bit terminal count register, allowing transfers of up to 214 = 16,384 bytes in a single block transfer.

Q29.
In DMA transfer, the CPU relinquishes control of the bus by responding to which signal?
AINTR
BREADY
CALE
DHOLD/HRQ
Show Answer & Explanation

Correct Answer: D - HOLD/HRQ

The DMA controller sends a HOLD (or HRQ) signal to the CPU. The CPU completes the current machine cycle, tri-states its buses, and responds with HLDA (Hold Acknowledge).

Q30.
Which DMA transfer mode allows bytes to be transferred one at a time with CPU regaining bus between each byte?
ACycle stealing mode
BBurst mode
CBlock transfer mode
DTransparent mode
Show Answer & Explanation

Correct Answer: A - Cycle stealing mode

In cycle stealing (single transfer) mode, the DMA controller transfers one byte at a time and returns bus control to the CPU between each byte. This allows CPU and DMA to share the bus.

Q31.
The 8255 BSR (Bit Set/Reset) mode is used to:
ASet or reset any bit of Port A
BSet or reset any bit of Port B
CSet or reset all ports simultaneously
DSet or reset any bit of Port C
Show Answer & Explanation

Correct Answer: D - Set or reset any bit of Port C

BSR mode (D7=0 in control word) allows individual bits of Port C to be set or reset without affecting other bits. Only Port C supports this feature.

Q32.
In the 8253 control word, bits D1-D0 specify:
ACounter selection
BRead/Write mode
CBCD or binary counting
DMode selection
Show Answer & Explanation

Correct Answer: C - BCD or binary counting

Bits D1-D0 select BCD (D0=1) or binary (D0=0) counting. Bits D7-D6 select the counter, D5-D4 select read/write mode, and D3-D1 select the operating mode.

Q33.
What is the function of the GATE input in the 8253 timer?
AProvides the clock signal
BEnables or disables counting
COutputs the timer signal
DResets the counter
Show Answer & Explanation

Correct Answer: B - Enables or disables counting

The GATE input enables or disables counting depending on the mode. In most modes, GATE must be HIGH for counting to proceed. In some modes, a rising edge on GATE triggers counting.

Q34.
The 8259 PIC can operate in which priority modes?
AFixed priority only
BBoth fixed and rotating priority
CRotating priority only
DNo priority handling
Show Answer & Explanation

Correct Answer: B - Both fixed and rotating priority

The 8259 supports both fixed (fully nested) priority mode where IR0 has highest priority, and rotating priority mode where the last serviced interrupt gets lowest priority.

Q35.
How does the 8255 Port C function differently from Ports A and B?
APort C can be split into two 4-bit ports and provides handshaking signals
BPort C is output only
CPort C is always in Mode 2
DPort C cannot be programmed
Show Answer & Explanation

Correct Answer: A - Port C can be split into two 4-bit ports and provides handshaking signals

Port C can be split into upper 4 bits (PC4-PC7) and lower 4 bits (PC0-PC3), which can be independently configured. In Modes 1 and 2, Port C bits serve as handshaking and control signals.

Q36.
The 8257 DMA controller uses which technique to resolve channel priority?
ASoftware polling
BFixed priority and rotating priority
CRandom selection
DFirst-come-first-served
Show Answer & Explanation

Correct Answer: B - Fixed priority and rotating priority

The 8257 supports both fixed priority (CH0 highest to CH3 lowest) and rotating priority (last serviced channel gets lowest priority), configured through the mode register.

Q37.
In the 8253, if the clock input frequency is 2 MHz and the counter is loaded with 1000 (decimal), what is the output frequency in Mode 2?
A500 Hz
B1 kHz
C2 kHz
D4 kHz
Show Answer & Explanation

Correct Answer: C - 2 kHz

In Mode 2 (Rate Generator), Output frequency = Clock frequency / Count = 2 MHz / 1000 = 2 kHz. The counter divides the input clock by the loaded count value.

Q38.
What type of data transfer does DMA perform?
ADirect data transfer between memory and I/O without CPU intervention
BInterrupt-driven I/O
CCPU-controlled programmed I/O
DSerial data transfer
Show Answer & Explanation

Correct Answer: A - Direct data transfer between memory and I/O without CPU intervention

DMA (Direct Memory Access) transfers data directly between memory and I/O devices without CPU involvement. The DMA controller takes over the bus and manages the transfer.

Q39.
In the 8259, the IRR (Interrupt Request Register) stores:
AThe interrupt being serviced
BThe interrupt vector
CMasked interrupt information
DPending interrupt requests from IR lines
Show Answer & Explanation

Correct Answer: D - Pending interrupt requests from IR lines

The IRR stores the status of interrupt request lines. When an IR pin goes active, the corresponding bit in the IRR is set, indicating a pending interrupt request.

Q40.
Which register in the 8253 holds the count value currently being decremented?
ACounting Element (CE)
BCount Register (CR)
CControl register
DOutput Latch (OL)
Show Answer & Explanation

Correct Answer: A - Counting Element (CE)

The Counting Element (CE) holds the current count being decremented. The Count Register (CR) holds the initial value loaded by the CPU, which is transferred to CE when counting begins.

Q41.
The 8255 in Mode 1 uses Port C bits for:
AHandshaking and control signals
BAdditional data lines
CAddress lines
DCounter outputs
Show Answer & Explanation

Correct Answer: A - Handshaking and control signals

In Mode 1 (Strobed I/O), Port C bits are used for handshaking signals like STB (Strobe), IBF (Input Buffer Full), OBF (Output Buffer Full), ACK (Acknowledge), and INTR (Interrupt).

Q42.
What is the purpose of the HLDA signal in DMA operations?
ACPU acknowledges and grants bus to DMA controller
BRequests the bus from CPU
CIndicates DMA transfer complete
DResets the DMA controller
Show Answer & Explanation

Correct Answer: A - CPU acknowledges and grants bus to DMA controller

HLDA (Hold Acknowledge) is sent by the CPU in response to HOLD/HRQ signal. It indicates that the CPU has tri-stated its buses and the DMA controller can take over the bus.

Q43.
In the 8259, what does the Special Mask Mode allow?
AMasking all interrupts
BProgramming in binary mode
CDisabling cascade mode
DEnabling interrupts of lower priority while servicing a higher priority interrupt
Show Answer & Explanation

Correct Answer: D - Enabling interrupts of lower priority while servicing a higher priority interrupt

Special Mask Mode allows interrupts of any priority to be selectively enabled while a higher-priority interrupt is being serviced, overriding the normal priority mechanism.

Q44.
The 8253/8254 timer can count in which formats?
ABoth binary (16-bit) and BCD (4-decade)
BBCD only
CBinary only
DHexadecimal only
Show Answer & Explanation

Correct Answer: A - Both binary (16-bit) and BCD (4-decade)

The 8253/8254 can count in binary (0 to FFFF, 16-bit) or BCD (0 to 9999, 4-decade). The counting format is selected by bit D0 of the control word.

Q45.
What is the maximum count value in the 8253 when operating in binary mode?
A9999
B16384
C65536
D32768
Show Answer & Explanation

Correct Answer: C - 65536

In binary mode, loading a count of 0 results in the maximum count of 65536 (216). The counter counts from the loaded value down to 0.

Q46.
In the 8255, which mode supports handshaking with interrupt capability?
AMode 1 and Mode 2
BMode 0 only
CBSR mode
DAll modes
Show Answer & Explanation

Correct Answer: A - Mode 1 and Mode 2

Mode 1 (Strobed I/O) and Mode 2 (Bidirectional) support handshaking with interrupt capability using Port C bits for control signals like STB, ACK, IBF, OBF, and INTR.

Q47.
How does the 8257 indicate the end of a DMA transfer?
ABy sending an interrupt
BBy resetting the counter
CBy releasing HOLD
DBy asserting the TC (Terminal Count) signal
Show Answer & Explanation

Correct Answer: D - By asserting the TC (Terminal Count) signal

The 8257 asserts the TC (Terminal Count) signal when the byte count reaches zero, indicating that the programmed number of bytes has been transferred.

Q48.
The 8259 PIC's ICW2 is used to specify:
AThe upper 5 bits of the interrupt vector address
BThe cascade configuration
CThe edge/level trigger mode
DThe EOI mode
Show Answer & Explanation

Correct Answer: A - The upper 5 bits of the interrupt vector address

ICW2 specifies the upper 5 bits (A7-A3) of the interrupt vector address. The lower 3 bits are determined by the interrupt level (IR0-IR7). This maps interrupts to vector addresses.

Q49.
In the 8253, Mode 0 (Interrupt on Terminal Count) output goes LOW when:
ACounting starts
BGATE goes low
CThe control word is written
DThe count value is loaded
Show Answer & Explanation

Correct Answer: C - The control word is written

In Mode 0, the output initially goes LOW when the control word is written (or the mode is set). It goes HIGH when the terminal count (zero) is reached.

Q50.
What is the role of the CAS (Cascade) lines in the 8259 PIC?
AIdentify which slave PIC is requesting an interrupt during cascade mode
BCarry address signals to memory
CConnect counter outputs in series
DProvide clock synchronization between PICs
Show Answer & Explanation

Correct Answer: A - Identify which slave PIC is requesting an interrupt during cascade mode

The 3 CAS lines (CAS0-CAS2) are used in cascade mode to identify which slave 8259 is requesting service. The master places the slave ID on these lines during the interrupt acknowledge cycle.

Showing 1-10 of 50 questions