Introduction to Microcontrollers (Lake Washington Tech OER)

This lab course provides a comprehensive introduction to microcontroller architecture and embedded systems programming. Students explore the fundamental operations of microprocessors, including the fetch-decode-execute cycle, memory organization, and bus systems, using the 8085 instruction set as a theoretical foundation. Moving into practical applications, learners gain hands-on experience with the Microchip PIC16 architecture using the MPLAB X IDE and Curiosity development boards. Students build and program projects ranging from simple LED blinking routines and switch debouncing to sophisticated multi-sensor systems, such as an analog temperature indicator and a digital home security alarm. Key learning outcomes include mastering assembly language programming, implementing bitwise logic, managing interrupts, and configuring advanced analog-to-digital converter modules for real-world hardware interfacing.

Microcontrollers MCU Embedded Systems Microprocessors MPU Assembly Language MPASM PIC16F18875 8085 Instruction Set MPLAB X IDE Analog-to-Digital Converter ADC I/O Interfacing Interrupt Handling Finite State Machine FSM Bit Manipulation Boolean Algebra Curiosity HPC Development Board Electronics Engineering

Uploaded by demo on 2026-07-19 · ready · Electronics · Original source ↗

Files: Introduction-to-Microcontrollers.pdf · NSF_ATE_provenance.txt

Readiness checks

  • complete 2026-07-19 16:51 22 searches · 0 pages
    view · PDF

Latest report — 2026-07-19 16:51

Readiness: Introduction to Microcontrollers (Lake Washington Tech OER)

Verdict: Ready with caveats · 2026-07-19 · est. parts cost $95–$110

The hardware for this lab is almost entirely sourceable, though the target microcontroller requires sourcing from secondary distributors or shifting to the Industrial-grade variant due to stock shortages at primary distributors. A critical software caveat exists: the lab instructions rely on the deprecated MPASM assembler, which is absent from modern MPLAB X versions (v6.00+). Instructors must use legacy toolchains (v5.35 or earlier) to maintain compatibility with the provided source code. This is a baseline check.

Action required

Part Problem Recommended action
PIC16F18875-E/P Out of stock at DigiKey (20-week lead). Purchase from Mouser or use Industrial-grade substitute PIC16F18875-I/P.
Glass Break Detector Identity unverified; commercial units are proprietary and expensive ($30+). Use suggested Sound Microphone Sensor Module substitute ($5.72).

Parts

Primary Development Hardware

Part Spec/Package Status Stock Price Source
DM164136 Curiosity HPC Board Active 201 $33.99 DigiKey

Core Integrated Circuits

Part Spec/Package Status Stock Price Source
PIC16F18875-E/P 8-bit MCU / PDIP-40 Active 549 $2.46 Mouser
MCP9701-E/TO Temp Sensor / TO-92 Active 3,526 $0.53 DigiKey

Security System Peripherals (Lab #9)

Part Spec/Package Status Stock Price Source
Magnetic Reed Switches Contact Switch Module Active >10 $4.75 DigiKey
PIR Motion Sensors HC-SR501 Module Active >10 $3.95 PiShop USA
Glass Break Detectors Acoustic Sensor Plausible
Numerical Keypad 3x4 Matrix Membrane Active >10 $2.95 PiShop USA
Character LCD Display 16x2 I2C Module Active >10 $11.90 DigiKey
Piezo Buzzer / Siren 5V Active Active >10 $0.99 PiShop USA
External Siren Relay 5V Relay Module Active >10 $6.37 DigiKey

General Prototyping Components

Part Spec/Package Status Stock Price Source
Indicator LEDs 5mm Assortment Active >100 $8.49 Walmart
Resistors (Axial) 1/4W Kit Active >10 $9.95 Mouser
Tactile Pushbuttons 6mm TH (20-pack) Active >10 $2.50 DigiKey
Breadboard and Jumpers 830-pt Kit Active >10 $9.99 DigiKey

Substitutes

For part Substitute Differences Verified Judgment
PIC16F18875-E/P PIC16F18875-I/P Lower temp range (-40°C to 85°C vs -40°C to 125°C). Same PDIP-40 footprint and voltage. package + lead spacing Acceptable drop-in for lab use.
Glass Break Detector Sound Microphone Module Detects sound volume/envelope instead of specific glass frequency; provides logic level output. not stated Plausible; requires code validation for sound trigger levels.

Instructors must verify any substitute against its datasheet before ordering.

Other dependencies

  • MPLAB X IDE: v5.35 or earlier is required to use the native MPASM assembler for provided .asm files.
  • Assembler Syntax: Standard .asm files (MPASM) are incompatible with the modern pic-as assembler without significant rewriting.
  • OER Hosting: Verified; the OpenWA Pressbooks URL is active as of 2026-07-19.
  • Firmware/Libraries: Not checked.

Watch list

  • PIC16F18875-E/P: Stock is currently zero at DigiKey with long lead times; Mouser stock is healthy but should be monitored.
  • MPASM Status: Future operating system updates may eventually break the functionality of legacy MPLAB X v5.35, creating a hard stop for the lab's current code base.
Snapshot What the lab depended on when it was uploaded — the baseline the readiness checks research against.

This lab course builds a series of embedded systems projects, progressing from simple LED blinking to a multi-sensor home security system and a digital temperature indicator. The hardware ecosystem is centered on the Microchip PIC16 architecture, specifically utilizing the Curiosity High Pin Count (HPC) development platform and breadboard-mounted peripheral components.

Bill of Materials

Primary Development Hardware

  • Microchip Curiosity High Pin Count (HPC) Development Board
    • Identity: Microchip Technology DM164136
    • Quantity: 1
    • Footprint/Package: Complete PCB assembly with integrated programmer/debugger (PKOB).
    • Substitution Latitude: Critical dependency; the lab instructions for toolchain setup and port mapping are specific to this board's layout and the onboard programmer.
    • Sourcing Plan: distributor lookup: DM164136

Core Integrated Circuits

  • 8-bit Microcontroller (Main Target)
    • Identity: Microchip PIC16F18875-E/P
    • Quantity: 1
    • Footprint/Package: PDIP-40 (Plastic Dual In-line Package).
    • Electrical Constraints: 14-bit instruction word, enhanced mid-range core, 1.8 V to 5.5 V operating range.
    • Substitution Latitude: Must be exactly this part or the PIC16(L)F18875 variant. The labs utilize specific peripheral features (ADC2 module, specific SFR addresses).
    • Sourcing Plan: distributor lookup: PIC16F18875-E/P
  • Linear Temperature Sensor
    • Identity: Microchip MCP9701-E/TO
    • Quantity: 1
    • Footprint/Package: TO-92 (through-hole).
    • Electrical Constraints: Linear active thermistor; scale factor 19.5 mV/°C; offset voltage 500 mV at 0°C.
    • Substitution Latitude: The code in Lab 10 depends on the specific 19.5 mV/°C slope. A standard MCP9700 (10 mV/°C) will require code modification.
    • Sourcing Plan: distributor lookup: MCP9701-E/TO

Security System Peripherals (Lab #9)

  • Magnetic Reed Switches
    • Identity: Generic magnetic door/window contact sensors.
    • Quantity: Minimum 5 (per "System Scope" specification).
    • Footprint/Package: Surface mount or screw-terminal housing with separate magnet.
    • Electrical Constraints: Dry contact (normally open or normally closed).
    • Sourcing Plan: retail shopping search: magnetic reed switch sensor
  • PIR Motion Sensors
    • Identity: Standard PIR motion detector module (e.g., HC-SR501).
    • Quantity: 1
    • Footprint/Package: PCB module with 3-pin header (VCC, OUT, GND).
    • Electrical Constraints: 5 V input, 3.3 V logic output.
    • Sourcing Plan: retail shopping search: PIR motion sensor module
  • Glass Break Detectors
    • Identity: Generic acoustic glass break sensor module.
    • Quantity: 1
    • Footprint/Package: PCB module or enclosed sensor.
    • Electrical Constraints: Typically logic level output (High/Low).
    • Sourcing Plan: retail shopping search: glass break sensor module
  • Numerical Keypad
    • Identity: 3-digit or 3x4 matrix keypad.
    • Quantity: 1
    • Footprint/Package: Membrane or mechanical button matrix with ribbon cable/header.
    • Substitution Latitude: Any matrix keypad works; lab requires a 3-digit code entry sequence.
    • Sourcing Plan: retail shopping search: 3x4 matrix keypad
  • Character LCD Display
    • Identity: 16x2 Character LCD (Standard HD44780 compatible).
    • Quantity: 1
    • Footprint/Package: 16-pin through-hole header for parallel or 4-pin for I2C (via backpack).
    • Substitution Latitude: I2C version preferred to save pins on the HPC board.
    • Sourcing Plan: retail shopping search: 16x2 character LCD module
  • Piezo Buzzer / Siren
    • Identity: Active 5 V Piezo Buzzer.
    • Quantity: 1
    • Footprint/Package: Through-hole or leaded module.
    • Electrical Constraints: Must trigger at 5 V, ≤ 30 mA if driven directly by MCU.
    • Sourcing Plan: retail shopping search: 5V active piezo buzzer
  • External Siren Relay
    • Identity: 5 V DC Coil SPDT Relay.
    • Quantity: 1
    • Footprint/Package: PCB mount or 5 V relay module (preferred for breadboarding).
    • Electrical Constraints: Coil voltage 5 V; contacts rated for external siren current (typically ≥ 1 A).
    • Sourcing Plan: retail shopping search: 5V relay module

General Prototyping Components

  • Indicator LEDs
    • Identity: Standard 5mm through-hole LEDs.
    • Quantity: 4 Red, 4 Blue, 4 Green (used across multiple labs for status and temperature thresholds).
    • Sourcing Plan: retail shopping search: 5mm LED assortment
  • Resistors (Axial)
    • Identity: 1/4W 1% or 5% tolerance axial resistors.
    • Values: 220 Ω, 330 Ω (LED current limiting), 1 kΩ, 10 kΩ (pull-ups).
    • Sourcing Plan: retail shopping search: 1/4W resistor kit
  • Tactile Pushbuttons
    • Identity: 6mm Momentary Tactile Switches.
    • Quantity: 4
    • Footprint/Package: Through-hole for breadboard.
    • Sourcing Plan: retail shopping search: 6mm tactile pushbuttons
  • Breadboard and Jumpers
    • Identity: Full-size 830-point solderless breadboard and M-M jumper wire kit.
    • Quantity: 1 set.
    • Sourcing Plan: retail shopping search: 830 point breadboard kit

Temporal Dependencies

Software and Toolchain

  • MPLAB X IDE: The labs are written for versions available in 2024. Future versions of MPLAB X may deprecate certain peripheral libraries.
  • Assembler (MPASM vs. PIC-AS): The course heavily utilizes the legacy MPASM assembler (indicated by .asm extension and specific directive syntax like ORG, equ, BANKSEL). Note that modern Microchip XC8 compilers have replaced MPASM with pic-as, which has a significantly different syntax. Maintaining the ability to build this lab requires an archived version of MPLAB X (v5.35 or earlier) that includes the native MPASM assembler.

Firmware and Configuration

  • Configuration Bits: The project utilizes specific configuration settings (e.g., _CONFIG1, _FEXTOSC_OFF, _MCLRE_ON) defined in Lab #3. These are specific to the PIC16F18875 register map.

Documentation Links

  • Data Sheets: Instructions point to www.microchip.com for PIC16F18875 data sheets.
  • OER Hosting: The lab materials are hosted on OpenWA Pressbooks (openwa.pressbooks.pub/nehakardam10). These URLs are critical for accessing the interactive elements and lecture videos mentioned throughout the text.