About this previous year paper
MICROCONTROLLERS FOR EMBEDDED SYSTEMS (NEC022R)
SECTION – A
(Attempt All | 10 × 2 = 20 Marks)
(a) MOVX and MOVC instructions in 8051
MOVX: Used to transfer data between accumulator and external data memory (RAM).
MOVC: Used to read data from code (program) memory, typically for lookup tables.
(b) Bit addressable RAM in 8051
8051 has 16 bytes (20H–2FH) of RAM that is bit-addressable. Each bit can be accessed individually, making it efficient for flags and control bits.
(c) Pull-up / Pull-down resistor in MSP430
Pull-up resistor: Connects input to logic HIGH when switch is open.
Pull-down resistor: Connects input to logic LOW when switch is open.
In MSP430, these are enabled internally using GPIO registers.
(d) Comparison of 8051 and MSP430x5xxx
| Feature | 8051 | MSP430x5xxx |
|---|---|---|
| Architecture | CISC | RISC |
| Power consumption | Higher | Ultra-low |
| Word length | 8-bit | 16-bit |
| Clock speed | Moderate | Higher & flexible |
| Applications | General embedded | Low-power embedded |
(e) Transfer modes in DMA controller of MSP430 Single transfer mode
Block transfer mode Burst block mode
Repeated single transfer mode Repeated block transfer mode
(f) Data acquisition
Data acquisition is the process of collecting real-world analog signals, converting them into digital form using ADC, and processing them using a microcontroller.
(g) Any four GPIO registers PxDIR – Direction register
PxIN – Input register PxOUT – Output register
PxREN – Resistor enable register
(h) WDTPW and WDTNMI
WDTPW: Watchdog Timer Password used to enable/disable WDT.
WDTNMI: Configures WDT pin as Non-Maskable Interrupt input.
(i) Serial communication interfaces in MSP430 UART / USART
SPI I2C
USCI_Ax and USCI_Bx modules
(j) Features of ADC10 in MSP430 10-bit resolution
Multiple input channels Low power consumption
Internal reference voltage Sample-and-hold circuit
SECTION – B
(Attempt Any Five | 5 × 10 = 50 Marks)
(a) Memory-mapped vs I/O-mapped peripherals
Memory-mapped peripherals: Share same address space as memory
Accessed using normal load/store instructions
I/O-mapped peripherals: Separate address space
Accessed using special I/O instructions
MSP430 uses memory-mapped peripherals.
(b) Addressing modes in 8051
Immediate Direct
Register Register indirect
Indexed Relative
These modes provide flexibility in data access.
(c) RTC (Real Time Clock) – block diagram & applications
Blocks: Oscillator
Counter Control registers
Battery backup
Modes: Clock mode
Calendar mode Alarm mode
Applications: Digital clocks, data logging, embedded systems.
(d) PWM – working & block diagram
PWM varies duty cycle of a digital signal to control power.
Working: Timer counts
Compare register sets ON/OFF time Duty cycle controls output power
Applications: Motor speed control, LED dimming.
(e) MSP430 program: Toggle LEDs using switch
Logic: P1.5 & P1.7 as outputs
P1.2 as input with pull-down On switch press → toggle LEDs
(Program written in exam with register-level instructions.)
(f) LED intensity control using PWM PWM signal is applied to LED pin.
Increasing duty cycle → more ON time → higher brightness.
(g) Flow chart for receiving single byte via USCI_Bx (I2C)
Steps: Configure USCI_Bx
Set slave address = 32H Enable receive mode
Start condition Receive byte
Stop condition
(h) ZigBee wireless module
ZigBee is a low-power, short-range wireless communication protocol.
Block diagram: RF transceiver
Microcontroller Memory
Power unit Used in IoT, home automation, sensor networks.
SECTION – C
(Attempt Any Two | 2 × 15 = 30 Marks)
(i) 8051 Assembly code to display string on LCD
Steps: Initialize LCD
Send command bytes Send ASCII data bytes
Use delay routine (Complete program written in exam-oriented assembly format.)
(ii) Maskable interrupt in MSP430
Maskable interrupts can be enabled or disabled by software.
Working: Interrupt request generated
CPU checks enable bit ISR executed
Return using RETI Used for timers, serial communication, GPIO.
(i) I2C data frame format
Frame includes: Start bit
7-bit slave address R/W bit
ACK/NACK Data byte
Stop bit Ensures reliable serial communication.
(ii) GPIO resistors in MSP430x5xx Pull-up resistor: Input defaults to HIGH
Pull-down resistor: Input defaults to LOW
Enabled using PxREN and PxOUT registers.
(i) Near Field Communication (NFC)
NFC is a short-range wireless technology operating at 13.56 MHz.
Modes:
Reader/Writer mode Peer-to-Peer mode
Card emulation mode Used in payments, access cards, smartphones.
(ii) DMA transfer modes Single transfer
Block transfer Burst transfer
Repeated transfer modes DMA improves performance by reducing CPU load.
