semiconductor
Full Member level 4
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 ) 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:
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!
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 ) 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!