Jump to content
43oh

OneWire Energia Library


Recommended Posts

G'day,

Fixed all but one error now (had to substitute noInterrupts() for cli(), and interrupts() for sei())

 

The following is the error from the energia IDE

-----

C:\ti\Arduino\energia-0101E0008\hardware\msp430\libraries\OneWire\OneWire.cpp: In constructor 'OneWire::OneWire(uint8_t)':

C:\ti\Arduino\energia-0101E0008\hardware\msp430\libraries\OneWire\OneWire.cpp:96:12: error: cannot convert 'volatile uint16_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment

------

Have to idea what my next step is. Unable to find volatile uint16_t in OneWire.cpp

Have attached the latest edited files.

 

Grant

OneWireVer2.zip

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

Hi,

I hope attached library may help.

i've used http://sourceforge.net/projects/msp430-ds18b20/ as a starting point.

Br

Alexander

zip.gif  DS18B20.zip   1.83K   

 

Thank you!  result <3k !!!

 

who will use the correct "DS18B20.h" in  "DS18B20.zip" :

class DS18B20{
  private:
volatile uint8_t * _OWPORTDIR;
volatile uint8_t * _OWPORTREN;
volatile uint8_t * _OWPORTIN;
volatile uint8_t * _OWPORTOUT;

how important it is to use noInterrupts()/Interrupts() in library?

Link to post
Share on other sites

Tks for all the help.

I got the one wire working  ok. I am now trying to get it to work on the stellaris so the same library can be used on this platform.

There's a better following on this 430 forum when it comes to help, possible due to the time 430 has been around. From what I've experienced one has to be more C++ proficient when playing around with the stellaris, and not be reliant on Energia. My last note on this subject is energia  libraries. Without them we can only do basic stuff. So if your a arduino convert like my self, stay with the 430 and the help this forum provides.

Grant

Link to post
Share on other sites

Thank you!  result <3k !!!

 

who will use the correct "DS18B20.h" in  "DS18B20.zip" :

class DS18B20{
  private:
volatile uint8_t * _OWPORTDIR;
volatile uint8_t * _OWPORTREN;
volatile uint8_t * _OWPORTIN;
volatile uint8_t * _OWPORTOUT;

 

You are right, these need to be changed to be compartible with the latest version of Energia

 

how important it is to use noInterrupts()/Interrupts() in library?

 

Borrowed it from other implementations. I guess needed to follow the exact timings for bit-banging.

 

Btw, I've posted a port of Arduino OneWire lib in the Energia Libraries section. This one is much more flexible, however for the price of the footprint

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

Unfortunately I haven't heard from Paul Stoffregen yet, so I decided to release the modified source here.

 

I still hope he'll respond, and include the changes in his own library, but at least you guys have a chance to play with it now :smile:

 

So, attached is the UNOFFICIAL OneWire library, that is compatible with Energia.

 

Regards,

Michel.

 

OneWire Energia Compatible.zip

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