Microcontrollers are simple but complete computer systems on a chip (SoC).
All the necessary hardware is present, including the clock, memory, processor and input/output.
They are also known as PICs or programmable integrated circuits.
have the Harvard Architecture (four bus setup).
It has an extra program or instruction bus.
This speeds up the chip because instructions and
data can be fetched at the same time.
The traditional Von Neumann (three bus) chip has to fetch the instruction and the data in separate steps (slower).
are RISC chips (Reduced Instruction Set Chip).
Microcontrollers from microchip.com have only 32 instructions.
The ARM Chip in most phones and tablets is also a RISC chip.
CISC chips have a COMPLETE instruction set.
They are much more complex and expensive than RISC chips with similar perrformance.
Power-On and Reset
When the power is switched on, or after a reset, code execution starts from address 0x00.
PORTA 8 bit Input/Output - (RA5 is input only). PORTB 8 bit Input/Output.
TRISA determines which PORTA pins are inputs or outputs.
TRISB determines which PORTB pins are inputs or outputs.
STATUS contains flag bits like ...
C for CARRY and
Z for ZERO.
INTCON is the interrupt controller register containing ... INT0IE is the external interrupt enable flag. INT0IF is the external interrupt (has happened) flag. TMR0IE is the timer zero interrupt enable flag. TMR0IF is the timer zero interrupt (has happened) flag. GIE is the Global Interrupt Enable flag used to de/activate interrupts.
W or WREG is the working register or accumulator.
Calculations and logic are performed in WREG.
F is a shorthand for "file register".
They are one byte memory locations.
They can be accessed using their numerical address.
Programs are easier to understand if you name these locations.
PCL is the low byte of the program counter or instruction pointer.
This value (via the address bus) determines which instruction is fetched.
SP is the stack pointer. It contains the stack pointer position.
When an interrupt or subroutine has completed, the processor returns to
its previous task at the address held at the stack pointer position.
SP is managed by the chip and programs have no direct access.
RP0 is the memory page selection bit.
Subject NameLevelTopic NameQuestion HeadingFirst NameLast NameClass IDUser ID