PDA

View Full Version : Pic12f629-i/p



karenhornby
- 13th June 2008, 19:59
Is it possible to interface a DS18b20 to a PIC12F629-I/P?
What I want to do is possible is have 1 ds18B20 as an input and 4 outputs simple transistor switches that go high and or low depending on the temperature of the DS18B20

Acetronics2
- 13th June 2008, 20:02
Hi, Karen

VCC, VDD + 4 Outputs + 1 input = 7 pins ...

One pin left for what you want !

Alain

skimask
- 13th June 2008, 20:07
Is it possible to interface a DS18b20 to a PIC12F629-I/P?
What I want to do is possible is have 1 ds18B20 as an input and 4 outputs simple transistor switches that go high and or low depending on the temperature of the DS18B20
Search here for 18B20 brings up over 50 hits...most with code...and the PBP manual says OWIN/OWOUT will work on 12F series PICs, with a couple of notes.

karenhornby
- 13th June 2008, 20:12
Search here for 18B20 brings up over 50 hits...most with code...and the PBP manual says OWIN/OWOUT will work on 12F series PICs, with a couple of notes.

I know the code for the DS18B20 thanks so hopefully wont need any help with that, and hopefully the pic will have enough space for it lol
What i wasn't sure was if the ds18b20 would "talk" to the pic, still new at all this and learning as I go sorry

One thing you could help me with if you dont mind me asking questions again
If I wanted to monitor a range of temp's and enable an output only between 2 temp's i.e. a pin go high only between 30ºC and 50ºC but as I'm not using an LCD display to display the temp, how would I do that?
i've done it before using an lcd but I'm not sure if the same works or not when you dont have an lcd connected or displaying the temp

skimask
- 13th June 2008, 20:23
If I wanted to monitor a range of temp's and enable an output only between 2 temp's i.e. a pin go high only between 30ºC and 50ºC but as I'm not using an LCD display to display the temp, how would I do that?
i've done it before using an lcd but I'm not sure if the same works or not when you dont have an lcd connected or displaying the temp

Use a Red/Green bicolor LED, or maybe continuously flash an led on the output, have it output a series of pulses relating to the actual temperature.
If you've got an o'scope, you could output a pulse corresponding to the temp (i.e. 50C = 50ms pulse).

karenhornby
- 13th June 2008, 20:25
Last of my stupid questions for today, can I just tell the led to light when it gets to say 30ºC and go off at 50ºC?

skimask
- 13th June 2008, 20:50
Last of my stupid questions for today, can I just tell the led to light when it gets to say 30ºC and go off at 50ºC?

Quite frankly, it depends on whether or not you can figure out how to code it that way or not.

Let me add on to that statement a bit...
It depends on whether or not you can write the correct code to read the temperature output from a DS18B20 and create a single or pair of IF/THEN statements to either set or reset the port pin that the LED is connected to.