Ds18b20+dc motor + 8051 +asm

Status
Not open for further replies.

chari

Newbie level 1
Joined
Dec 16, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
Hello,

I'm having problems understanding how the ds18b20 works.

My project is:

I want to control a DC motor according to the temperature of the sensor. If is too hot, the motor will spin more quickly and if it is colder the motor will spin more slowly.
Does anyone know how to implement this project using assembler and 8051?

thanks in advance!
 

Ive done a simple project using C# during my undergrad last year! I developed a PID controller to set the temperature!

Not sure about how to implement that using DS18b20. Theres a lot of help available on-line on temperature controllers though! Good Luck
 

TEMPERATURE (°C) DIGITAL OUTPUT (BINARY) DIGITAL OUTPUT
(HEX)
+125 = 0000 0111 1101 0000 = 07D0h
+85= 0000 0101 0101 0000 = 0550h
+25.0625 = 0000 0001 1001 0001 = 0191h
+10.125= 0000 0000 1010 0010 = 00A2h
+0.5 = 0000 0000 0000 1000 = 0008h
0 = 0000 0000 0000 0000 = 0000h
-0.5 = 1111 1111 1111 1000 = FFF8h
-10.125 = 1111 1111 0101 1110 = FF5Eh
-25.0625 = 1111 1110 0110 1111 = FE6Fh
-55 = 1111 1100 1001 0000 = FC90h

you try to make the code ... for example if its temperature is -55C means the value is hex FC90H (cold) and+125C=07D0H(hoT)...

start:
cjne a,#FC90H,hot
routine fast motor:
.........
.......
hot:
cjne a,#07D0H,start
routine slow motor:
......
.......

end
 

Attachments

  • DS18B20.pdf
    255.8 KB · Views: 75

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…