iloveyoutl1
Newbie level 3
- Joined
- Aug 12, 2010
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- andhra pradesh
- Activity points
- 1,317
i am not geetting temperature values displayed in the pc,
plz help me fast ,i should submit project next week, i dont have time to check code because i dont have microcontroller kit,plz plz help me friends plzzzzzzzz soon
org 0000h
mov p1,#0ffh
mov p2,#00h
mov tmod,#20h
mov th1,#-3
mov scon,#50h
setb tr1
;3.2------------------rd
;3.3------------------wr
;3.4------------------intr
adc:
setb p2.0 ;rd pin
setb p2.1;wr pin
setb p2.2;intr pin
clr p2.1
acall delay
setb p2.1
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
mov sbuf,a
here5: jnb ti,here5
clr ti
inc dptr
;sjmp back
here:jb p2.2,here
setb p2.0
acall delay
clr p2.0
acall dev
sjmp adc
delay:
mov r1,#0ffh
here3: mov r2,#0ffh
here2:
djnz r2,here2
djnz r1,here3
ret
dev:
mov a,p1
mov b,#100
div ab
; mov r3,a
orl a,#30h
mov sbuf,a
here1: jnb ti,here1
clr ti
mov a,b
mov b,#10
div ab
orl a,#30h
mov sbuf,a
here4: jnb ti,here4
clr ti
mov a,b
MOV R6,B
mov a,0f0h
orl a,#30h
mov sbuf,a
here6: jnb ti,here6
clr ti
ret
org 200h
tmp :db"temperature=",0
ret
end,,
plz help me fast ,i should submit project next week, i dont have time to check code because i dont have microcontroller kit,plz plz help me friends plzzzzzzzz soon
org 0000h
mov p1,#0ffh
mov p2,#00h
mov tmod,#20h
mov th1,#-3
mov scon,#50h
setb tr1
;3.2------------------rd
;3.3------------------wr
;3.4------------------intr
adc:
setb p2.0 ;rd pin
setb p2.1;wr pin
setb p2.2;intr pin
clr p2.1
acall delay
setb p2.1
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
acall delay
mov sbuf,a
here5: jnb ti,here5
clr ti
inc dptr
;sjmp back
here:jb p2.2,here
setb p2.0
acall delay
clr p2.0
acall dev
sjmp adc
delay:
mov r1,#0ffh
here3: mov r2,#0ffh
here2:
djnz r2,here2
djnz r1,here3
ret
dev:
mov a,p1
mov b,#100
div ab
; mov r3,a
orl a,#30h
mov sbuf,a
here1: jnb ti,here1
clr ti
mov a,b
mov b,#10
div ab
orl a,#30h
mov sbuf,a
here4: jnb ti,here4
clr ti
mov a,b
MOV R6,B
mov a,0f0h
orl a,#30h
mov sbuf,a
here6: jnb ti,here6
clr ti
ret
org 200h
tmp :db"temperature=",0
ret
end,,