Download - Introduccion a los Microcontroladores
![Page 1: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/1.jpg)
INTRODUCCION A LOS MICROCONTROLADORES
PIC
MINISTERIO DEL PODER POPULAR PARA LA EDUCACION ESCUELA TECNICA INDUSTRIAL LARA
MENSIÓN ELECTRÓNICATALLER ESPECÍFICO DE LA MENSIÓN
PROFESOR DAVID RIVAS
![Page 2: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/2.jpg)
PROBLEMA DEL ROBOT
A
B
INSTRUCCIONES
1mt
3mt
2mt
7mt
5mt
![Page 3: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/3.jpg)
INSTRUCCIONES DEL MICROCONTROLADOR
MOVER HACIA ARRIBA
MOVER HACIA ABAJO
MOVER A LA DERECHA
MOVER A LA IZQUIERDA
![Page 4: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/4.jpg)
LENGUAJE ENSAMBLADOR
MOVE dirección, metros
![Page 5: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/5.jpg)
Mover hacia arriba
3mts
MOVE arriba,3
![Page 6: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/6.jpg)
Mover hacia la derecha
7mts
MOVE derecha,3
![Page 7: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/7.jpg)
PROBLEMA DEL ROBOT
AB
1mt
3mt
2mt
5mt
7mt
MOVE arriba,1
MOVE derecha,3MOVE arriba,2MOVE derecha,5
MOVE abajo,7
![Page 8: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/8.jpg)
PROCESO DE PROGRAMACION
.ASMInstrucciones
EnAssembler
Ensamblador(MPLAB)
.HEX
CódigoMaquina
.HEXCódigo
Maquina Programador
![Page 9: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/9.jpg)
Memoria de Datos
Memoria de Programa
ESTRUCTURA INTERNA DE UN PIC
PROCESADOR
![Page 10: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/10.jpg)
Instrucción 1
Instrucción 2
Memoria de Programa
KB
GB
![Page 11: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/11.jpg)
Memoria de ProgramaASSEMBLER CODIGO MAQUINA
INSTRUCCIÓN 1
00101101110001
PIC 16F84A1KB
PIC 16F628A2KB
11101101110000
![Page 12: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/12.jpg)
MEMORIA DE DATOS
![Page 13: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/13.jpg)
REGISTRO
MEMORIA DE DATOSARCHIVADOR
00h
01h
00h
01h
MEMORIA DE DATOS
Es cada espacio de memoria.
![Page 14: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/14.jpg)
TIPOS DE REGISTROS
SFRREGISTROS DE
PROPOSITO ESPECIAL
CONTROLAN FUNCIONES INTERNAS
STATUS
TMRO
TRISA
TRISB
![Page 15: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/15.jpg)
TIPOS DE REGISTROS
GRPREGISTROS DE PROPOSITO
GENERAL
ALMACENAMIENTODE DATOS TEMPORALES
EN LOS PROGRAMAS
![Page 16: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/16.jpg)
MEMORIA DE DATOS
BANCO 0 BANCO 1
03h
PIC 16F84A POSEE 2BANCOS
PIC 16F628 POSEE 4BANCOS
Almacenar03h
En el Banco 1
![Page 17: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/17.jpg)
Organización de la Memoria delPIC 16F84A
![Page 18: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/18.jpg)
Pines de Alimentación y Reloj
4Mhz
TIERRA+5v
![Page 19: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/19.jpg)
Puertos de Entrada-Salida (I/O)
![Page 20: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/20.jpg)
ELABORACIO DE UN PROGRAMA
![Page 21: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/21.jpg)
ENCENDIENDO UN LED
![Page 22: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/22.jpg)
DIAGRAMA DE FLUJO
![Page 23: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/23.jpg)
BANCO 0 BANCO 1
REGISTRO TRISB
TRISB
![Page 24: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/24.jpg)
REGISTRO TRISB
1 = IN0 = OUT
![Page 25: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/25.jpg)
INSTRUCCIONES PARA MANIPULAR BITS
BSF F,b (Bit Set File) 1
BCF F,b (Bit Clear File) 0
Registro Bit
![Page 26: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/26.jpg)
BSF f,bf = Indica el registro que se desea modificar
b = Indica la posición del bit del registro que se desea colocar en 1
BSF TRISB,4
![Page 27: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/27.jpg)
BCF f,bf = Indica el registro que se desea modificar
b = Indica la posición del bit del registro que se desea colocar en 0
BCF TRISB,2
![Page 28: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/28.jpg)
CONFIGURAR RB7 COMO SALIDA???
BCF TRISB,7
![Page 29: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/29.jpg)
ACCESO A TRISB UBICADO EN EL BANCO 1
BANCO 0 BANCO 1
TRISB
![Page 30: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/30.jpg)
BANCO 0 BANCO 1
TRISB
STATUS STATUS
BITSRP0
ACCESO A TRISB UBICADO EN EL BANCO 1
PORTB
![Page 31: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/31.jpg)
REGISTRO STATUS
RP0 = O, Banco 0RP0 = 1, Banco 1
![Page 32: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/32.jpg)
INSTRUCCIONES PARA CAMBIAR DE BANCO
BSF STATUS,RP0
MOVERNOS AL BANCO 1 MOVERNOS AL BANCO 0
BCF STATUS,RP0O
BSF STATUS,5O
BCF STATUS,5
![Page 33: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/33.jpg)
CREANDO EL PROGRAMA
BSF STATUS,5 ;Entra al banco 1 BCF TRISB, 7 ;Configura el bit 7 del registro TRISB como salida. BCF STATUS,5 ;Sale al banco 0ENCENDIDO BSF PORTB,7 ;Enciende el led en RB7. Goto ENCENDIDO ;Mantiene un ciclo infinito que mantiene el led ;encendido END
ENCENDIDO BSF PORTB,7 Goto ENCENDIDO
![Page 34: Introduccion a los Microcontroladores](https://reader033.vdocuments.co/reader033/viewer/2022061606/556aced3d8b42acd348b5377/html5/thumbnails/34.jpg)
EJERCICIO
Elabore el diagrama de flujo y las instrucciones para encender un led por medio de un interruptor colocado en el puerto RA1.