Prof. Jorge A. Ramón Introducción a Microcontroladores.

Slides:



Advertisements
Similar presentations
Electronics Design Lab TUTORIAL PIC Microcontrollers Francesco Tenore 2/10/2006.
Advertisements

م/محمد علي عطية حسين. Pin Diagram DescriptionPin Name Oscillator crystal input/external clock source input. OSC1/CLKIN Oscillator crystal output.OSC2/CLKOUT.
Embedded System Spring, 2011 Lecture 9: I/O Programming Eng. Wazen M. Shbair.
By Muhammad Ali Mazidi, Rolin McKinlay, Danny Causey
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
SENIOR PROJECT PRESENTATION REMOTE CONTROL CAR MURAT DİNÇER.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2013 Lecture 26: PIC microcontroller intro.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 30: PIC data memory.
Microcontroller Architecture— PIC18F Family
Railway Foundation Electronic, Electrical and Processor Engineering.
Rodolfo Rodriguez Kevin Zhang MJ Gellada
Microcontroller Architecture PIC18F Family
Chapter 4 Starting to Program – an Introduction to Assembler The aims of this chapter are to introduce: the essentials of Assembler programming; the Microchip.
9/20/6Lecture 21 -PIC Architecture1 PIC Architecture Instruction Set.
The domestic refrigerator-An example A car door mechanism.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
Microcontroller Programming How to make something almost do something else Raffi Krikorian MAS November 2003.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
MICROCONTROLLERS. What is a microcontroller? A microcontroller is a nifty little gadget that houses a microprocessor, ROM (Read Only Memory), RAM (Random.
Building Assembler Programs Chapter Five Dr. Gheith Abandah1.
Parallel Ports, Power Supply and the Clock Oscillator Material to be covered  Parallel I/O ports  Interfacing external switches and LEDs  Clock Oscillator.
I/O PORTS (Simplest Peripherals) PORT A: 6 bits wide (7th and 8th bit always read as 0) PORT B: 8 bits wide PORT C: 8 bits wide PORT D: 8 bits wide.
Microprocessor and Interfacing PIC Code Execution
PIC18F Programming Model and Instruction Set
Lecture – 4 PIC18 Family Instruction Set 1. Outline Literal instructions. Bit-oriented instructions. Byte-oriented instructions. Program control instructions.
Embedded System Spring, 2011 Lecture 5: The PIC Microcontrollers Eng. Wazen M. Shbair.
 Mini-Computer  Microprocessor  The Brains  Arithmetic Logic Unit (ALU)  Control Unit  Program/ Data Storage  Peripherals (Input/Output) Low-Cost.
EEE237 Introduction to Microprocessors Week x. SFRs.
Architecture and instruction set. Microcontroller Core Features:  Operating speed: DC - 20 MHz clock input DC ns instruction cycle Up to 8K x.
PIC Code Execution How does the CPU executes this simple program? void main() { int i; i = 1; i++; }
Department of Electronic & Electrical Engineering Template program. Input / Output (IO) ● Template program. ● Introduction to IO ● Setting up for IO ●
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
Department of Electronic & Electrical Engineering Lecture 2 ● Introduction to IO ● Using a subroutine ● Driving a 7seg display.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Working with Time: Interrupts, Counters and Timers
Microcontrollers session. What is Microcontroller? Microcontroller is composed of microprocessor,ram, flash memory,EEPROM and some modules like timers,
PIC12F629/675. “Wide variety” 8-84 pin RISC core, 12/14/16bit program word USART/AUSART, I 2 C, ADC, ICSP, ICD OTP/UV EPROM/FLASH/ROM Families: PIC12,
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
Microcontrollers A Practical Approach Ernesto Arroyo
Department of Electronic & Electrical Engineering Lecture 3. ● Template program. ● Introduction to IO ● PORTA PORTB TRISA TRISB ● Using a subroutine ●
Programming PIC 16F84A in Assembly. PIC16F84 pin-out and required external components.
5-2-1 PIC microcontroller. Learning objectives To aid revision, areas that are examinable are identified by a vertical line in the left margin. Where.
I/O PORTS. General purpose I/O pins can be considered the simplest of peripherals. They allow the PICmicro™ to monitor and control other devices. To add.
Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A.
TIMERS.
Microprocessor Systems Design I
Chapter 9 PIC18 Timer Programming in Assembly
Prof. Ahmad Abu-El-Haija
Microprocessor Systems Design I
Microprocessor Systems Design I
Micro-processor vs. Micro-controller
Microprocessor Systems Design I
C. K. PITHAWALA COLLEGE OF ENGINEERING AND TECHNOLOGY
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
PIC 16F877.
Microprocessor Systems Design I
PIC18 CH. 4.
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
Projekt Anglicky v odborných předmětech, CZ.1.07/1.3.09/
EECE.3170 Microprocessor Systems Design I
Chapter 4 Instruction Set.
INSTRUCTION SET.
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
Presentation transcript:

Prof. Jorge A. Ramón Introducción a Microcontroladores

MicroprocessorVS Microcontroller 1.CISC Architecture 2.Many pins 3.Many instructions 4.External devices needed for operation (memory, I/O, etc) 1.RISC Architecture 2.Fewer pins 3.Fewer instructions 4.No external devices needed for operation (memory, I/O, etc are already built into IC)

Bloque #1 Unidad de Memoria

Bloque #2 Unidad Central de Procesamiento

Bloque #3 Unidad entrada y salida

Bloque #4 Unidad de comunicación en serie

Bloque #5 Unidad de Timer

Bloque #6 Unidad ADC

Conexión entre todas las unidades.

Microchip PIC16F84 Microcontroller Outline 8 bits 5 bits 35 instructions 64 bytes 68 bytes 1K x 14

Clock / Instruction Cycle Q1  Instruction Fetch Q2  Instruction Decode Q3  Execute Q4  Write Back Pipelining: each instruction is executed in one cycle. Two cycles for JUMP and CALL instructions.

PORTA Configuration

PORTB Configuration

PIC16F84 Register File

PIC16F84 Status Register

Instruction Set Summary Byte Oriented Bit Oriented Literal Control Operations Only 35 instructions!! Impressive!!!

Byte Oriented CLRF DECF INCF ADDWF

Bit Oriented BCF BSF

Literal MOVLW ADDLW ANDLW IORLW XORLW

Control Operations CALL RETURN GOTO SLEEP

Programming Example Setting PORTB as Output 1. Set RP0 in Status Register to switch to BANK1. This allows access to TRISB. 2. Write 0x00 into TRISB. 3. Clear RP0 in Status Register to switch to BANK0. This allows access to PORTB.

Programming Example Setting PORTB as Output 1. BSF STATUS, RP0 2. MOVLW 0x00 3. MOVWF TRISB 4. BCF STATUS, RP0 5. MOVLW 0xFF 6. MOVWF PORTB

Assembly Programming Steps to write some code 1. Tell the assembler which MPU you are using. 2. Include the header file. 3. Set PC to 0 4. Write some code 5. Keep an endless loop. 6. Use the end directive.

PIC16F84 Schematic Diagram