Taller de Interrupciones
|
|
|
- María Elena Ortega Suárez
- hace 7 años
- Vistas:
Transcripción
1 Taller de Interrupciones Organización del Computador I Carlos A. Di Pietro Departamento de Computación - FCEyN UBA 2 cuatrimestre 205
2 El PIC 6F84A El PIC6F84A es un microcontrolador de la empresa Microchip. Cuenta con las siguientes características: Característica Descripción Arquitectura Harvard Frecuencia de operación 20 MHz Memoria FLASH de programa 024 words Memoria de datos 68 Bytes Memoria de datos EEPROM 64 Bytes Interrupciones 4 Puertos de E/S 2 (A,B) Conjunto de Instrucciones 35
3 Introduccio n MPLabX Ejemplo Un poco sobre arquitecturas... Harvard von Neumann Misma memoria para las instrucciones y datos. Ma s lenta porque la memoria hace de cuello de botella. Requiere linea de control para multiplexar el bus (bus de control). Generalmente CISC. Memorias individuales para instrucciones y datos. Ma s ra pidas por acceso en paralelo a ambas memorias. El taman o de las instrucciones no esta relacionado con el de los datos. Generalmente RISC.
4 Encapsulado SSOP RA2 RA3 RA4/T0CKI MCLR VSS VSS RB0/INT RB RB2 RB PIC6F84A RA RA0 OSC/CLKIN OSC2/CLKOUT VDD VDD RB7 RB6 RB5 RB4
5 Introducción ence Manual should be considered a complementary document to this data sheet, and is highly recommended device MPLabX functions. These functions include: Ejemplo reading for a better understanding of the External interrupt device architecture and operation of the peripheral Change on PORTB interrupt modules. Timer0 clock input El PIC The PIC6F84A belongs internamente to the mid-range family of the PICmicro microcontroller devices. A block diagram of the device is shown in Figure -. Table - details the pinout of the device with descriptions and details for each pin. FIGURE -: PIC6F84A BLOCK DIAGRAM FLASH Program Memory K x 4 3 Program Counter 8 Level Stack (3-bit) Data Bus RAM File Registers 68 x 8 8 EEPROM Data Memory EEDATA EEPROM Data Memory 64 x 8 Program Bus 4 Instruction Register 7 Addr Mux RAM Addr EEADR 5 Direct Addr 7 Indirect Addr TMR0 FSR reg 8 STATUS reg RA4/T0CKI Power-up Timer MUX 8 I/O Ports Instruction Decode & Control Oscillator Start-up Timer Power-on Reset ALU RA3:RA0 Timing Generation Watchdog Timer W reg RB7:RB RB0/INT OSC2/CLKOUT OSC/CLKIN MCLR VDD, VSS
6 Organización de la memoria En este PIC la memoria esta divida en: Memoria FLASH de programa. Memoria RAM de datos. Memoria EEPROM de datos.
7 Memoria de Programa RY ORGANIZATION emory blocks in the PIC6F84A. gram memory and the data memory. s own bus, so that access to each uring the same oscillator cycle. can further be broken down into the RAM and the Special Function. The operation of the SFRs that are described here. The SFRs used pheral modules are described in the each individual peripheral module. ry area also contains the data. This memory is not directly mapped ory, but is indirectly mapped. That is, s pointer specifies the address of the emory to read/write. The 64 bytes of memory have the address range ils on the EEPROM memory can be.0. tion on device memory may be found Mid-Range Reference Manual, FIGURE 2-: PC<2:0> CALL, RETURN 3 RETFIE, RETLW Stack Level Stack Level 8 User Memory Space PIC6F84A PROGRAM MEMORY MAP AND STACK - PIC6F84A RESET Vector Peripheral Interrupt Vector h 04h m Memory Organization s a 3-bit program counter capable K x 4 program memory space. For he first K x 4 (h-03ffh) are ented (Figure 2-). Accessing a locahysically implemented address will nd. For example, for locations 20h,, 020h, 420h, 820h, and C20h, 3FFh FFFh
8 Memoria de Datos PIC6F84A 2.2 Data Memory Organization The data memory is partitioned into two areas. The first is the Special Function Registers (SFR) area, while the second is the General Purpose Registers (GPR) area. The SFRs control the operation of the device. Portions of data memory are banked. This is for both the SFR area and the GPR area. The GPR area is banked to allow greater than 6 bytes of general purpose RAM. The banked areas of the SFR are for the registers that control the peripheral functions. Banking requires the use of control bits for bank selection. These control bits are located in the STATUS Register. Figure 2-2 shows the data memory map organization. Instructions MOVWF and MOVF can move values from the W register to any location in the register file ( F ), and vice-versa. The entire data memory can be accessed either directly using the absolute address of each register file or indirectly through the File Select Register (FSR) (Section 2.5). Indirect addressing uses the present value of the RP0 bit for access into the banked areas of data memory. Data memory is partitioned into two banks which contain the general purpose registers and the special function registers. Bank 0 is selected by clearing the RP0 bit (STATUS<5>). Setting the RP0 bit selects Bank. Each Bank extends up to 7Fh (28 bytes). The first twelve locations of each Bank are reserved for the Special Function Registers. The remainder are General Purpose Registers, implemented as static RAM GENERAL PURPOSE REGISTER FILE Each General Purpose Register (GPR) is 8-bits wide and is accessed either directly or indirectly through the FSR (Section 2.5). The GPR addresses in Bank are mapped to addresses in Bank 0. As an example, addressing location 0Ch or 8Ch will access the same GPR. FIGURE 2-2: REGISTER FILE MAP - PIC6F84A File Address File Address h Indirect addr. () Indirect addr. () 80h 0h TMR0 OPTION_REG 8h 02h PCL PCL 82h 03h STATUS STATUS 83h 04h FSR FSR 84h 05h PORTA TRISA 85h 06h PORTB TRISB 86h 07h 87h 08h EEDATA EECON 88h 09h EEADR EECON2 () 89h 0Ah PCLATH PCLATH 8Ah 0Bh INTCON INTCON 8Bh 0Ch 8Ch 4Fh 50h 68 General Purpose Registers (SRAM) Mapped (accesses) in Bank 0 CFh D0h 7Fh FFh Bank 0 Bank Unimplemented data memory location, read as 0. Note : Not a physical register.
9 Selección de Bancos Para seleccionar el banco con el cual queremos trabajar tendremos que utilizar la directiva al ensamblador banksel junto con un registro perteneciente al banco al cual queremos acceder. Ejemplo: banksel NombreDelRegistro
10 Registro: W El registro de trabajo W (Working Register) es un registro de 8 bits que participa en la mayoría de las instrucciones. Es uno de los registro más importantes del microcontrolador. Puede ser accedido tanto para lectura como para escritura.
11 Furthermore, the TO and PD bits are not writable. instructions for examples. Introducción MPLabX Ejemplo Therefore, the result of an instruction with the STATUS register as destination may be different than intended. Registro: STATUS For example, CLRF STATUS will clear the upper three bits and set the Z bit. This leaves the STATUS register as 0u uuu (where u = unchanged). Only the BCF, BSF, SWAPF and MOVWF instructions should be used to alter the STATUS register (Table 7-2), because these instructions do not affect any status bit. REGISTER 2-: STATUS REGISTER (ADDRESS 03h, 83h) 3: When the STATUS register is the destination for an instruction that affects the Z, DC or C bits, then the write to these three bits is disabled. The specified bit(s) will be updated according to device logic R/W-0 R/W-0 R/W-0 R- R- R/W-x R/W-x R/W-x IRP RP RP0 TO PD Z DC C bit 7 bit 0 bit 7-6 Unimplemented: Maintain as 0 bit 5 RP0: Register Bank Select bits (used for direct addressing) 0 = Bank (80h - FFh) = Bank 0 (h - 7Fh) bit 4 TO: Time-out bit = After power-up, CLRWDT instruction, or SLEEP instruction 0 = A WDT time-out occurred bit 3 PD: Power-down bit = After power-up or by the CLRWDT instruction 0 = By execution of the SLEEP instruction bit 2 Z: Zero bit = The result of an arithmetic or logic operation is zero 0 = The result of an arithmetic or logic operation is not zero bit DC: Digit carry/borrow bit (ADDWF, ADDLW,SUBLW,SUBWF instructions) (for borrow, the polarity is reversed) = A carry-out from the 4th low order bit of the result occurred 0 = No carry-out from the 4th low order bit of the result bit 0 C: Carry/borrow bit (ADDWF, ADDLW,SUBLW,SUBWF instructions) (for borrow, the polarity is reversed) = A carry-out from the Most Significant bit of the result occurred 0 = No carry-out from the Most Significant bit of the result occurred Note: A subtraction is executed by adding the two s complement of the second operand. For rotate (RRF, RLF) instructions, this bit is loaded with either the high or low order bit of the source register. Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 - n = Value at POR = Bit is set 0 = Bit is cleared x = Bit is unknown DS357B-page 8 2 Microchip Technology Inc.
12 Puertos de Entrada/Salida Los PICs tienen la característica de que sus pines pueden ser todos configurados de acuerdo a la necesidad de la aplicación, es decir, que los pines de un mismo puerto pueden ser usados como entradas o como salidas. Los PIC 6F84A cuentan con dos puertos de E/S. Puerto A: Puerto bidireccional de 5 bits. Puerto B: Puerto bidireccional de 8 bits.
13 Registros TRIS Se utilizan para configurar los pines del PORTA y PORTB como Entradas o Salidas. Cada bit se corresponde con un pin del PORTA/PORTB Donde se escribe un el pin correspondiente sera entrada. Donde se escribe un 0 el pin correspondiente sera salida.
14 Set de instrucciones PIC6F84A TABLE 7-2: PIC6CXXX INSTRUCTION SET Mnemonic, Operands Description 4-Bit Opcode Cycles MSb LSb Status Affected Notes BYTE-ORIENTED FILE REGISTER OPERATIONS ADDWF Add W and f 0 dfff ffff C,DC,Z,2 ANDWF AND W with f dfff ffff Z,2 CLRF f Clear f 0 lfff ffff Z 2 CLRW - Clear W 0 0xxx xxxx Z COMF Complement f dfff ffff Z,2 DECF Decrement f dfff ffff Z,2 DECFSZ Decrement f, Skip if 0 (2) 0 dfff ffff,2,3 INCF Increment f dfff ffff Z,2 INCFSZ Increment f, Skip if 0 (2) dfff ffff,2,3 IORWF Inclusive OR W with f 0 dfff ffff Z,2 MOVF Move f 0 dfff ffff Z,2 MOVWF f Move W to f lfff ffff NOP - No Operation 0xx0 RLF Rotate Left f through Carry 0 dfff ffff C,2 RRF Rotate Right f through Carry dfff ffff C,2 SUBWF Subtract W from f 0 dfff ffff C,DC,Z,2 SWAPF Swap nibbles in f 0 dfff ffff,2 XORWF Exclusive OR W with f dfff ffff Z,2 BIT-ORIENTED FILE REGISTER OPERATIONS BCF f, b Bit Clear f 0 bb bfff ffff,2 BSF f, b Bit Set f 0 0bb bfff ffff,2 BTFSC f, b Bit Test f, Skip if Clear (2) 0 0bb bfff ffff 3 BTFSS f, b Bit Test f, Skip if Set (2) 0 bb bfff ffff 3 LITERAL AND CONTROL OPERATIONS ADDLW k Add literal and W x kkkk kkkk C,DC,Z ANDLW k AND literal with W kkkk kkkk Z CALL k Call subroutine 2 0 0kkk kkkk kkkk CLRWDT - Clear Watchdog Timer 0 TO,PD GOTO k Go to address 2 0 kkk kkkk kkkk IORLW k Inclusive OR literal with W 0 kkkk kkkk Z MOVLW k Move literal to W xx kkkk kkkk RETFIE - Return from interrupt 2 RETLW k Return with literal in W 2 0xx kkkk kkkk RETURN - Return from Subroutine 2 0 SLEEP - Go into standby mode TO,PD SUBLW k Subtract W from literal 0x kkkk kkkk C,DC,Z XORLW k Exclusive OR literal with W kkkk kkkk Z Note : When an I/O register is modified as a function of itself ( e.g., MOVF PORTB, ), the value used will be that value present on the pins themselves. For example, if the data latch is for a pin configured as input and is driven low by an external device, the data will be written back with a 0.
15 Configuración Inicial Macro de Inicialización config CP OFF & XT OSC & WDT OFF & PWRTE OFF OSC: Controla el modo de oscilación que usará el PIC para funcionar. WDT: (Watchdog Timer) Es una capacidad del microcontrolador de autorresetearse PWRTE: Permite generar un retardo en la inicialización del PIC. CP: Protección de código. Permite que el mismo no pueda ser leído por otra persona.
16 Declaración de constantes Podemos definir constantes usando la directiva al ensambaldor equ. Ejemplos: LED OFF equ 0xAB LED ON equ 0xCD Esta directiva realiza el remplazo sintáctico de la palabra a la izquierda del operador equ por la palabra ubicada del lado derecho del mismo.
17 Declaración de variables Del mismo modo, utilizando la directiva al ensambaldor equ, podemos declarar nombres de variables a las cuales accederemos utilizando un direccionamiento directo. Ejemplo: LED STATUS equ 0x20 ; declaracion de la variable movwf LED STATUS ; uso de la variable IMPORTANTE: Es necesario chequear cuales son las posiciones de memoria que tenemos disponibles para almacenar nuestras variables. Banco 0: 0x0C hasta 0x4F Banco : 0x8C hasta 0xCF
18 Interrupciones El PIC puede recibir una (y sólo una) interrupción a la vez. Al recibirla: Apila el PC (program counter) Deshabilita las interrupciones Pasa a ejecutar el código que se encuentre en el vector de interrupciones (que tiene una sola posición) ubicado en la posición 0x4
19 PIC6F84A Registro: INTCON INTCON REGISTER The INTCON register is a readable and writable register that contains the various enable bits for all interrupt sources. Note: Interrupt flag bits are set when an interrupt condition occurs, regardless of the state of its corresponding enable bit or the global enable bit, GIE (INTCON<7>). REGISTER 2-3: INTCON REGISTER (ADDRESS 0Bh, 8Bh) R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-x GIE EEIE T0IE INTE RBIE T0IF INTF RBIF bit 7 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit bit 0 GIE: Global Interrupt Enable bit = Enables all unmasked interrupts 0 = Disables all interrupts EEIE: EE Write Complete Interrupt Enable bit = Enables the EE Write Complete interrupts 0 = Disables the EE Write Complete interrupt T0IE: TMR0 Overflow Interrupt Enable bit = Enables the TMR0 interrupt 0 = Disables the TMR0 interrupt INTE: RB0/INT External Interrupt Enable bit = Enables the RB0/INT external interrupt 0 = Disables the RB0/INT external interrupt RBIE: RB Port Change Interrupt Enable bit = Enables the RB port change interrupt 0 = Disables the RB port change interrupt T0IF: TMR0 Overflow Interrupt Flag bit = TMR0 register has overflowed (must be cleared in software) 0 = TMR0 register did not overflow INTF: RB0/INT External Interrupt Flag bit = The RB0/INT external interrupt occurred (must be cleared in software) 0 = The RB0/INT external interrupt did not occur RBIF: RB Port Change Interrupt Flag bit = At least one of the RB7:RB4 pins changed state (must be cleared in software) 0 = None of the RB7:RB4 pins have changed state Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 - n = Value at POR = Bit is set 0 = Bit is cleared x = Bit is unknown
20 2.3.2 OPTION REGISTER Registro: The OPTION register is a readable and writable register which contains various control bits to configure the TMR0/WDT prescaler, the external INT interrupt, TMR0, and the weak pull-ups on PORTB. PIC6F84A Note: When the prescaler is assigned to the WDT (PSA = ), TMR0 has a : prescaler assignment. REGISTER 2-2: OPTION REGISTER (ADDRESS 8h) R/W- R/W- R/W- R/W- R/W- R/W- R/W- R/W- RBPU INTEDG T0CS T0SE PSA PS2 PS PS0 bit 7 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2-0 RBPU: PORTB Pull-up Enable bit = PORTB pull-ups are disabled 0 = PORTB pull-ups are enabled by individual port latch values INTEDG: Interrupt Edge Select bit = Interrupt on rising edge of RB0/INT pin 0 = Interrupt on falling edge of RB0/INT pin T0CS: TMR0 Clock Source Select bit = Transition on RA4/T0CKI pin 0 = Internal instruction cycle clock (CLKOUT) T0SE: TMR0 Source Edge Select bit = Increment on high-to-low transition on RA4/T0CKI pin 0 = Increment on low-to-high transition on RA4/T0CKI pin PSA: Prescaler Assignment bit = Prescaler is assigned to the WDT 0 = Prescaler is assigned to the Timer0 module PS2:PS0: Prescaler Rate Select bits Bit Value TMR0 Rate WDT Rate : 2 : 4 : 8 : 6 : 32 : 64 : 28 : 256 : : 2 : 4 : 8 : 6 : 32 : 64 : 28 Legend: R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 - n = Value at POR = Bit is set 0 = Bit is cleared x = Bit is unknown
21 PIC6F84A Introducción MPLabX Ejemplo Salvando los registros 6.9 Context Saving During Interrupts During an interrupt, only the return PC value is saved on the stack. Typically, users wish to save key register values during an interrupt (e.g., W register and STATUS register). This is implemented in software. The code in Example 6- stores and restores the STATUS and W register s values. The user defined registers, W_TEMP and STATUS_TEMP are the temporary storage locations for the W and STATUS registers values. Example 6- does the following: a) Stores the W register. b) Stores the STATUS register in STATUS_TEMP. c) Executes the Interrupt Service Routine code. d) Restores the STATUS (and bank select bit) register. e) Restores the W register. EXAMPLE 6-: SAVING STATUS AND W REGISTERS IN RAM PUSH MOVWF W_TEMP ; Copy W to TEMP register, SWAPF STATUS, W ; Swap status to be saved into W MOVWF STATUS_TEMP ; Save status to STATUS_TEMP register ISR : : : ; Interrupt Service Routine : ; should configure Bank as required : ; POP SWAPF STATUS_TEMP,W ; Swap nibbles in STATUS_TEMP register ; and place result into W MOVWF STATUS ; Move W into STATUS register ; (sets bank to original state) SWAPF W_TEMP, F ; Swap nibbles in W_TEMP and place result in W_TEMP SWAPF W_TEMP, W ; Swap nibbles in W_TEMP and place result into W 6.0 Watchdog Timer (WDT) The Watchdog Timer is a free running On-Chip RC Oscillator which does not require any external components. This RC oscillator is separate from the RC oscillator of the OSC/CLKIN pin. That means that the WDT will run even if the clock on the OSC/CLKIN and OSC2/CLKOUT pins of the device has been 6.0. WDT PERIOD The WDT has a nominal time-out period of 8 ms, (with no prescaler). The time-out periods vary with temperature, VDD and process variations from part to part (see DC specs). If longer time-out periods are desired, a prescaler with a division ratio of up to :28 can be assigned to the WDT under software control by
22 MPLabX Descarga:
23 MPLabX - Primeros pasos Para crear un nuevo proyecto en la IDE debemos realizar los siguientes pasos: Create New Project Standalone Project Device: PIC6F84A Select Tool Next (Grabadora de PIC) Compiler: mpasm (Ensamblador) Asignar nombre y directorio Finish... Source Files Add Existing Item Probemoslo con ejemplo.asm...
24 MPLabX Al ensamblar, genera un archivo.hex en [PATHProyecto]/dist/default/production.
25 Ejemplo Encender ocho leds conectados a RB0:RB7.
26 Ejemplo 2 Controlar mediante un pulsador conectado a RA0, el estado de ocho leds conectados a RB0:RB7.
Fundamentos Taller de interrupciones
Fundamentos Taller de interrupciones Francisco García Eijó Segundo Cuatrimestre de 20 - Organización del Computador I El PIC 6F84 El PIC6F84 es un microcontrolador de la empresa Microchip. Cuenta con las
CONCEPTOS BÁSICOS. + Intensidad
CONCEPTOS BÁSICOS Si en una frase tuviera que definir que es un microcontrolador, creo que lo más acertado sería definirlo como un controlador de entrada/ salida con capacidad de decisión. Para poder explicar
Set de instrucciones Microcontrolador PIC.
Microcontroladores Pic 16F84A. Los PIC son una extensa familia microcontroladores divididos en tres gamas, la gama baja con memoria programa 12 bits, la gama media y la gama alta con memoria programa 14
Características generales
REPERTORIO DE INSTRUCCIONES En esta sección se pretende: Conocer las características generales de las instrucciones para el PIC16F84 Los distintos modos de direccionamiento, y Los diferentes grupos de
Practica de PIC 16F84
Practica de PIC 16F84 Los PIC son circuitos que pueden controlar dispositivos y diferentes sistemas, son como los PLC (controles lógico programable), además debo decir que es un circuito que tiene todas
DESCRIPCIÓN DE LAS INSTRUCCIONES
Todas las instrucciones del PIC cumplen las siguientes condiciones: Las instrucciones son simples y rápidas. Todas tienen un tiempo de ejecución de un ciclo de instrucción (cuatro ciclos de reloj) a excepción
GAMA BAJA (PIC16C5X) ARQUITECTURA BÁSICA
GAMA BAJA (PIC6CX) ARQUITECTURA BÁSICA Instrucciones -bit de palabra de instrucción ROM/EPROM desde a 04 palabras Hasta 4 páginas (xbits) de memoria de programa -bit de datos RAM desde a bytes Hasta 4
Taller de Firmware. Introducción al PIC16F877. Facultad de Ingeniería Instituto de Com putación
Taller de Firmware Introducción al PIC16F877 Facultad de Ingeniería Instituto de Com putación Contenido Introducción a los microcontroladores PIC. Presentación del PIC 16F877. Introducción a los microcontroladores
Instrucciones para programar el PIC16F877
Instrucciones para programar el PIC16F877 2 Estos microcontroladores responden a una serie de instrucciones o códigos que se deben grabar en su memoria de programa, en total son 35. A continuación se encuentra
UNIDAD IV PROGRAMACION. Programación del microcontrolador
UNIDAD IV PROGRAMACION Programación del microcontrolador Para grabar la memoria de programa el microcontrolador debe llevarse a un modo especial de trabajo suministrando 13.5V a la línea MCLR y el voltaje
Microcontrolador PIC16F84: Arquitectura
Microcontrolador PIC16F84: Arquitectura La arquitectura del PIC es tipo Harvard: Mem. de Programa (instrucciones) (tipo FLASH) Control DIR DATOS µp (tipo RISC, pipeline de 2 etapas) Control DIR DATOS 14
ORGANIZACIÓN INTERNA + INTRODUCCIÓN AL ENSAMBLADOR
ORGANIZACIÓN INTERNA + INTRODUCCIÓN AL ENSAMBLADOR ORGANIZACIÓN de la MEMORIA Dentro del PIC16F877 se distinguen tres bloques de memoria. Memoria de programa En sus 8192 posiciones (8K) contiene el programa
ARQUITECTURA DEL PIC16F84A
ARQUITECTURA DEL PIC16F84A Arquitectura interna del PIC16F84A CPU ALU Decodificador de Instrucciones - Buses Registro de trabajo W PC Contador de Programa Organización de la memoria Memoria de Programa
INSTRUCCIONES DE ENSAMBLADOR
MPLAB INSTRUCCIONES DE ENSAMBLADOR ORGANIZACIÓN de la MEMORIA Dentro del PIC16F877 se distinguen tres bloques de memoria. Memoria de programa En sus 8192 posiciones (8K) contiene el programa con las instrucciones
TEMA 5 LA MEMORIA DE DATOS MEMORIA RAM D.P.E. DESARROLLO DE PROYECTOS 1
TEMA 5 LA MEMORIA DE DATOS MEMORIA RAM D.P.E. DESARROLLO DE PROYECTOS 1 Estructura De La Memoria Ram (1) La memoria de datos RAM está dividida en dos partes diferenciadas: 1.- Zona SFR o zona de Registros
2.- Descripción General del PIC16F877
2.- Descripción General del PIC16F877 2.1.- La Familia del PIC16F877 El microcontrolador PIC16F877 de Microchip pertenece a una gran familia de microcontroladores de 8 bits (bus de datos) que tienen las
Microcontroladores PIC
Microcontroladores PIC Procesador RISC. Arquitectura Harvard Pipeline Formato de instrucciones ortogonal Arquitectura basada en banco de registros Distintos periféricos: temporizadores, puertos paralelo/serie,
Lenguaje ensamblador Semana 2 Trabajando con el lenguaje ensamblador
2016 Lenguaje ensamblador Semana 2 Trabajando con el lenguaje ensamblador Contenido Trabajando con el lenguaje ensamblador... 2 Introducción... 2 UNIDADES DE INFORMACIÓN... 3 BIT... 3 BYTE... 3 NIBBLE...
II) MICROCONTROLADORES
II) MICROCONTROLADORES 1- Descripción y Características Son dispositivos electrónicos digitales sincrónicos programables que para funcionar necesitan, además de alimentación y señales externas, un programa,
Implementación de un microcontrolador sencillo
Microelectrónica, 4 o Curso, P94 Implementación de un microcontrolador sencillo M. L. López Vallejo P. Ituero y C. López Barrio Abril 200 Índice 1. Arquitectura del PIC 1 1.1. Organización de la memoria..............................
Microcontroladores PIC
Microcontroladores PIC 1 Características generales: Arquitectura Harvard, procesador segmentado. Compatibilidad software entre los modelos de la misma gama. Sencillez de uso y herramientas de desarrollo
Las Instrucciones. A continuación vamos a presentar el conjunto de instrucciones básico de los Microcontroladores Picmicro.
Las Instrucciones A continuación vamos a presentar el conjunto de instrucciones básico de los Microcontroladores Picmicro. En general la instrucciones de los microcontroladores pueden clasificarse como:
Características Técnicas del PIC 16F84
Características Técnicas del PIC 16F84 Repertorio de 35 Instrucciones. Todas las instrucciones se ejecutan en un solo ciclo excepto las de salto que necesitan dos. Versiones de 4 MHz (PIC16F84-04) y 10
MICROCONTROLADOR PIC DE MICROCHIP
MICROCONTROLADOR PIC DE MICROCHIP PIC16F877-28-PIN 8-BIT CMOS FLASH MICROCONTROLLER PIC16F877: ESTRUCTURA INTERNA Bus de Datos Bus de Datos (programa) Registro de trabajo (acumulador) Conversor A/D Contador/Temporizador
Tema 2: Sistemas Empotrados basados en Microcontroladores (Sesión 4)
Escuela en Ingeniería Informática - Grado en Ingeniería Informática [1] Tema 2: Sistemas Empotrados basados en Microcontroladores (Sesión 4) Antonio Carlos Domínguez Brito
El PIC16F84. Capítulo 1. Pines y funciones Arquitectura Características especiales El PIC16C84 Compatibilidad con otras familias
Capítulo 1 El PIC16F84 Pines y funciones Arquitectura Características especiales El PIC16C84 Compatibilidad con otras familias Curso avanzado de Microcontroladores PIC 3 4 Curso avanzado de Microcontroladores
Dentro del PIC16F877 se distinguen tres bloques de memoria.
1 ORGANIZACIÓN de la MEMORIA Dentro del PIC16F877 se distinguen tres bloques de memoria. Memoria de programa En sus 8192 posiciones (8Kx14bits) contiene el programa con las instrucciones que gobiernan
MICROCONTROLADORES. 1. El PIC 16F84A es un microcontrolador de: a) 16 bits b) 8 bits c) 4 bits d) 32 bits e) 64 bits
1. El PIC 16F84A es un microcontrolador de: a) 16 bits b) 8 bits c) 4 bits d) 32 bits e) 64 bits MICROCONTROLADORES 2. La memoria de programa del PIC 16F84A es de tipo: a) ROM b) OTP c) RAM d) EPROM e)
Microcontroladores PIC
Introducción Los microcontroladores son procesadores que poseen memoria y dispositivo de entrada salida todo encapsulado en un mismo integrado, lo que permite su uso sin la necesidad de estar disponiendo
INFORMÁTICA INDUSTRIAL. 3º INGENIERÍA TÉCNICA INDUSTRIAL. ESPECIALIDAD ELECTRÓNICA BOLETÍN 1. CURSO 2003/04
INFORMÁTICA INDUSTRIAL. 3º INGENIERÍA TÉCNICA INDUSTRIAL. ESPECIALIDAD ELECTRÓNICA BOLETÍN 1. CURSO 20/04 1. Se colocan tres interruptores en las líneas RA0, RA1 y RA2 de la puerta A de un PIC16F84. Y
Tema 4. Organización de la memoria
Tema 4 Organización de la memoria 1 ARQUITECTURA DEL PIC16F84 Tema 4. Organización de la memoria Memoria de programa tipo ROM Flash de 1024 registros de 14 bits Memoria de datos dividida en dos áreas:
- FUNDAMENTOS TEÓRICOS - EJEMPLOS DE APLICACIÓN. 09/01/2009 Ing. José A. Picón - - (0416)
MICROPROCESADORES Y MICROCONTROLADORES - FUNDAMENTOS TEÓRICOS - EJEMPLOS DE APLICACIÓN 09/01/2009 Ing. José A. Picón - www.joseapicon.com.ve - (0416) 9519990 Informes de Laboratorio Entregar informe con
MIPS: Modelo de programación. (I Parte)
MIPS: Modelo de programación (I Parte) MIPS: Microprocessor without Interlocked Pipeline Stages Trabajaremos como MIPS Son similares a las desarrolladas en los años 80 Cerca de 100 millones de procesadores
PIC s 1ª PARTE RESUMEN Y EJERCICIOS_06/07
PIC s 1ª PARTE RESUMEN Y EJERCICIOS_06/07 INDICE 1-Microcontroladores, arquitectura PIC. 2-Hardware PIC 16f84. Bancos de registros. 3-Grabación del PIC. Listado Instrucciones 4-Líneas de I/O del PIC 5-Directivas
Características PIC16F84
Departamento de Electrónica Fundación San Valero del Toda la información que grabamos (memoria de programa y de datos) se puede modificar con el microcontrolador conectado a la aplicación. (ICSP = In-Circuit
UNIVERSIDAD NACIONAL DE COLOMBIA SEDE BOGOTÁ FACULTAD DE INGENIERÍA INGENIERÍA MECATRÓNICA
UNIVERSIDAD NACIONAL DE COLOMBIA SEDE BOGOTÁ FACULTAD DE INGENIERÍA INGENIERÍA MECATRÓNICA INTRODUCCIÓN AL PIC NOMENCLATURA ARQUITECTURA. TEMPORIZACIÓN. SET DE INSTRUCCIONES. MODOS DE DIRECCIONAMIENTO.
D:\ACCESO\ACCESO.ASM. list p=16f877 include "p16f877.inc" ROTA equ 0x20 TEMP equ 0x21 TECLA equ 0x22 DIGITOS equ 0x23 DIR equ 0x24
;Programa para el control de acceso a un sistema X ;mediante la introducción de una clave a través de un teclado ;matricial. ;Es posible cambiar la clave de acceso y guardarla en la EEPROM ;La velocidad
PIC Programable Integrates Circuit o Peripheral Interface Controller
PIC Programable Integrates Circuit o Peripheral Interface Controller un microprocesador es un sistema abierto porque su configuración es variable de acuerdo con la aplicación a la que se destine. Es diferente
Contenido MICROCONTROLADORES PIC16F877A Y PIC16F887 / SALVATIERRA. Alfaomega. 3.4 Soporte Muestras... 25
Contenido Introducción 1 Parte 1 Conceptos básicos 3 1.0 Componentes de un MCU... 3 1.1 Partes básicas... 3 1.1.1 ALU (Unidad lógica aritmética). 4 1.1.2 I/O (INPUT/OUTPUT)... 4 1.1.3 Memoria (RAM, ROM...
Modos de Direccionamiento
Modos de Direccionamiento Modos de direccionamiento del 8051 La CPU tiene la habilidad de accesar los datos de varias formas Se podría especificar el dato directamente en la instrucción Para datos en la
REGISTRO DE TEMPERATURA USANDO EL MICROCONTROLADOR PIC16C71. José González Flórez *, Eusebio García García ** Abstract
UNIVERSIDAD PEDAGOGICA NACIONAL REGISTRO DE TEMPERATURA USANDO EL MICROCONTROLADOR PIC16C71 José González Flórez *, Eusebio García García ** Abstract A digital measurement temperature employs the PIC 16C71
PIC16C5X (GAMA BAJA) Solo en dispositivos de 28 pins. Encapsulado y patillaje:
PIC6C5X (GAMA BAJA) Oscilador RESET SLEEP WatchDog Timer (WDT) Protección de código e IDs Periféricos: Timer/Contador de 8bits (T) con prescaler compartido para WDT o TMR Hasta 3 puertos I/O (RA,RB,RC)
Tema 6: Microcontroladores
Tema 6: Microcontroladores Carlos Garre del Olmo 1 Microcontroladores Contenidos Introducción a los microcontroladores. Principales familias y sus características. La familia PIC16. Programación de microcontroladores.
Apéndice B Programa para calcular inclinación con PIC 16F877A
Apéndice B Programa para calcular inclinación con PIC 16F877A list p=16f877a ; list directive to define processor #include ; processor specific variable definitions ;***** DEFINICIÓN DE
Cartilla para Microcontrolador PIC16F877. 28/40 Pin 8-Bit CMOS FLASH.
Cartilla para Microcontrolador PIC16F877 28/40 Pin 8-Bit CMOS FLASH. Características principales CPU RISC de alta performance Set de35 instrucciones Todas las instrucciones son de un ciclo salvo aquellas
MICROCONTROLADORES PIC BÁSICO (PIC 16F84A / 16F627)
MICROCONTROLADORES PIC BÁSICO (PIC 16F84A / 16F627) TEMARIO Objetivo: El estudiante comprenderá la evolución de los microcontroladores y microprocesadores así como sus diferencias, desarrollara su habilidad
Microcontrolador PIC 16F84
INTRODUCCIÓN A LA PROGRAMACIÓN Microcontrolador PIC 16F84 mail : enric.serra 0 - INTRODUCCIÓN. Este documento es una introducción a la programación del PIC 16f84. Este documento se puede copiar y utilizar
EDU-PIC Módulo 16F84 Manual del Usuario
1 EDU-PIC Módulo 16F84 Manual del Usuario Indice : 1. Introducción 2 2. Descripción general 2 3. Definición de los pines en el 16F84 4 4. Programador de la memoria FLASH 5 5. Oscilador 5 6. Arquitectura
Microcontroladores PIC de Microchip: generalidades
Microcontroladores PIC de Microchip: generalidades PIC significa Peripheral Interface Controller Los fabrica ARIZONA MICROCHIP TECHNOLOGY. Fábrica principal: Chandler (Arizona). Otras en Tender (Arizona),
TUTORIAL PIC S INNOVACIÓN TECNOLÓGICA ELECTRÓNICA ESTUDIANTIL EN CIENCIAS INTEEC
INNOVACIÓN TECNOLÓGICA ELECTRÓNICA ESTUDIANTIL EN CIENCIAS TUTORIAL PIC S Resumen elaborado por: Moctezuma Eugenio Juan Carlos Sánchez Rodríguez Jose Luis B. 1.- INTRODUCCIÓN Desde la invención del circuito
Registros SFR vistos hasta ahora: Microcontroladores PIC
Registros SFR vistos hasta ahora: Microcontroladores PIC Microcontroladores PIC: Timer Características del Timer TMR0: Cumple básicamente la función de contador de eventos (o divisor de frecuencia). El
MICROCONTROLADORES PIC
MICROCONTROLADORES PIC FUNDAMENTOS Y APLICACIONES UN ENFOQUE DIDÁCTICO ESCUELA DE POSGRADO MICROCONTROLADORES PIC FUNDAMENTOS Y APLICACIONES UN ENFOQUE DIDÁCTICO MATERIAL EDUCATIVO DEDICATORIA DEDICO
CODIGO EN ASSEMBLER TRANSMISOR. list p=16f876 ;selecion de pic
TRANSMISOR CODIGO EN ASSEMBLER list p=16f876 ;selecion de pic radix hex ; codigo hex indf equ 0h ;direcionamiento indirecto tmro equ 1h ;contador de tiempo real pc equ 2h ;contador del programa status
Control de pantallas de cristal líquido mediante PIC
INGENIERÍA Control de pantallas de cristal líquido mediante PIC Ejemplo práctico de interconexión y control de una pantalla de cristal líquido (LCD) por un microcontrolador PIC CELESTINO BENÍTEZ VÁZQUEZ
El único lenguaje que entienden los microcontroladores es el código máquina formado por ceros y unos del sistema binario.
1 LENGUAJE ENSAMBLADOR El único lenguaje que entienden los microcontroladores es el código máquina formado por ceros y unos del sistema binario. El lenguaje ensamblador expresa las instrucciones de una
Proyecto de Microprocesadores I del CENT57 AFINADOR DIGITAL MICROPROCESADO Alumnos: Damian O. Macarrein Gastón M. Murphy Año 2002
Proyecto de Microprocesadores I del CENT57 AFINADOR DIGITAL MICROPROCESADO Alumnos: Damian O. Macarrein Gastón M. Murphy Año 2002 Introducción Este afinador digital esta diseñado para la medición de frecuencia
SISTEMAS ELECTRÓNICOS AVANZADOS. ING. TÉC. INDUSTRIAL ELECTRÓNICO
INTERRUPCIONES Interrumpen la ejecución de un programa y pasan a la rutina de servicio del evento que provoca la interrupción. El vector de interrupción se encuentra en la dirección 04H de la memoria de
1. Proponer un circuito que tenga el puerto b como salida conectando 8 leds, realizando un programa que me encienda los bits 0, 1, 3, 5, 7.
1. Proponer un circuito que tenga el puerto b como salida conectando 8 leds, realizando un programa que me encienda los bits 0, 1, 3, 5, 7. a. Diagrama de flujo b. Circuito C1 4 MHZ C2 R2 10k 16 15 4 R1
CURSO BÁSICO DE PIC16F877
CURSO BÁSICO DE PIC16F877 Raúl Peralta Meza Carlos Quiñones Quispe Generalidades Historia e importancia de los microcontroladores Metodología de estudio Microcontroladores Microchip 16F87X Arquitectura
INDICE. Introduction a los microcontroladores Ejemplo de microcontrolador minimalista: PIC10F200 El microcontrolador ARM7 LPC2103
INDICE Introduction a los microcontroladores Ejemplo de microcontrolador minimalista: PIC10F200 El microcontrolador ARM7 LPC2103 Microcontroladores Idea «SoC»: Computador en un solo chip Posible si la
Elección de un microcontrolador
Elección de un microcontrolador Decisión multivariable. No hay un óptimo evidente Factores: Herramientas de desarrollo Base de conocimientos Precio y disponibilidad Familia versátil y en desarrollo Cantidad
RECURSOS FUNDAMENTALES
RECURSOS FUNDAMENTALES Los recursos que se considerarán son : Temporizadores Puertos de E/S La Palabra de Configuración EEPROM de datos 1 TEMPORIZADORES Una labor habitual en los programas de control suele
Aplicaciones de mc Lenguaje C- CC5x-Temporizadores
Aplicaciones de mc Lenguaje C- CC5x-Temporizadores Preparado por : Juan Ignacio Huircán Departamento de Ingeniería Eléctrica Universidad de La Frontera Otoño 29 Introducción El µc posee 3 Módulos Timer,
Carrera: Técnico Superior en Técnicas Digitales. Alumnos: Emiliano Teseo y José Luis Fernández
Carrera: Técnico Superior en Técnicas Digitales Instituto: CENT 57 Trabajo final Año 2005 Alumnos: Emiliano Teseo y José Luis Fernández 1 ILUMINACION PARA VIDRIERAS Descripción general (Guía para el usuario)
PIC16CXXX (GAMA MEDIA) Oscilador RESET SLEEP WatchDog Timer (WDT) Protección de código e IDs Interrupciones Programación ICSP (In Circuit Serial
PIC6CXXX (GAMA MEDIA) Oscilador RESET SLEEP WatchDog Timer (WDT) Protección de código e IDs Interrupciones Programación ICSP (In Circuit Serial Programming) Periféricos: Timer/Contador de 8bits (T) con
SALTOS EN FUNCIONDE UN BIT Aquéllas que pueden producir el salto en función del estado de un bit. Son btfsc y
SISTEMAS ELECTRONICOS DIGITALES SALTO CONDICIONAL El repertorio del PIC16F84 también dispone de instrucciones de salto condicional, que son aquéllas que producen un salto en función de que se cumpla o
Microchip dispone de cuatro familias de microcontroladores de 8 bits para adaptarse a las necesidades de la mayoría de los clientes potenciales.
Modificado por Luis Frino www.frino.com.ar Fuente www.micro1.com.ar 2.1.8 Herramientas de soporte potentes y económicas La empresa Microchip y otras que utilizan los PIC ponen a disposición de los usuarios
Microcontroladores PIC
Microcontroladores PIC Departamento de Electrónica Fundación San Valero Ventajas Existen varias razones por las cuales conviene utilizar PIC: Por la cantidad de información disponible sobre estos microcontroladores,
PRÁCTICA 6: Gobierno del display 7 segmentos
SISTEMAS ELECTRÓNICOS Y AUTOMÁTICOS PRACTICAS DE MICROCONTROLADORES PIC PRÁCTICA 6: Gobierno del display 7 segmentos Display 7 segmentos - 1 - Ingeniería de Sistemas y Automática 1. Objetivos: Gobierno
Assembler para PICs. Permite la utilización de etiquetas, tanto para apuntar a direcciones como para definir valores constantes.
Características generales del lenguaje: Emplea los mnemotécnicos de las instrucciones del μc. En nuestro caso corresponderá al set de instrucciones de los PICs de la gama media (35 instrucciones). Permite
EDUPIC Módulo 16F628 Manual del Usuario
1 EDUPIC Módulo 16F628 Manual del Usuario Indice : 1. Introducción 2 2. Descripción general 2 3. Definición de los pines en el 16F628 4 4. Programador de la memoria FLASH 5 5. Oscilador 5 6. Arquitectura
CONTROLADORA PARA PIXELS CONPIX
The LedEdit Software Instructions 1, Install the software to PC and open English version: When we installed The LedEdit Software, on the desktop we can see following icon: Please Double-click it, then
2.- Descripción General del PIC16F877
2.- Descripción General del PIC16F877 2.1.- La Familia del PIC16F877 El microcontrolador PIC16F877 de Microchip pertenece a una gran familia de microcontroladores de 8 bits (bus de datos) que tienen las
CODIGO EN ASSEMBLER ;************************************************************************
RECEPTOR CODIGO EN ASSEMBLER ;************************************************************************ list p=16f84a ;selecion de pic radix hex ; codigo hex pc equ 02h status equ 03h portb equ 06h PORTA
Programación y Aplicaciones de los Microcontroladores PIC16FXXX (Nivel Básico) ING. EULER DEZA FIGUEROA
Programación y Aplicaciones de los Microcontroladores PIC16FXXX (Nivel Básico) ING. EULER DEZA FIGUEROA ESTRUCTURA Y CONTENIDO: SESIONES DE CLASE CONTENIDOS PRACTICA PRIMERA (5 horas ) SEGUNDA (5 horas
Decodificador de funciones v.2
Decodificador de funciones v.. Introducción Este decodificador de funciones posee cuatro salidas para activar luces, fumígeno, etc. Dirección de locomotoras corta y larga hasta 9999 Control de las salidas
PRÁCTICA 4 LOS BITS DE CONFIGURACIÓN DEL PIC16F628
Los Bits de Configuración del PIC16F628 44 PRÁCTICA 4 LOS BITS DE CONFIGURACIÓN DEL PIC16F628 OBJETIVOS Identificar cada uno de los bits de configuración que rigen el funcionamiento del PIC16F628. Verificar
Manejo LCD Gráfico DSM
Manejo LCD Gráfico DSM Christopher Orihuela Sosa 10/09/07 Índice Introducción...1 Hardware...2 LCD...3 patillaje...4 tabla de instrucciones...5 Timings...6 Organización de la pantalla...8 Circuito completo...9
2.2-1 Visión Interna PIC16F873/876. SBM
2.2-1 Visión Interna PIC16F873/876. 1 2.2-2 Visión Interna PIC16F874/877. 2 2.2-3 Sistema de memoria. Tienen arquitectura Harvard, separa la memoria de datos y la memoria de programa, y se accede a ellas
Programación y diseño de dispositivos mediante Microcontroladores PIC.
Microcontroladores - Robots - Automatismos - Programación Programación y diseño de dispositivos mediante Microcontroladores PIC. Dr. Eugenio Martín Cuenca Ing. Jose María Moreno Balboa Facultad de Ciencias.
Organización del Computador I Verano. Aritmética (4 de 5) Basado en el capítulo 4 del libro de Patterson y Hennessy Multiplicaciones y Divisiones
Organización del Computador I Verano Aritmética (4 de 5) Basado en el capítulo 4 del libro de Patterson y Hennessy Multiplicaciones y Divisiones Verano 2014 Profesora Borensztejn MULTIPLICACIONES 1011
Indice. Escrito por Administrator Martes, 02 de Septiembre de 2008 17:45 - Actualizado Domingo, 20 de Septiembre de 2009 07:45 1 / 15
1 / 15 El contenido del libro " MICROCONTROLADOR PIC16F84. Desarrollo de proyectos " de la Editorial Ra CAPÍTULOS: 1. MICROCONTROLADOR PIC16F84 2. PERIFÉRICOS BÁSICOS 3. GRABACIÓN DE MICROCONTROLADORES
Sistemas con Microprocesadores I
Sistemas con Microprocesadores I 1 El ambiente de desarrollo MPLAB IDE El Entorno MPLAB IDE Creando código de usuario Creando un Proyecto Selección del Dispositivo y ventana de salida Selección de herramientas
El Microcontrolador PIC16F877. Resumen de hoja de datos
El Microcontrolador PIC16F877 Resumen de hoja de datos 2 El PIC16F877 es un microcontrolador con memoria de programa tipo FLASH, lo que representa gran facilidad en el desarrollo de prototipos y en su
Alarma con Interfaz DTMF de Línea Telefónica basado en PIC16F84
Alarma con Interfaz DTMF de Línea Telefónica basado en PIC16F84 Propósito En toda aplicación donde normalmente se requiera el establecimiento de una conexión telefónica se hace necesario el diseño de una
ESCUELA POLITÉCNICA NACIONAL
ESCUELA POLITÉCNICA NACIONAL ESCUELA DE FORMACIÓN TECNOLÓGICA MÓDULO PARA VERIFICAR EL FUNCIONAMIENTO DE LOS PROGRAMAS GRABADOS EN EL PIC 16F84A PROYECTO PREVIO A LA OBTENCIÓN DEL TÍTULO DE TECNÓLOGO EN
Programación de microcontroladores usos y aplicaciones. Desde Ensamblador a C.
Programación de microcontroladores usos y aplicaciones. Desde Ensamblador a C. Familias 8-bit de Microchip: PIC10F, PIC12F, PIC16F y PIC18F /cursos/microchip/ Espinher Electróingeniería, S.A. de C.V. Ing.
Tema 11. Introducción a los Microprocesadores y Microcontroladores
Unidad 11 Introducción a los microprocesadores y microcontroladores [email protected] [email protected] Septiembre 2002 1 CONTENIDO Unidad 11. Introducción a los microprocesadores y microcontroladores.
Level 1 Spanish, 2016
90911 909110 1SUPERVISOR S Level 1 Spanish, 2016 90911 Demonstrate understanding of a variety of Spanish texts on areas of most immediate relevance 2.00 p.m. Thursday 24 November 2016 Credits: Five Achievement
