Short-Answer Quiz: Answer Key
- An embedded system has three components. These are its hardware, its application software, and a Real Time Operating System (RTOS) which supervises the software and controls latencies. The RTOS defines how the system works, though small-scale systems may not have one.
- Key differences include: microprocessors are multitasking while microcontrollers are single-task oriented; microprocessors can have external RAM, ROM, and I/O ports added, whereas these are fixed and embedded on a microcontroller chip; and microprocessor-based systems are generally costlier, larger, and consume more power than lightweight, cheaper, and more power-efficient microcontroller-based systems.
- The primary distinction is how they handle instructions and data. In a Von Neumann architecture, a single memory and bus is shared for both code and data, meaning instruction fetches and data operations cannot occur simultaneously. In a Harvard architecture, there are separate storage and signal buses for instructions and data, allowing for simultaneous access to both.
- A cross-compiler is a compiler that can create an executable program that runs on a computer with a different CPU or operating system than the computer on which the program was compiled. A standard compiler translates high-level source code into a low-level language (like machine code) intended to run on the same type of computer where the compilation occurs.
- When connected to external memory, Port 0 serves a dual role as both the lower 8-bit address bus (A0-A7) and the 8-bit data bus (D0-D7), with the ALE pin indicating its current function. Port 2 also serves a dual role, functioning as a standard I/O port or providing the upper 8-bits of the 16-bit address bus (A8-A15) for accessing external memory.
- The Program Status Word (PSW) is an 8-bit register, also known as the flag register, that contains status bits reflecting the current state of the CPU. Its four conditional flags are CY (Carry flag), AC (Auxiliary Carry flag), P (Parity flag), and OV (Overflow flag).
- A “PUSH” operation is the process of storing the contents of a CPU register in the stack section of RAM. When a value is pushed onto the stack, the Stack Pointer (SP) is first incremented by 1, and the value is then stored at the resulting memory location indicated by the new SP value.
- In register indirect addressing mode, the address of the data to be accessed is stored in a register, and the instruction references that register. The 8051 uses the value inside the specified register as the memory address from which to fetch the operand. Only registers R0 and R1 are allowed for this addressing mode.
- The C/T bit in the TMOD register selects whether a timer is used as a timer for delay generation or as an event counter. If C/T is set to 0, it acts as a timer, using the internal crystal frequency as its clock source. If C/T is set to 1, it acts as a counter, incrementing in response to an external input signal.
- The Interrupt Vector Table is a table of fixed memory locations set aside to hold the addresses of the Interrupt Service Routines (ISRs). When an interrupt occurs, the microcontroller jumps to the corresponding location in this table to find the starting address of the specific ISR it needs to execute.