Rickta59 589 Posted February 20, 2013 Share Posted February 20, 2013 For what it's worth, I was able to use this successfully with P2_0. Thanks! -rick Quote Link to post Share on other sites
arvo 0 Posted February 20, 2013 Share Posted February 20, 2013 Thanks for all, i just switch to hardware UART, and this work's fine, but can't find DS18B20... :-( Quote Link to post Share on other sites
pivden 6 Posted February 20, 2013 Share Posted February 20, 2013 check the hardware: Vcc to Vcc GND to GND DQ (DATA) to P2.1 resistor (4.7K or 2-6K) from Vcc to P2.1 P2.1 defined in code: #define OWPIN 9 https://github.com/energia/Energia/wiki/Hardware#wiki-LaunchPad_MSP430G2553 pinouts: http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf Figure 5. Powering the DS18B20 with an External Suppl elpapais 1 Quote Link to post Share on other sites
arvo 0 Posted February 21, 2013 Share Posted February 21, 2013 pivden, big thanks! The problem was in my resistor! To Mr. OzGrant: Your library working good, thanks! Quote Link to post Share on other sites
moderboy 1 Posted March 26, 2013 Share Posted March 26, 2013 Is there any solution to use this code with DS18S20 sensors? Quote Link to post Share on other sites
OzGrant 22 Posted April 7, 2013 Author Share Posted April 7, 2013 Moderboy, Sorry taken so long to get back. Have got DS18 code on my other old PC. Will dig it up and put in ASAP.. Grant Quote Link to post Share on other sites
maksms 0 Posted April 24, 2013 Share Posted April 24, 2013 del Quote Link to post Share on other sites
mahmutbeg 0 Posted June 4, 2013 Share Posted June 4, 2013 Hi, I'm trying to get this code(sample code from archive) running on my launchpad, but all I'm getting is OW1=85C (when I use parasite wiring), and not recognizing device when I use external supply wiring .. Quote Link to post Share on other sites
Register 3 Posted June 14, 2013 Share Posted June 14, 2013 Hi, The result is an int but the 18b20 has more resolution than 1 degree, no? Regards. Quote Link to post Share on other sites
jxlbbb 2 Posted November 12, 2013 Share Posted November 12, 2013 Hi, Here is a small change to StellarisOW.ino that will provide full resolution without adding floats. the binary size remains very small : Binary sketch size: 4,771 bytes (of a 131,072 byte maximum) (MSP430F5529) : change byte result[MAXOW+5]; to int32_t result[MAXOW+5]; change the saveTemperature(uint8_t ROMno) routine to void saveTemperature(uint8_t ROMno){ result[ROMno] = (int32_t)((data[1] << 8) | data[0]); } change Serial.print(result); to prt2((result*625)/100); add the prt2 routine void prt2(int x){ Serial.print(x/100); Serial.print("."); Serial.print(x%100); } output is now OW1=20.56C OW2=20.62C Hope this will help some ! jxlbbb OzGrant and yosh 2 Quote Link to post Share on other sites
OzGrant 22 Posted January 7, 2014 Author Share Posted January 7, 2014 jxlbbb,Yup that works great Grant Quote Link to post Share on other sites
Marco 0 Posted February 14, 2014 Share Posted February 14, 2014 Hi, I work with texas launchpad MSP430G2553 and DS18B20. I download GFDS18B20V2.zip and I follow the instructions. I use a 4.7k resistor pull-up. My problem is that I can't find the device. Anuone help me? Thanks. Quote Link to post Share on other sites
pane 0 Posted March 29, 2014 Share Posted March 29, 2014 G'day, I now have a working Dallas Library that works on both 430 and Stellaris using Energia IDE. Have fun. Grant Hi OzGrant! Thank you for the usefull OW library (I use it to read DS18B20). It works great for me on MSP430G2553. The same code with new Energia 0012 and TM4C129 LaunchPad gives me the following error msg C:\DOCUME~1\Mama\LOCALS~1\Temp\build596613283320066190.tmp\core.a, -LC:\DOCUME~1\Mama\LOCALS~1\Temp\build596613283320066190.tmp, -lm, -lc, -lgcc, -LC:\DOCUME~1\Mama\LOCALS~1\Temp\build596613283320066190.tmp, -lm] GFDS18B20V2\GFDS18B20.cpp.o: In function `DS18B20::DS18B20(unsigned char)': C:\Documents and Settings\Mama\Dokumenty\Energia\libraries\GFDS18B20V2/GFDS18B20.cpp:46: undefined reference to `port_to_dir' C:\Documents and Settings\Mama\Dokumenty\Energia\libraries\GFDS18B20V2/GFDS18B20.cpp:46: undefined reference to `port_to_ren' C:\Documents and Settings\Mama\Dokumenty\Energia\libraries\GFDS18B20V2/GFDS18B20.cpp:46: undefined reference to `port_to_input' C:\Documents and Settings\Mama\Dokumenty\Energia\libraries\GFDS18B20V2/GFDS18B20.cpp:46: undefined reference to `port_to_output' collect2.exe: error: ld returned 1 exit status Thanks for help or hint, Pavel Quote Link to post Share on other sites
OzGrant 22 Posted March 29, 2014 Author Share Posted March 29, 2014 Pavel, Will have a TM4C129 in a couple of days and check it out. Grant Quote Link to post Share on other sites
jeffman54 0 Posted April 2, 2014 Share Posted April 2, 2014 This problem seems to be caused because the defined macros portDirRegister, portRenRegister, portInputRegister, and portOutputRegister in GFDS18B20.cpp refer to arrays port_to_dir[], port_to_ren[], port_to_input[] and port_to_output[] which are normally externally defined in the msp430 pins_energia.h file. The current TM4C129 pins_energia.h file found under the lm4f/variants/launchpad_129 directory doesn't define these arrays and appears to use a totally different base referencing scheme for the pin ports. I think it will take a bit more work to get the port register mechanism used for the MSP430 to operate for the TM4C. Jeff Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.