Skip to content

Exam-style exercise bank

Partial II — delays and comparisons (Jun 2026 model)

Section titled “Partial II — delays and comparisons (Jun 2026 model)”

Study Delays and Comparisons first.

Ejercicio · Parcial

Theory: MOVF vs zero compare

Explain why MOVF REGISTRO,F uses flag Z (not C) to test zero. Write BTFSS/BTFSC to branch when the register is not zero.

Ejercicio · Parcial

REG1 > REG2 subroutine

Write a subroutine that jumps to MAYOR when REG1 is greater than REG2, using MOVF, SUBWF, and C/Z tests.

Ejercicio · Parcial

C and Z table after SUBWF

Fill C and Z after MOVF B,W / SUBWF A,W for: (10,10), (5,3), (2,7), (15,8).

Ejercicio · Parcial

3 ms delay @ 20 MHz

With CM = 4/20 MHz, find the outer counter value for a two-loop delay (inner N=250). Add tuning NOPs. Justify BRA in the inner loop.

Ejercicio · Parcial

Pump countdown 9→0

RA0: start button. RA1: pump. RB4–RB7: BCD display. On press, show 9 and decrement every 10 s until 0, then turn pump off.

Ejercicio · Parcial

Line-following robot

RB0/RB1: sensors. RD0/RD1: motors. Structure: read sensors → CALL CASO_1 … → BRA PROGRAMA.

The PDF Ejercicios II parcial 20252.pdf has tank-level control exercises — useful for flowcharts, not core delay/comparison theory.

Ejercicio · Parcial

Tank level control

Pump + valve with simulated sensors. See Level control project.

  • Precise pseudocode
  • Flowcharts with clear decisions
  • Modular assembly (CALL / RETURN)
  • Delay math: CM × Σ CI
  • Comparisons with Topic 5 C/Z table
  • Proteus simulation and oral explanation