PIC Architecture: CPU, Memory & the Harvard Design
Every PIC is built around a small number of parts working together: a processor core, two separate memories, and a set of buses connecting them. Here's how the pieces fit.
Inside a PIC, the CPU (central processing unit) is the part that actually executes instructions — add these two numbers, turn this pin on, jump back to the start of the loop. It works one instruction at a time, extremely fast, typically millions of times per second.
Most PIC chips use what's called a Harvard architecture: program memory (where your compiled code lives) and data memory (where your variables live) are physically separate, each with its own connection to the CPU. This is different from the "von Neumann" design used in most desktop computers, where code and data share one memory. Keeping them separate lets a PIC fetch the next instruction and read/write a variable in the same clock cycle, which is a big part of why small microcontrollers can be surprisingly fast for their price.
Beyond the CPU and the two memories, a PIC includes a set of peripherals — small dedicated circuits that handle specific jobs so the CPU doesn't have to do everything in software. A timer peripheral can count clock pulses in the background; a UART peripheral can send and receive serial data; an ADC peripheral can measure an analog voltage. You'll meet each of these in later lessons.
Finally, every PIC has a small set of special function registers (SFRs) — named memory locations that control and report on the hardware. Writing a 1 to a bit in a register might turn on an output pin; reading a register might tell you whether a timer has finished counting. Learning to program a PIC is largely learning which registers do what.