Skip to content

Theory exam guide

It is an 8-bit microcontroller that integrates CPU, memory, and peripherals such as digital ports, timers, ADC, PWM, serial communication, and USB.

What is the difference between a microcontroller and a microprocessor?

Section titled “What is the difference between a microcontroller and a microprocessor?”

A microcontroller integrates CPU, memory, and peripherals in one chip (e.g. PIC18F4550). A microprocessor is only the CPU; in a classic PC, RAM and the rest sit on the motherboard. Platforms like Raspberry Pi are single-board computers (SBCs): they already include SoC, RAM on the board, and SD storage, running Linux.

It is a special memory location used to store data or control internal hardware. For example, TRISB configures the direction of PORTB pins.

It defines whether port pins are inputs or outputs. In general, 1 means input and 0 means output.

What is the difference between PORTx and LATx?

Section titled “What is the difference between PORTx and LATx?”

PORTx is used to read the real state of the pins. LATx stores the output value written to the port latch.

To handle important events without constantly asking if they occurred. An interrupt temporarily changes the program flow.

  • Harvard architecture.
  • Flash memory, RAM, and EEPROM.
  • SFR and GPR registers.
  • WREG, STATUS, BSR.
  • TRIS, PORT, LAT.
  • Timers and interrupts.
  • ADC and PWM.
  • Build flow: .asm to .hex.