Introduction
- Introduction to microcontroller PIC18F4550
- Programming with CCS C Compiler
- Proteus Schematic
- Activity 1. Turn ON/OFF four LEDs Seven
- Activity 2. Turn ON/OFF LEDs every 500 ms
- Activity 3. Rotate left the contents of PORTB
- Activity 4. Create a moving dot with LEDs
(60 minutes)
Introduction to microcontroller PIC18F4550
What is a Microprocessor
A Central Processing Unit in one chip
What is a Microcontroller
Microcontroller is a chip which contains:
- CPU (Central Processing Unit)
- Input and Output modules
- Program and data memory
- Other modules like A/D converters etc

Program Memory: 32 K (215)
Address range: 000000 to 007FFFh
16 bit registers
Data Memory: 2 K
Address range: 000 to 7FFh
8 bit registers

The data memory of the microcontroller PIC18F4550 is 2KB
Attention 210 =1024 =1K (when we refer to memories 1K=1024)
220 =1Κ Χ1Κ =1 Μ (=1 048 576 memory positions)
230 =1Κ Χ1Κ Χ1Κ = 1G (=1 073 741 824 memory positions)
Attention! Also the memory positions at addresses from FF6h to FFFh are used. This memory positions are called Special Function Registers (SFR). The words that are stored to the special Function Registers are used for a special function to the microcontroller.
The program memory address bus is 16 bit. 16 bit are transfered simultaneously from the program memory to the CPU. The instructions in machine code are, with a few exceptions, 16 bit words
The values placed at the PORTB Direction Register define which pins will be inputs and which will be outputs.
0 => The correspondent pin of PORTB will be output.
