Jump to content
OzGrant

[Energia Library] OneWire DS18B20 (430 & Stellaris)

Recommended Posts

@@SloMusti, any comment on that error:
test_sensors.ino:28:8: error: 'class DS18B20' has no member named 'InitGPIO'

 

its from that line: ds.InitGPIO();

 

Am I missing something?

 

thanks in advance

Share this post


Link to post
Share on other sites

Hi, i am using MSP430F5529 launchpad and DS18S20. I am trying to make it work, but search returns 1. So no devices found. I only get this.

 

G'day StellarisOW
ret=(1) No more addresses.
From array
 

I have checked the connections to make sure they are right.

The data pin is connected to pin P3.6

 

Any help please??

Share this post


Link to post
Share on other sites

I'm not able to run the demo code as parasitic. What should I do to make it working? Thank you

@@hawwwran, I realize that your question is old but I have your answer for you.

 

You can operate the ds18b20 in parasitic mode for all normal interactions except temperature conversions and EEPROM programming. During those operations, parasitic mode requires that you apply a strong pull-up to DQ in order to supply extra energy to the device via the DQ pin.

 

It would seem that these energia libraries expect the device to operate in three wire mode only. That means, wire the device fully with Vcc, DQ and GND.

Share this post


Link to post
Share on other sites

Hi, i am using MSP430F5529 launchpad and DS18S20. I am trying to make it work, but search returns 1. So no devices found. I only get this.

 

G'day StellarisOW

ret=(1) No more addresses.

From array

 

I have checked the connections to make sure they are right.

The data pin is connected to pin P3.6

 

Any help please??

What is your cpu clock speed set to?

Do you have a logic analyzer to inspect the signals?

Did you wire up the sensor in three wire mode?

 

The simplest one-wire test is to do a one-wire reset and see if the device responds with a presence pulse.

Share this post


Link to post
Share on other sites

What is your cpu clock speed set to?

Do you have a logic analyzer to inspect the signals?

Did you wire up the sensor in three wire mode?

 

The simplest one-wire test is to do a one-wire reset and see if the device responds with a presence pulse.

 

My cpu speed is 16MHz, and i do not have a logic analyzer, sorry. I am using the three wire mode to wire up the sensor.

If the return is 1, does it mean that the device does not pull down the pulse when a reset happens??

Share this post


Link to post
Share on other sites

@@Grandthau, you said that you put DQ on P3.6.  Have you told the GFDS18B20 library where to find your temperature sensor?

I constructed an object of class DS18B20 and gave the pin as a parameter. Do i have to change anything else?

After that i change the family code to 0x10h which is the code for DS18S20 sensors. But the program never reaches this point of course...

Share this post


Link to post
Share on other sites

I am not an energia user so we may have to ask an energia user to pipe up here.

 

In CSS, I would have to setup both the pin number and the port number in C code so that the functions would know where to find the sensor.

 

So, the missing information is how to tell energia what port the sensor is on.

 

Figure that out and it ought to work.

Share this post


Link to post
Share on other sites

Did any of you guys verify the correctness of the temperature?

 

I am using DS18S20, and while i do get a temperature reading, its a few degrees off.  I am running the same sensor on the raspberry pi and its pretty close to ambient temp. 

 

Share this post


Link to post
Share on other sites

Which sensor are you using?

 

There are two different temperature sensors being discussed in this thread - the DS18B20 and the DS18S20. 

 

The math to compute the temperature is slightly different for each sensor.

 

Concerning accuracy, the Dallas sensor is amazingly accurate. I have never seen one that was as bad as, say, the internal temp sensor of the MSP430 (+/- 2 degrees). 

Share this post


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...