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.

How to interface LM335 with AD0804?

Status
Not open for further replies.

semiconductor

Full Member level 4
Joined
Apr 4, 2003
Messages
236
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Activity points
2,735
lm335 project

I'm planning to implement a project using AT89C51 and LM335. It is intended to measure the ambient temperature and then, if it's hotter than 27 degree centigrade, the system will turn on a fan (for example :D ) and if it's cooler than 27 degree centigrade, it will turn on the heater.

I'm facing some problem that really need your helps:

1. I don't understand the pin ADJ of LM335

2. How can I calibrate and interface the LM335 with the input of AD0804 so I can receive 8-bit result at the output of AD0804 satisfy the condition: Zero degree centigrade corresponds to the byte 0x00.

3. (maybe trivial question but I need your help as a novice): How can import the port 1 value of AT89C51 into AL reg (or other variables declared in the program using C language (Keil uVision) and how can export a byte to Port 1 using C language?

4. Why this code can delay 1ms:

Code:
int i;
for (i=0; i<8; i++)

due to the code above, i will be increased 8 times by 1. each time of increasing is equal to 1/8 ms ??? or 125 us??? why???

Thank you in advance!
 

lm335 centigrade

4. Why this code can delay 1ms:
(Empty loop, 8 times)

...

each time of increasing is equal to 1/8 ms ??? or 125 us??? why???

Even if the loop is "empty", it needs some time to run through this empty loop for the processor.

If you have an optimizing compiler, then thise empty loop might be removed, as there is no statement inside (except teh counter incerement)

The delay time depends of the clock rate. Its a very easy way to program delays in this way, but its not excat - even if you may calculate the clock and cycle time of your processor. Reason: There might be some interupts, forcing to execute the interupt routine first, and then the delay time is no more deterministic.
 

ad0804

Please read this before starting a topic:
How To Ask Questions The Smart Way & How To Answer Questions in a Helpful Way


Especially read this part:
Use meaningful, specific subject headers
http://www.catb.org/~esr/faqs/smart-questions.html#bespecific



"I need your help" is a bad topic title, please change it to somthing meaningful!
 

calibrarea la lm335

@me

I thought it might be usefull to answer to the original poster / posting. I have not expected that you pee me for the wrong "re: xxx" subject line - its not mine, its based on the topic of the original poster. Better you whack him instead of me ????
 

lm335

He "ME that is" didn't mean you!
He meant the original poster but he cannot put his post before yours!

You were trying (and probably did) to help which is a good thing!!!
Don't worry ;-)

Antharax

---
btw: I think we should have a rule about names too. ME isn't a good name. Read the first line again ;-) (too many pronouns)
just kidding!
 

lm335 at89c51

My post was adrressed to "semiconductor", not "nerd77".

The problem is if everybody starts a topic with a header like "I need help".
The board would become a big mess if everybody uses useless headers that says nothing about the contents of the problem.

We could have 20 pages of topics that only contains topics like "please help", "I need a book", "good link" etc.
I would become a nightmare to navigate the board.
It's always important to use a precise and good header, that explains as precise as possible what the contents is.


If a guy uses the topic title like "please help" and then ask about a problem with for example C programming, then everybody had to open the topic to see what is about. Also all the guys that don't know anything about c programming at all, but maybe only knows basic or assembly programming would have to open the topic, just to find out it was waste of time for them to open the topic, because they can't be to any help anyway.


You should at least have mentioned LM335 in your topic title.

I hope you can all see why it's important to use specific and precise topic titles, so it doesn't becomes a nightmare to browse or moderate the forums.
 

lm335 problem

@me

I totaly aggree with your opinion about proper topics. Look at a few of my replies to postings : I also give the posters the hint NOT to use that subject lines like "wow!", "good idea?" or similar.....
 

i need code by builder C++ for LM35
i know , i should use timer and range between the temperature but i don't know how???????
i need help me plzzzzzzzzzzzzzzzzzzzzz
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top