Discussion in "Project Help" started by    shabnam    Jan 20, 2008.
Sun Feb 03 2008, 12:30 am
#21
hi.i solve the program error but now i can't solve the shematic error!!my firs shematic just showed in the lcd Cooliron!!! i change the ad but ld just show cooleron.can u help me?tomorrow is my last time to give this project to my tutor
Sun Feb 03 2008, 12:59 am
#22
may i take another look on your code as well as on the circuit? only then i can help otherwise i cannot..
Sun Feb 03 2008, 01:04 am
#23
$MOD52
org 00H
MOV P2,#00H
MOV P3,#00H

BEGIN:
CALL DELAY
MOV P1,#0FFH
MOV A,P1
CJNE A,#40,HIGHER
SETB P2.1
CALL MAIN_DISPLAY_COOLERON
JMP BEGIN
HIGHER:
JNC HIGH_40
MOV A,P1
CJNE A,#10,LOWER
SETB P3.1
CALL MAIN_DISPLAY_HEATHERON
CLR P2.1
JMP BEGIN
HIGH_40:
CALL DELAY
SETB P2.1
CALL MAIN_DISPLAY_COOLERON
CLR P3.1
JMP BEGIN
LOWER:
JC LOW_10
MOV P2,#00H
MOV P3,#00H
JMP BEGIN
LOW_10:
SETB P3.1
CALL MAIN_DISPLAY_HEATHERON
CLR P2.1
JMP BEGIN

DELAY:
MOV R7,#100D
WAIT:
MOV R6,#10D
AGAIN:
DEC R6
CJNE R6,#00,AGAIN
DEC R7
CJNE R7,#00,WAIT
RET


; SOURCE>DEST CARRY IS 0
; SOURCE<DEST CARRY IS 1


MAIN_DISPLAY_COOLERON: CALL LCD_START
CALL DISPLAY_COOLERON
RET

MAIN_DISPLAY_HEATHERON: CALL LCD_START
CALL DISPLAY_COOLERON
RET

LCD_START: MOV A,#38H
CALL LCD_COMMAND
MOV A,#06H
CALL LCD_COMMAND
MOV A,#0FH
CALL LCD_COMMAND
RET

LCD_COMMAND: CALL LCD_READY
MOV P1,A
CLR P2.0
CLR P2.1
SETB P2.2
CLR P2.2
RET

LCD_READY: CLR P2.0
SETB P2.1
SETB P1.7
BACK: CLR P2.2
SETB P2.2
JB P1.7,BACK
RET

LCD_DISPLAY: CALL LCD_READY
MOV P1,A
SETB P2.0
CLR P2.1
SETB P2.2
CLR P2.2
RET


DISPLAY_COOLERON: MOV R0,17
; DISP_MASSAG:
MOV A,#'c'
CALL LCD_DISPLAY
MOV A,#'o'
CALL LCD_DISPLAY
MOV A,#'o'
CALL LCD_DISPLAY
MOV A,#'l'
CALL LCD_DISPLAY
MOV A,#'e'
CALL LCD_DISPLAY
MOV A,#'r'
CALL LCD_DISPLAY
MOV A,#'o'
CALL LCD_DISPLAY
MOV A,#'n'
CALL LCD_DISPLAY
CALL LCD_SHIFT
RET ;{DISPLAY_COOLERON}


DISPLAY_HEATHERON: MOV R0,17
; DISP_MASSAG:
MOV A,#'h'
CALL LCD_DISPLAY
MOV A,#'e'
CALL LCD_DISPLAY
MOV A,#'a'
CALL LCD_DISPLAY
MOV A,#'t'
CALL LCD_DISPLAY
MOV A,#'h'
CALL LCD_DISPLAY
MOV A,#'e'
CALL LCD_DISPLAY
MOV A,#'r'
CALL LCD_DISPLAY
MOV A,#'o'
CALL LCD_DISPLAY
MOV A,#'n'
CALL LCD_DISPLAY
CALL LCD_SHIFT
RET ;{DISPLAY_HEATHERON}

LCD_SHIFT:
NEXT:
MOV A,#1CH
CALL LCD_COMMAND
DJNZ R0,NEXT
RET
end
Sun Feb 03 2008, 01:12 am
#24
i have problem with ADC.in the program and shematic.
Attachment
Sun Feb 03 2008, 01:35 am
#25
can u see it?!
Sun Feb 03 2008, 02:04 am
#26
i chek your answers tomorrow morning at 6 am!!!i hope u answer and help me!!!
Sun Feb 03 2008, 03:50 am
#27
shabnam
is that your complete program??? where is ADC programming
Sun Feb 03 2008, 09:10 am
#28
oh i say that i have problem with ADC in the program and shematic.i can't write the program and i don't know i put it right in the proteus or not!!!
Sun Feb 03 2008, 09:12 am
#29
please say what should i write and where?and the shematic!!!!!
Sun Feb 03 2008, 07:06 pm
#30
check the tutorials section.....
here you will find adc0804 programming and description.. :-)

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Loganbag
Tue May 14 2024, 04:05 am
MichaelMog
Tue May 14 2024, 03:58 am
ThomasGaxaW
Mon May 13 2024, 05:33 pm
RobertInfup
Mon May 13 2024, 04:28 pm
Joshuatem
Mon May 13 2024, 08:30 am
RaymondPex
Mon May 13 2024, 03:24 am
Kennethbycle
Sun May 12 2024, 03:12 pm
MumerMeags
Sun May 12 2024, 01:47 pm