Jump to content

[Energia Library] OneWire DS18B20 (430 & Stellaris)

Recommended Posts

I am using DS18S20, and supposedly I'm doing the right math for it.  I am simply comparing the same sensor type readout between two platforms (raspberry pi vs TM4C1294) .


Almost always on tiva c its 2-3+ degrees hotter. So I'm wondering why the difference between two exactly identical sensors (i'm pointing fingers at the platform/library).  As you say the sensor is very accurate so I'd expect to see both readouts within a degree of each other.  


I've been running multiple DS18S20 sensors on a Pi and the output is more close together when they are reading the same area.


Great work on the library btw! Its a very good starting point.

Link to post
Share on other sites
  • Replies 85
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

G'day, I now have a working Dallas Library that works on both 430 and Stellaris using Energia IDE. Have fun. Grant StellarisDS18B20.zip

Opps, zip file now attached GFDS18B20.zip

Tks Pivden, Yes your correct, no idea how the microsec's snuck through, they seem to do that at 2AM. Have updated the zip file. Tks again GFDS18B20V2.zip

Posted Images

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.

It is the same thing. If you write P3_6 it means 29 in Energia. That is not the problem and did not solve the problem...


I am a rookie, i really do not know how to fix it..


Do you know how to do this in CCS????? That would be really great for me if anyone could help me do this in CCS..

Link to post
Share on other sites

Yeah, sure. Check out this thread where we worked out all the details on how we got a DS18B20 and a DS18S20 working.


Thank you very much!!! I am trying to make it work with my MSP430f5529, but some variable names are not the same(obviously). Could you explain these lines for me?


#define UART_TXD 0x02 // TXD on P1.1 (Timer0_A.OUT0)

#define UART_RXD 0x04 // RXD on P1.2 (Timer0_A.CCI1A)

#define UART_TBIT_DIV_2 (16000000 / (9600 * 2))

#define UART_TBIT (16000000 / 9600)



All the timer_UART names are wrong(undefined). How do you fix this?? :wacko: :sad:

Link to post
Share on other sites
  • 2 weeks later...

Yeah, that code was written for the 2231 I believe. We had to bit bang the uart on it. The 5529 has a couple hardware uarts.


Give me some time to get you some sample code for the 5529 instead.


I'll be back!



Any luck?? What if you do not use the uart interface of 5529 and bit bang another one, just like you did with 2231...

Link to post
Share on other sites
  • 2 months later...
  • 1 month later...
  • 5 weeks later...

Join the conversation

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

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