Discussion in "8051 Discussion Forum" started by    star    Nov 25, 2007.
Mon Nov 26 2007, 01:43 pm
#11
lol! star you already know that i do not give codes directly... come on this is your time to learn something.. so.. why don't you give it a try..
You do not have to do everything in a single shot, do it step by step e.g. in stop watch, you need LCD for display, so first work on the LCD part, how you are going to display and stuff like that. Then comes to the next part of 1 sec delay, then comes the counting of time.. etc, so this way it will goes.. I think you can take the LCD tutorial as your reference and start working on LCD part now best of luck..
if you find any difficulty in programming just ask.. also share your code so we can tell you if any rectifications are needed in it.
Tue Nov 27 2007, 01:02 am
#12
my master said stop watch is not good.I should choose another one!!! as soon as!!!help plzzzzzzzzzzzzzzzzzzzzzzzzzz:(
Tue Nov 27 2007, 01:52 am
#13
ask him what kind of project he is looking for.. will better give some idea.. and put more light on what is there in his mind
Wed Nov 28 2007, 01:29 pm
#14
ok.if I ask , do u help me? :">
Wed Nov 28 2007, 02:08 pm
#15
i am here to help, but i must know what project you want to do..
Fri Nov 30 2007, 10:35 pm
#16
how can I find ADC804 in proteus?
Sat Dec 01 2007, 12:20 am
#17
u mean ADC0804??
press p when u are on main screen in proteus and then search with name ADC0804 :-)
u changed project?
Sat Dec 01 2007, 12:32 am
#18
yes sir.I find a part of a program and I try to understand and complet it.sorry can u say me what does heater sensor do?and if I write a part of program can u help me to understand?

	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

I need it tomorrow. thanks


[ Edited Sat Dec 01 2007, 01:30 am ]
Sat Dec 01 2007, 12:45 am
#19
heater sensor??? u mean temperature sensor..
temperature sensor like LM35 converts current temperature to voltage signal(analog quantity) which is given to ADC.ADC then converts it to digital value which we can use with controller.
where is circuit diagram for this code
Sat Dec 01 2007, 01:32 am
#20
I have it.can u help me to understand the diagram and the program completly?

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am
Anthonyvab
Wed Apr 17 2024, 08:48 am
RobertCix
Wed Apr 17 2024, 06:46 am