Reportes Zarate
Reportes Zarate
Reportes Zarate
Microprocesadores.
Práctica: Práctica LCD
PROFESOR:
VÁZQUEZ ZARATE AGUSTÍN.
Grupo: 6CV5
Integrantes:
Objetivo:
Desarrollo:
;******************************************************************************
; This file is a basic template for assembly code for a PIC18F4550. Copy
; this file into your project directory and modify or add to it as needed. *
; template code is written for priority interrupt levels and the IPEN bit
; left in its default zero state, only the interrupt vector at 0x008 will
; be used and the WREG_TEMP, BSR_TEMP and STATUS_TEMP variables will not
; be needed.
;******************************************************************************
; Filename: PlantillaASM *
; Date: 12/01/11 *
; *
;******************************************************************************
; *
; *
;******************************************************************************
;******************************************************************************
;Configuration bits
CONFIG BOR = ON
CONFIG BORV =3
config MCLRE = ON
config PBADEN = OFF ;NOTE: modifying this value here won't have an effect
;on the application. See the top of the
main() function.
config CCP2MX = ON
config STVREN = ON
;******************************************************************************
;Variable definitions
; These variables are only needed if low priority interrupts are used.
; More variables may be needed to store other special function registers used
;******************************************************************************
;Reset vector
RESET_VECTOR ORG 0
;******************************************************************************
;******************************************************************************
ORG 0x1000
CALL CONFIGPUERTOS
Main ; *** main code goes here **
CALL Comando_LCD
CALL Comando_LCD
MOVLW 'H'
MOVWF DATO
CALL Dato_LCD
MOVLW 'O'
MOVWF DATO
CALL Dato_LCD
MOVLW 'L'
MOVWF DATO
CALL Dato_LCD
MOVLW 'A'
MOVWF DATO
CALL Dato_LCD
GOTO Main
; end of main
;******************************************************************************
; Start of subrutines
CONFIGPUERTOS
CLRF WREG
MOVLW H'0F'
MOVWF ADCON1
CLRF TRISD
CLRF PORTD
#include <H:\lcd.INC>
;******************************************************************************
;******************************************************************************
;End of program
END
Diagrama del circuito:
Conclusiones:
INSTITUTO POLITÉCNICO NACIONAL
ESCUELA SUPERIOR DE INGENIERÍA MECÁNICA Y ELÉCTRICA
UNIDAD ZACATENCO
INGENIERÍA EN COMUNICACIONES Y ELÉCTRONICA
Microprocesadores.
Práctica: Push Botton
Profesor:
Vázquez Zarate Agustín.
Grupo: 6CV5
Integrantes
Objetivo:
Aprender a utilizar el interruptor por medio de un programa en lenguaje ensamblador para el
PIC18F4550 para una función determinada.
Desarrollo:
;******************************************************************************
; This file is a basic template for assembly code for a PIC18F4550. Copy *
; this file into your project directory and modify or add to it as needed. *
; *
; template code is written for priority interrupt levels and the IPEN bit *
; left in its default zero state, only the interrupt vector at 0x008 will *
; be used and the WREG_TEMP, BSR_TEMP and STATUS_TEMP variables will not *
; be needed. *
; *
; *
; *
;******************************************************************************
; *
; Filename: PlantillaASM *
; Date: 12/01/11 *
; *
;******************************************************************************
; *
; *
;******************************************************************************
;******************************************************************************
;Configuration bits
CONFIG BOR = ON
CONFIG BORV =3
config MCLRE = ON
config PBADEN = OFF ;NOTE: modifying this value here won't have an effect
;on the application. See the top of the
main() function.
config CCP2MX = ON
config STVREN = ON
;******************************************************************************
;Variable definitions
; These variables are only needed if low priority interrupts are used.
; More variables may be needed to store other special function registers used
;******************************************************************************
;Reset vector
RESET_VECTOR ORG 0
;******************************************************************************
;******************************************************************************
ORG 0x1000
call configptos
call configtimer0
consulta:
btfsc INTCON,TMR0IF
call nuevoretardo
goto consulta
; end of main
;******************************************************************************
; Start of subrutines
;******************************************************************************
movlw 0x0F
movwf ADCON1
clrf TRISA
movlw 0x55
movwf LATA
return
bcf INTCON,TMR0IF
movlw 0X48
movwf TMR0H
movlw 0XE5
movwf TMR0L
movlw 0X87
movwf T0CON
return
bcf INTCON,TMR0IF
movlw 0x48
movwf TMR0H
movlw 0XE5
movwf TMR0L
comf LATA
return
;******************************************************************************
;End of program
END
Microprocesadores.
Práctica:
Sumador (Manejo de tablas con PIC 18F4550)
Profesor:
Vázquez Zarate Agustín.
Grupo: 6CV5
Integrantes:
Objetivo:
Desarrollar y diseñar un programa para la suma de números. Y el uso de las tables del PIC
18F4550.
Desarrollo:
;******************************************************************************
; This file is a basic template for assembly code for a PIC18F4550. Copy *
; this file into your project directory and modify or add to it as needed. *
; *
; template code is written for priority interrupt levels and the IPEN bit *
; left in its default zero state, only the interrupt vector at 0x008 will *
; be used and the WREG_TEMP, BSR_TEMP and STATUS_TEMP variables will not *
; be needed. *
; *
; *
; *
;******************************************************************************
; *
; Filename: PlantillaASM *
; Date: 12/01/11 *
; File Version: 1.0 *
; *
; *
;******************************************************************************
; *
; *
;******************************************************************************
;******************************************************************************
;Configuration bits
CONFIG BOR = ON
CONFIG BORV =3
config PBADEN = OFF ;NOTE: modifying this value here won't have an effect
config CCP2MX = ON
config STVREN = ON
;******************************************************************************
;Variable definitions
; These variables are only needed if low priority interrupts are used.
; More variables may be needed to store other special function registers used
;******************************************************************************
;Reset vector
;******************************************************************************
;******************************************************************************
MOVLW #0FH
MOVWF ADCON1
MOVWF TRISB
CLRF TRISD
MOVF PORTB,0
ANDLW B'00000111'
CALL TABLA
MOVWF PORTD
GOTO Main
;******************************************************************************
; Start of subrutines
;******************************************************************************
TABLA
MULLW H'02'
MOVF PRODL,W
ADDWF PCL,F
RETLW H'F9'
RETLW H'A4'
RETLW H'B0'
RETLW H'99'
RETLW H'92'
RETLW H'82'
RETLW H'F8'
;******************************************************************************
;End of program
END