lab5 - MPASM 5.39 LINE SOURCE TEXT LAB5.ASM 3-2-2011...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
MPASM 5.39 LAB5.ASM 3-2-2011 19:34:58 PAGE 1 M LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;========================================================== 00002 ; Group: (Your Group Name Here) 00003 ;========================================================== 00004 ; Lab 5: LCD display interface 00005 ;========================================================== 00006 ; 00007 ; This code handles the confiuration of the LCD display, 00008 ; subroutines for printing to, reseting, and clearing the 00009 ; LCD, as well as writing characters to it. 00010 ; 00011 ; Your group will be responsible for the following 00012 ; tasks: 00013 ; 00014 ; 1) 00015 ; 2) 00016 ;========================================================== 00017 00018 00019 ;======================================= 00020 ; Initalization of the environment 00021 ;======================================= 00022 list p=16F874 ; list directive to define processor 00023 #include <p16F874.inc> ; processor specific variable definitions 00001 LIST 00002 00003 ;========================================================================== 00004 ; MPASM PIC16F874 processor include 00005 ; 00006 ; (c) Copyright 1999-2010 Microchip Technology, All rights reserved 00007 ;========================================================================== 00008 00530 LIST 00024 00025 00026 00027 00028 ;======================================= 00029 ; Configuration of the PIC 00030 ;======================================= 2007 3F31 00031 __CONFIG B'11111100110001' ;setting configuration word (see PIC16F87X Data Sheet, p. 120, s
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
etting device to PIC16F874) 00032 ; || | |||| 00033 ; || | ||ww====== Oscillator = XT 00034 ; || | || 00035 ; || | |w======== Watchdog Timer = disabled 00036 ; || | | 00037 ; || | w========= Power-Up Timer = enabled 00038 ; || | 00039 ; || w============ Brown-Out Reset = disabled 00040 ; || 00041 ; ww================== Code Protection = off (also bits 5-4) 00042 00043
Background image of page 2
MPASM 5.39 LAB5.ASM 3-2-2011 19:34:58 PAGE 2 M LOC OBJECT CODE LINE SOURCE TEXT VALUE 00044 00045 00046 ;=======================================; 00047 ; Constant Declaration ; 00048 ;=======================================; 00049 00050 ;LCD display commands 00000001 00051 CLR EQU 0x01 ;Clears display, returns cursor home 00000038 00052 FSET EQU 0x38 ;Function Set command, Sets operational parameters 00000008 00053 OFF EQU 0x08 ;Turn Display Off 0000000C 00054 ON EQU 0x0C ;Turn Display On 00000006 00055 MODSET EQU 0x06 ;Sets cursor auto-move direction after char. write 00056 00057 00058 ;Delay values for timer0 (for Pre-Scalar = 1:256) FFFFFFEC 00059 D5m EQU -D'20' ; 5 ms delay FFFFFFC5 00060 D15m EQU -D'59' ;15 ms delay FFFFFF7D 00061 D33m EQU -D'131' ;33 ms delay 00062 00063 00064 ;control pin identifiers on display (PORT B) 00000000 00065 RS EQU 0 00000001 00066 RW EQU 1 00000002 00067 ENA EQU 2 00068 00069 00070 ;=======================================; 00071 ; Variable Declaration ; 00072 ;=======================================; 00073
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/19/2011 for the course ECE 667 taught by Professor Staff during the Winter '08 term at Ohio State.

Page1 / 32

lab5 - MPASM 5.39 LINE SOURCE TEXT LAB5.ASM 3-2-2011...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online