Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Digital Output readings from DS18B20


  • Please log in to reply
1 reply to this topic

#1 mutsop

mutsop

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 17 January 2012 - 11:12 PM

Hi,

I finally received my Netduino+ after 2 weeks :D
I got my onboard button and led to work, an external led too, and now I'm at my temperature module...

I got everything connected as stated here for the arduino http://bildr.org/201...s18b20-arduino/
but I can't figure out how I can retrieve data from my module.

I suppose I should be using the instantiation of
OutputPort TemperatureSensor = new OutputPort(Pins.GPIO_PIN_A4, false);
but then what?

After reading the datasheet of the module I came across:

digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and
has an alarm function with nonvolatile userprogrammable upper and lower trigger points.


So I should be getting a 9 or 12 bit number... but in what? 10digit? hexa? I dont suppose binary.
And how about the userprogrammable upper and lower?

If someone can push me in a right direction :) I suppose every reading of any outputting module would be programmed like this. Also if possible I rather have code without extending any external classes (just to learn about it) afterwards I might be using some of em.


Kind regards

#2 OppaErich

OppaErich

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationEssen, Germany

Posted 18 January 2012 - 09:10 AM

You get two byte using One-Wire serial communication. If there is no library already, you have to build your own. One-Wire is well documented in the DS18B20 datasheet and there are some application notes at Maxims website. I've just started doing this for msp430s - have fun. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.