Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

,my project is pc based temp monitoring using 89s52

Status
Not open for further replies.

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,,
 

Re:my project is pc based temp monitoring using 89s52

Since you do not have any development board to check your hardware then you may use simulation tool like Proteus.

Then you can post your code with the schematic diagram (circuit diagram) to get more responses
 

when i am compiling with 8051 ide it is showing output as invalid instruction tmo ,why so
 

Hi,

I think this error is due to TMOD mistake, D is erased. Its not TMO, its TMOD, timer mode register. And its alphbet 'O' no zero.

Added after 3 minutes:

Or send me your code so that i make corrections in it.
 

i have done it in other way ,by studing a text book


but the output shown in the pc is 014 016 019 so on deppending on temperature


but actual temperature value should be displayed as 30 -40 starting
or 25 above room temperature


i think the output shown by as 014 015
is correct
why the output is coming like that ,i mean as 014 018 ......



i want to know how can i make program changes so that i can see the exact value

:?:

Added after 2 minutes:

i am using p2.0 ,p2.1,p2.2 as read ad,wr,intr respectively
and iam using adc 0804
and port one as input

plzzz help me , ,, ,plz freinds


if possible you provide me the code


including transmission of adc value too pc

Added after 15 minutes:

i tried the following program in my college
and igot the output as 014 013 016 018 028 058



org 0000h
sjmp main
org 30h
main:mov p1,#0ffh
mov p2,#00h
mov p1,#0ffh
mov p2,#00h
mov tmod,#20h
mov th1,#-3
mov scon,#50h
setb tr1

adc: setb p2.0
setb p2.2
clr p2.1
setb p2.1

here:jb p2.2,here
clr p2.0
clr a
mov a,p1
acall conv
acall dis
setb p2.1
sjmp adc

conv: movb,#10
div ab
mov r7,b
mov b,#10
div ab
mov r6,b
mov r5,a
ret



disp: mov a,r5
acall send
mov a,r6
acall send
mmov a,r5
acall send
ret


send:eek:rl a,#30h
mov sbuf,a
here1:jnb ti,here1
clr ti
ret



this is executed today and i got output as 014 013 015 016 017 so on



plz tell me what is the problem for not getting the exact values
i want as roo emperature

and i am using lm35 and adc 0804
adn 89s52
and serial communicatioon



plzzzzzzzz do something fast

Added after 2 minutes:

my email is jvr_finite_cvr@yahoo.com
 

here is my project. adjust the potentiometer so that u get 1.28v at pin number 9.

compile using mide software, its available in my website


Code:
; (c) elabz.in

; free8051projects.blogspot.com

$NOMOD51
$INCLUDE (89S52.MCU)


ADCSTART		EQU	P3.6
ADCDATA			EQU	P2



ORG 0H
JMP MAIN


ORG 30H
MAIN:
	CALL INIT

	MOV R1,#0
AGAIN:	
	MOV A,#0CH
	CALL TX
	MOV DPTR,#MES1
	CALL MESSSEND
	MOV DPTR,#MES2
	CALL MESSSEND
;	CALL DELAY
	MOV A,P2
	MOV B,#100
	DIV AB
	ADD A,#30H
	CALL TX
	MOV A,B
	MOV B,#10
	DIV AB
	ADD A,#30H
	CALL TX
	MOV A,B
	ADD A,#30H
	CALL TX
;	MOV A,#20H
;	CALL TX
	MOV A,#60H
	CALL TX
	MOV A,#43H
	CALL TX
	CALL DELAY
	JMP AGAIN


INIT:
	CLR ADCSTART
	CALL DELAY
	SETB ADCSTART
	MOV TMOD,#21H;;;;;;;;;;;;;9600BAUD RATE,8-BIT,1-STOP BIT;;;;;;;;;;;;;;
	MOV TH1,#0FDH
	MOV SCON,#50H
	SETB TR1
RET
MESSSEND:
	DD1:CLR A
	MOVC A,@A+DPTR
	CJNE A,#0FFH,CONT1
RET
CONT1:
	MOV SBUF,A
	JNB TI,$
	CLR TI
	INC DPTR
SJMP DD1

TX:
	MOV SBUF,A
	JNB TI,$
	CLR TI
RET


DELAY:
        MOV R7,#10D
	L2: MOV R6,#100D
L1:
	CALL DEL
	DJNZ R6,L1
	DJNZ R7,L2
RET
 
DEL:
	CLR CPRL2
	CLR CT2
	MOV TL2,#7CH
	MOV TH2,#0FCH	
	SETB TR2
	JNB TF2,$
	CLR TR2
	CLR TF2
RET;

MES1:	DB	09H,09H,"TEMPERATURE MEASUREMENT AND DISPLAY IN PC ",0AH,0AH,0DH,255
MES2:	DB	"THE TEMPERATURE IS : ",255

END



regards
kj
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top