Functional Description - 1. FUNCTIONAL DESCRIPTION The...

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

View Full Document Right Arrow Icon
1. F UNCTIONAL D ESCRIPTION The whole process of program is executed in the following code. ‘DISPLAY_INFO’ is the only part that provides the execution of other subroutines. ;R0=Minute ;R1=Second ;R2=Current temp ;R3=Target temp 4 ;R4=Target min ;*****************DISPLAY_INFO ******************* DISPLAY_INFO: LCALL FIRST_LINE_LCD LCALL CURRENT_TEMP LCALL TARGET_TEMP LCALL SECOND_LINE_LCD LCALL UPDATE_TIMER LCALL CHECK_COUNTDOWN SJMP DISPLAY_INFO RET
Background image of page 1

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

View Full DocumentRight Arrow Icon
;*****************END OF DISPLAY_INFO ************ 1.1. LCD M ODULE This module consists of the display functions. Everything is related to the LCD including initializations are included here. It prepares first line of the lcd to write on. In the first line, there is target temperature and current temperature. ;*****************FIRST_LINE_LCD ******************* FIRST_LINE_LCD: PUSH ACC MOV A,#38H ;TWO LINES, 5X7 MATRIX ACALL COMNWRT ;WHEN SENDING A COMMAND, USE COMNWRT SUBROUTINE ACALL DELAY ;GIVE LCD SOME TIME MOV A,#0FH ;DISPLAY ON, CURSOR BLINKING ACALL COMNWRT ACALL DELAY MOV A,#01H ;CLEAR DISPLAY SCREEN ACALL COMNWRT ACALL DELAY MOV A,#06H ;INCREMENT CURSOR (SHIFT CURSOR TO RIGHT) ACALL COMNWRT ACALL DELAY MOV A,#80H ;FORCE CURSOR TO BEGINNING OF THE FIRST LINE ACALL COMNWRT POP ACC
Background image of page 2
RET ;*****************END OF FIRST_LINE_LCD ************ ;/////////////////////////////////////////////////// This part for the second line of the lcd that holds the time. ;*****************SECOND_LINE_LCD ******************* SECOND_LINE_LCD: PUSH ACC MOV A,#0C0h ;FORCE CURSOR TO BEGINNING OF THE SECOND LINE ACALL COMNWRT POP ACC RET ;*****************END OF SECOND_LINE_LCD ***************************** These are subroutines for sending data and commands. ;***********************************LCD************************************** COMNWRT: ;THIS SUBROUTINE IS FOR SENDING THE COMMANDS TO LCD MOV P1,A ;THE COMMAND IS STORED IN A, SEND IT TO LCD CLR P3.5 ;RS=0 BEFORE SENDING COMMAND CLR P3.6 ;R/W=0 TP WRITE SETB P3.7 ;SEND A HIGH TO LOW SIGNAL TO ENABLE PIN ACALL DELAY CLR P3.7 RET DATAWRT: ;THIS SUBROUTINE IS FOR SENDING THE DATA TO BE DISPLAYED MOV P1,A ;SEND THE DATA STORED IN A TO LCD SETB P3.5 ;RS=1 BEFORE SENDING DATA CLR P3.6 ;R/W=0 TP WRITE SETB P3.7 ;SEND A HIGH TO LOW SIGNAL TO ENABLE PIN
Background image of page 3

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

View Full DocumentRight Arrow Icon
ACALL DELAY CLR P3.7 RET ;***********************************LCD************************************** That shows the target temperature which is stored in R3. ;*****************TARGET_TEMP ******************** TARGET_TEMP: PUSH ACC MOV A,#" " ACALL DATAWRT ACALL DELAY MOV A,#"T" ACALL DATAWRT ACALL DELAY MOV A,#"A" ACALL DATAWRT ACALL DELAY MOV A,#"R" ACALL DATAWRT ACALL DELAY MOV A,#":" ACALL DATAWRT ACALL DELAY MOV A,R3 MOV B,#10 DIV AB ADD A,#30H
Background image of page 4
ACALL DATAWRT ACALL DELAY MOV A,B ORL A, #30H ACALL DATAWRT ACALL DELAY POP ACC RET ;*****************END OF TARGET_TEMP************** That shows the current temperature which is stored in R2. ;*****************CURRENT_TEMP *******************
Background image of page 5

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

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

This note was uploaded on 10/23/2011 for the course ENGINEERIN 102 taught by Professor Pablo during the Spring '11 term at Bilkent University.

Page1 / 33

Functional Description - 1. FUNCTIONAL DESCRIPTION The...

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

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