


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Chapter I (Intro to Microcontrollers) and Chapter II (PIC16F84), based on Nebojsa Matic's "PIC Microcontrollers for Beginners Too"
Block What it does
Memory Stores data. You select a location (addressing), and the R/W line decides whether you read or write.
CPU The brain of the chip. Its memory locations are called registers.
Bus Wires that connect the blocks. The address bus picks a location; the data bus carries the data (8 bits here).
I/O ports Connect the chip to the outside world through its pins. Can be input, output, or bidirectional.
Serial communication Sends data one bit at a time over fewer lines (NRZ protocol). It is full-duplex : it can send and receive at the same time.
Timer A free-run counter, used to measure time.
Watchdog Another free-run counter. If the program gets stuck and stops clearing it ( CLRWDT ), it resets the chip.
ADC Converts an analog signal into a binary number.
Pins 5 (RA0 to RA4) 8 (RB0 to RB7)
Direction register TRISA TRISB
Special RA4 is input only (it is also the T0CKI pin).
Internal pull-ups (RBPU bit). RB4 to RB interrupt on change. RB0 is the external interrupt pin (INT).
Rule: in the TRIS registers, 1 = input, 0 = output.
Things to Remember
Item Answer
TRIS bit values 1 = input, 0 = output
Reset vector / interrupt vector 0000h / 0004h
Cycles per instruction 1 normally, 2 for jumps and calls
EEPROM write keys 55h, then AAh (to EECON2)
End of an ISR Clear the flag, then RETFIE