Jump to content
43oh

1-wire pins


Recommended Posts

Sorry it doesn't have a dedicated 1-wire port but you can create one.

 

Search the forum for ds18b20 and it will give you lots of results. We've been working on 1-wire stuff a lot this year.

 

Feel free to ask us questions and we'll guide you in the right direction.

Link to post
Share on other sites
Sorry it doesn't have a dedicated 1-wire port but you can create one.

 

Search the forum for ds18b20 and it will give you lots of results. We've been working on 1-wire stuff a lot this year.

 

Feel free to ask us questions and we'll guide you in the right direction.

 

 

how is it possible ? well i was searching for it but all is about code and didnt find nothing about "creating 1-wire"

 

please some details. very thanks for replaying! :)

Link to post
Share on other sites

before posting it i was reading a lot and i hope now i will get more usefull info... ;/

 

i didn't find anything about solding goldpins to create 1-wire or dunno what else possibilities are there... neither i found nothing about any extra parts to my launchpad to make 1-wire

 

it's my first time with 1 wire and my launchpad dont support it, and u guys r giving me search results with posts with lots of code when i even dont know how to make my launchpad supporting 1-wire, great! :!!!:

 

 

there are many examples with dallas 18b20 so lets take it as example

from datasheet i found out that it has 3 lines like GND, Vcc and DATA_LINE

so if i connect it like that to my launchpad

gnd to gnd + vcc to vcc + data_line to any free port like P2.0

and it will be working ok ? so where is idea of 1-wire here ? stiupid imo if it's ok...

Link to post
Share on other sites

First of all, can you tell us what are you trying to achieve? What's your objective?

1-wire is a simple bus system and practically all MCUs can support it. Also, since 1-wire is implemented in software (there's no hardware module for that,) any pin can be used. The only extra parts that you may need are transistor and couple of resistors.

 

It's called one wire because all communication occurs over one wire. You always need GND which is the second wire, but you do not count it. Vcc can come from the master (MCU) in which case you add 3rd wire (which you also do not count,) or from another source on the sensor side, like a battery.

Link to post
Share on other sites

Today i bought DALLAS DS18B20 to use 1-wire.

 

I need to do any program for classes that uses 1-wire, so by reading forum i chose temperature sensor DALLAS 18B20.

 

As far as I said I am using on my classes launchpad MSP-EXP430G2, so how to make it working ?

 

If I got 3 pins on sensor like GND, VCC, DATA LINE so i can simply put them as

gnd (from sensor) to gnd (on launchpad)

vcc (from sensor) to vcc (on launchpad)

data line (from sensor) to (free port) P2.0 (on launchpad)

 

and run sample application, will it be working correctly ?

Link to post
Share on other sites

How much of the DS18B20 datasheet have you read? Really? If it was more that five pages you'd

know the answer to your question (yes, the answer's on page 6). Anyhoot, you will need a 4k7 pullup

resistor 'tween your data line and Vcc otherwise the 18B20 can't talk back to the controller.

 

It's always good to check out the datasheets for whatever parts you're planning to interface with, OK?

 

-Rusty-

Link to post
Share on other sites
How much of the DS18B20 datasheet have you read? Really? If it was more that five pages you'd

know the answer to your question (yes, the answer's on page 6). Anyhoot, you will need a 4k7 pullup

resistor 'tween your data line and Vcc otherwise the 18B20 can't talk back to the controller.

 

It's always good to check out the datasheets for whatever parts you're planning to interface with, OK?

 

-Rusty-

 

I got today 4k7 resistor but there are some problems with using temp sensor, becouse i dont know a few things :P

 

supu.png

 

Is uP any CPU free port like P2.0 ?

 

What is Vpu on that image ?

 

How to connect resistor 4k7 ohm to data line ? I dont know and didnt find it online... do i have to use to do it any special cable or what ?

Link to post
Share on other sites
How much of the DS18B20 datasheet have you read? Really? If it was more that five pages you'd

know the answer to your question (yes, the answer's on page 6). Anyhoot, you will need a 4k7 pullup

resistor 'tween your data line and Vcc otherwise the 18B20 can't talk back to the controller.

 

It's always good to check out the datasheets for whatever parts you're planning to interface with, OK?

 

-Rusty-

 

I got today 4k7 resistor but there are some problems with using temp sensor, becouse i dont know a few things :P

That's what the datasheets are for -- you to learn and know a few more things. So put that tongue back into your smiley!

 

supu.png

 

Is uP any CPU free port like P2.0 ?

Yes, any digital output pin.

 

What is Vpu on that image ?

Vdd or the processor's supply voltage will work so long as it does not exceed the maximum voltage

for the 1-wire device or the uP's output pin. The DS18B20 can work from 3.3-volts from the LP's supply.

Best to keep this at no more than the uP's Vcc for fear that it can zap the pin if it's too high. There are

cases where open collector pins can handle higher voltages but... unless you know, keep it at no more

than the supply voltage.

 

How to connect resistor 4k7 ohm to data line ? I dont know and didnt find it online... do i have to use to do it any special cable or what ?

No, it is used to apply positive voltage to the data line -- no special cables are needed. The data line is

supposed to be driven to ground (0-volts) or high impedence (open collector). The resistor allows the data

line to go to positive voltage when the output goes open collector. The open collector state also permits

the 1-wire device to talk back or respond to the uP, say with the temperature reading requested. Using open

collector states prevents either device on the data line from accidentally shorting the other device's pin by

applying the opposite voltage, say when the uP is grounding the line and the 1-wire device wants to drive the

dataline high.

 

-Rusty-

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...