Shop OBEX P1 Docs P2 Docs Learn Events
Max31855 with the propeller? — Parallax Forums

Max31855 with the propeller?

TylerSkylerTylerSkyler Posts: 72
edited 2013-09-02 20:32 in Propeller 1
Hey All! I'm looking to read temp with this. It uses a Max31855 and k-type thermocouple. I treied the object for the 6675, but it isn't pin compatible. How could I read this sensor? Any help is Appreciated.

Thanks,

Tyler

Comments

  • SRLMSRLM Posts: 5,045
    edited 2012-10-24 20:40
    This is a case where you'll have to read the datasheet. If you look there, you see that this sensor is interfaced to with SPI. Next, you'll need to find an SPI object to use on the Propeller. Alternatively, you can create your own routine for reading the 32 bits from the device. Something like this (untested):
    PUB ReadSensor : data
       
       outa[CS_PIN]~ 'Set CS low
       
       waitcnt(t_css + cnt)
       
       data := 0
    
       repeat 32
          outa[SCK_PIN]~~
          data := ( data << 1)  | ina[SO_PIN]
          waitcnt(t_ch + cnt)
          outa[SCK_PIN]~
          waitcnt(t_cl + cnt)
    
       outa[CS_PIN]~~
    
       return data
    

    The datasheet provides timing examples.
  • TylerSkylerTylerSkyler Posts: 72
    edited 2012-10-25 14:40
    Hey, Thanks for the reply I haven't gotten it to work yet, but i'm on the case. Any more info is most apprciated...I'm a little slow only a little :)

    Thanks,

    Tyler
  • SRLMSRLM Posts: 5,045
    edited 2012-10-26 18:17
    Hi Tyler, I've order some of these chips for my own project. So, if you're willing to wait a few weeks then I'll have some tested code that I can post up.
  • JonnyMacJonnyMac Posts: 9,107
    edited 2012-10-26 20:31
    That chip is easy to use -- my object is attached.
  • TylerSkylerTylerSkyler Posts: 72
    edited 2012-10-27 20:38
    JonnyMac wrote: »
    That chip is easy to use -- my object is attached.

    Thanks I'll try it out when I get a chance.

    Thanks,

    Tyler
  • knikulaknikula Posts: 26
    edited 2013-09-02 20:32
    JonnyMac, thanks for posting this, Tyler, thanks for asking...I'm trying this chip out at the moment...

    Ken....
Sign In or Register to comment.