Discussion in "Project Doubts" started by    Chinmay Das    Mar 10, 2009.
Thu Mar 12 2009, 09:14 AM
#11
comnwrt:                      	;send command to LCD
	MOV LCDDATA, A		;copy reg A to port1
	CLR RS			;RS=0 for command
	CLR RW			;R/W=0 for write
	SETB E			;E=1 for high pulse
	MOV R3,#50
REG_3:	
	MOV R4,#255
	DJNZ R4,$
	DJNZ R3,REG_3
	CLR E			;E=0 for H-to-L pulse 
	RET


datawrt:                    ;write data to LCD
      MOV LCDDATA, A    ;copy reg A to port1 
      SETB RS            ;RS=1 for data
      CLR RW      		;R/W=0 for write
      SETB E			;E=1 for high pulse
	  MOV R3,#50
REG_4:
	MOV R4,#255
	DJNZ R4,$
	DJNZ R3,REG_4
	
    CLR E			;E=0 for H-to-L pulse
    RET    


lcddelay:			;Delay routine for LCD
	MOV R3, #50   
here2:MOV R4, #255  
here3:DJNZ R4, here3 ;stay until R4 becomes 0
	DJNZ R3, here2
     RET


as u see here itz only mention in d coment part.
Thu Mar 12 2009, 09:16 AM
#12
can you attach the code here?
Thu Mar 12 2009, 09:21 AM
#13
sir here is d file .......u asked.
Attachment
Thu Mar 12 2009, 09:36 AM
#14
the code is fine.. in the schematic, P0.0 is connected to D7 i guess and P0.7 connected to D0. which means they are inverted or connected wrongly. Please make them
P0.0 to D0
to
P0.7 to D7

I am sure you will see what you want on LCD.
 Chinmay Das like this.
Thu Mar 12 2009, 09:43 AM
#15
r u sure sir, coz some hs advice me b4 dat. oky den i will chk it. n reply u very soon.


[ Edited Thu Mar 12 2009, 09:44 AM ]
Thu Mar 12 2009, 06:31 PM
#16


the code is fine.. in the schematic, P0.0 is connected to D7 i guess and P0.7 connected to D0. which means they are inverted or connected wrongly. Please make them
P0.0 to D0
to
P0.7 to D7

I am sure you will see what you want on LCD.

Ajay



Thanks a lot Ajay sir :-). u noticed d exact pt. i changed connection n my LCD starts working !dance ............ i chk out no of results on it. den i discoverd uC is nt fetching out updates 4m ADC. i think der is som problem in connection in between ADC n uC. i dnt know wht exactly happening wid it. after connecting every sensors 2 ADC , itz showng default values on LCD. n also d mode change is nt working , means itz nt showing d actuators status . even at ambient condition uC showing d exteam high(HOT) n extream low(cold) contion results. it think der is prob in P1 n P3 section. i need some more research on it 2 find out the exact fault.

1. Default


2. LOWest values


3.High


4.Higher


5.Extream condition


i will reply 2 thread wid my next researchs......

till den bye gdnt.
Fri Mar 13 2009, 07:18 PM
#17
Hey,
Sorry for coming in so late. I am a bit busy cos of an internship I have just got and it is a disaster of sorts!
Coming to the project, firstly I must say am so happy to see it working feels great!!!

I did not understand what exactly is the problem u are facing now?
Regarding the mode switch please check if the interrupt code is right. Starting from the masking/ unmasking to the ISR.
Regarding the sensors, are all of them behaving like this or just the temp sensor? Does the o/p vary (fluctuate) by itself without you changing the temp around the LM35?
First tell me have you checked each sesnor's voltage o/p individually? Do they give you correct outputs? If yes then have you checked the o/p of the ADC for each sensor individually in stand alone mode?
I have not been following your progress here that is why I am asking. If you have done both these things and got the exact o/p then there seems to be a serious mistake in my code!
Sat Mar 14 2009, 06:41 AM
#18
hello amit ,
good 2 see u alfter long tim..... n belated happy holi......

coming to the project.
1.i hv chked every sensors manualy......n de r working perfectly, i m getting exact voltage output on multimeter according 2 the atmospheric condition.
2. i hv nt chk d ADC ouput 4 sensors in stand alone mode.
3. i m using AT89c52 , insted of using AT89s52.....means i m using preceder one.
4.o/p of LCD is nt fluctuating, itz showing values constantly. whn turn off ckt n on it again itz showing another o/p constanly, bt nt varing timly i mean to say itz nt showing d intant readings of sensors.
5. if i turn off d power only to ADC ckt(nt d Uc ckt) , den in disply itz showing





and if i on d ADC ckt , itz showing d defalut value.
Note: Itz also d same o/p if i only give power 2 uC ckt without interfacing the ADC wid uC ckt.



so i hv no idea whr is d fault........i hv tried my best 2 expalin d things....i hope u will reply me soon

Sat Mar 14 2009, 04:42 PM
#19
Hey. Thanks and happy holi to you too.
See you should always go step by step otherwise detecting the error will be a herculean task. Now you know the sensors are right. Next you need to know if your ADC is working! Have you tested it? Do you know what kind of o/p is it giving? Do this:
1. Run the ADC in stand alone mode. Connect 1 sensor to it (LM35 should be the easiest) Give the requisite control signals and check the digital o/p. Is it matching to the analog i/p?
2.This way check all the 4 i/p pins of the ADC that you are using. If it works fine till here then please try the other 3 sensors also individually (at any 1 i/p pin should suffice).
3. If this is also right then check the look up table. For any 1 of the digital o/p you got what is the value stored in the LUT which will be displayed?

You said the screen does not change at all after the data is 1st displayed, right? Look at it closely, can you see the cursor moving below at regular intervals?
Have you been able to correct the problem with the mode display switch?
Sun Mar 15 2009, 06:25 AM
#20
hello amit..

i also feel d same, need 2 chk every sensor in stand alone mode. bt i hv never done dis b4, i dnt hv any bred board only i hv a multimeter, so i vh no iead hw 2 run ADC in stand alone mode.

If this is also right then check the look up table. For any 1 of the digital o/p you got what is the value stored in the LUT which will be displayed?

I ddnt get u on d over quote, n Wht is dat Look up Table.

You said the screen does not change at all after the data is 1st displayed, right? Look at it closely, can you see the cursor moving below at regular intervals?



yes i hv noticed dat cursor is moving.....bt itz nt showing d even room temp. dis all above readings at room temp, each tim i On d whole ckt it shows a different value.....
and abt the mode display der is another disscussion is going on in the forume chk out this link, and also reply 2 dis thread der also..as i m closeing disscussion here.

http://www.8051projects.net/forum-t19717-last.html

Get Social

Information

Powered by e107 Forum System

Conversation

Mon Jan 16 2017, 03:15 PM
Rutuja
How can we read notepad file using random acess file
Fri Jan 06 2017, 06:18 AM
muhammad Umar
i need cd4047 library file for protious please help me i s
ExperimenterUK
Wed Jan 04 2017, 09:01 PM
@Emin what is your site user name ?
Tue Jan 03 2017, 11:16 PM
Emin
Emin: I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Tue Jan 03 2017, 11:15 PM
Emin
I'm already a member since 2012 and entered repeatedly during period. But now it is impossible and obtaining a new registration is also failed. The same error message specifying that two e-mails i entered are different!. In fact thaey are the same. Now, what will be happen, what is your solution? Thanks..
Sun Jan 01 2017, 03:14 PM
Manoranjana Chary
Write an embedded program of increment and decrement in LCD connected to two keys of int1 and int0. Can u please send me the code for this as fast as possible because i need to submit it in college kindly
ExperimenterUK
Sat Dec 31 2016, 06:28 PM
Happy New Year everyone
ExperimenterUK
Sat Dec 31 2016, 06:27 PM
Please post questions in the forum, the chat box is for chat
Thu Dec 29 2016, 07:47 AM
drashti ranolia
can anyone help me for the microcontroller 8051 programming code for street lights that glow on vehicle movement using IR sensors ?
Tue Dec 27 2016, 11:45 AM
Shubhangi
Do we have to write lookup table for d6t thermal sensor?

Downloads

Comments

jmunjr
Tue Jan 17 2017, 06:25 PM
sarfrosh92
Sun Jan 15 2017, 09:18 AM
Deepakvaishu
Wed Jan 11 2017, 10:25 AM
rana_jee773
Sat Dec 10 2016, 11:22 AM
[email protected]
Thu Dec 08 2016, 11:02 AM
Jonathan.kei
Mon Nov 21 2016, 04:30 PM
AVRuser1
Sun Nov 20 2016, 06:07 PM
JaguarPaw
Thu Nov 17 2016, 07:44 PM

Online

Guests: 25, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37797
Newest member: jmunjr
Forum Activity
jmunjr Avatar
Posted By jmunjr
Wed Jan 18 2017, 01:23 AM
Digital cameras have a viewfinder, had you conside...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jan 18 2017, 01:19 AM
Digital cameras have a viewfinder, had you conside...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jan 18 2017, 01:12 AM
Quotes can be tricky, but this should work.char *p...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jan 18 2017, 12:56 AM
Here is a new version that works on the circuit y...
jmunjr Avatar
Posted By jmunjr
Tue Jan 17 2017, 06:41 PM
Hi, I have been searching to find examples of a li...
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 08:31 AM
you are right ..I should not include '\' at t...
Deepakvaishu Avatar
Posted By Deepakvaishu
Mon Jan 16 2017, 06:07 AM
No ,its not the null character, its just the '...
sankalp_s Avatar
Posted By sankalp_s
Sun Jan 15 2017, 07:55 PM
There is a fault in your Proteus design.If you loo...
sarfrosh92 Avatar
Posted By sarfrosh92
Sun Jan 15 2017, 10:04 AM
The 8051 Microcontroller (3rd Edition) by I. Scott...
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Jan 14 2017, 11:59 PM
The site editor may have removed the 0 from \0.Actually it should not be needed, sochar *phone_no[3 ]={"1234567890" ," 9087654321" ,"76676667676"}; //array of pointers should work.