Unit 1: Digital Electronics & Microprocessors (Lab: PHYDSC354P)
1. Laboratory Objectives
The objective of this practical course is to master Digital Circuit Design and Assembly Level Programming. In the first half, you will build sequential circuits using ICs, and in the second half, you will interface with the Intel 8085 Microprocessor to execute mathematical and logical operations.
2. Study of Flip-Flops
Flip-flops are the basic building blocks of memory. In this experiment, you verify the truth tables of various flip-flops using NAND/NOR gates or dedicated ICs (like 7474 or 7476).
- RS Flip-Flop: The simplest form; has an invalid state when R=1, S=1.
- JK Flip-Flop: Resolves the invalid state by "toggling" the output when J=1, K=1.
- D Flip-Flop: Data or Delay flip-flop; output follows the input at the clock edge.
3. Design of Counters
Counters are used to count clock pulses. You will typically work with MOD-N counters.
- Asynchronous (Ripple) Counter: The clock is given only to the first flip-flop; others are triggered by the previous stage's output.
- Synchronous Counter: All flip-flops share the same clock signal simultaneously, making it faster and avoiding "glitches".
4. Shift Registers
Shift registers are used for data storage and transfer. You will study four types:
SISO (Serial-In Serial-Out),
SIPO (Serial-In Parallel-Out),
PISO, and
PIPO.
5. Introduction to 8085 Microprocessor Kit
The 8085 is an 8-bit general-purpose microprocessor. In the lab, you use a trainer kit with a hex keypad.
Key Components:
- Registers: Accumulator (A), B, C, D, E, H, L.
- Program Counter (PC): Holds the address of the next instruction.
- Stack Pointer (SP): Manages the stack memory.
6. Basic 8085 Assembly Language Programming
You will perform basic arithmetic. Below is a sample for 8-bit Addition:
LXI H, 2000H ; Load address of 1st number in HL pair
MOV A, M ; Move 1st number to Accumulator
INX H ; Point to next memory location
ADD M ; Add 2nd number to Accumulator
INX H ; Point to next memory location
MOV M, A ; Store result in memory
HLT ; Halt the program
7. Data Conversion (BCD to Binary)
This experiment involves converting a Binary Coded Decimal (BCD) number into its binary equivalent. This requires logical shifting and addition operations within the 8085 registers.
Lab Exam Focus Corner
Frequently Asked Questions
- What is the difference between a Latch and a Flip-Flop? Latches are level-triggered (asynchronous), while Flip-Flops are edge-triggered (synchronous).
- Explain the 'Carry Flag' in 8085. It is set to 1 if an arithmetic operation results in a carry out of the most significant bit (MSB).
- Why do we use HL pair for memory pointers? Because instructions like
MOV A, M implicitly use the HL pair to find the address of 'M'.
Common Mistakes
- Clock Pulse: In digital IC experiments, ensure you don't "double-trigger" the clock due to switch bouncing. Use a debounced switch.
- Hex Calculations: When writing 8085 programs, remember that
9 + 1 = A in Hex, not 10. This is the most common cause of logic errors.
Practical Tips
Tip: Always clear the Accumulator or registers before starting an addition/multiplication loop in 8085 to avoid garbage values affecting your result. For digital ICs, check the Vcc (Pin 14/16) and Ground (Pin 7/8) first!