TCN75 Temp Sensor


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    39

    Default TCN75 Temp Sensor

    I want to use MicroChips TCN75 2-wire temperature sensor in a project, but still being a PIC Basic newbie, I am stumped on where to even start. I assume I have to use I2CREAD and I2CWRITE, but from there I do not know where to go.... I am using an 18F8722 Pic.
    Last edited by Frozen001; - 18th September 2008 at 20:27.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Frozen001 View Post
    I want to sue MicroChips TCN75
    That would be a good trick!

    2-wire temperature sensor in a project, but still being a PIC Basic newbie, I am stumped on where to even start. I assume I have to use I2CREAD and I2CWRITE, but from there I do not know where to go.... I am using an 18F8722 Pic.
    First off, you read the datasheet and learn a little bit about the part you want to play with.
    The you take note of any and all addresses that the part might or might not use and/or any data that has to be transferred to and/or from the device depending on what you want to do.
    If you have used any EEPROM devices at all, this device should act pretty much like those...write a location to do something, read another location to get some data back.
    Write some code. Somebody might walk you thru it, somebody might help you figure out what is wrong. However, I'd doubt somebody wil write it for you...

  3. #3
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    That would be a good trick!



    First off, you read the datasheet and learn a little bit about the part you want to play with.
    The you take note of any and all addresses that the part might or might not use and/or any data that has to be transferred to and/or from the device depending on what you want to do.
    If you have used any EEPROM devices at all, this device should act pretty much like those...write a location to do something, read another location to get some data back.
    Write some code. Somebody might walk you thru it, somebody might help you figure out what is wrong. However, I'd doubt somebody wil write it for you...
    Well I am not really a digital guy... more of an RF guy tring his hand at microcontrollers. I looked at the data sheet, and I thnk I see what I need to sent to the LM75, but I think I am more confued with the commands I2CREAD and I2CWRITE.

    After Startup, I have to send 10010001 to go into read mode. The sensor will acknowledge receipt (SDA low). After ACK, the sensor will clock out the data which I have to read.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Frozen001 View Post
    but I think I am more confued with the commands I2CREAD and I2CWRITE.

    After Startup, I have to send 10010001 to go into read mode. The sensor will acknowledge receipt (SDA low). After ACK, the sensor will clock out the data which I have to read.
    Ok, that sounds reasonable...
    YOU don't have to worry about SCL, SDA, ACK, NACK, this, that, the other thing, whatever...
    PBP and I2CREAD/I2CWRITE take care of that for you.
    All you have to do is provide the right parameters for said commands (i.e. addresses, data, etc).

  5. #5
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    OK SO I tried the following:

    I2CWRITE PORTC.4, PORTC.3, $91, $00
    I2CREAD PORTC.4, PORTC.3,$90, [STR Temperature\16]

    And got nothing back...

  6. #6
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    I connected the I2C port up to a scope, and I am getting pulses on the clock and SCL and the SDA pins, so I must be doing something correct... I think my problem is I am just not reading the data.

Similar Threads

  1. Need a cheap touch sensor idea.. here it is
    By mister_e in forum Code Examples
    Replies: 20
    Last Post: - 16th April 2016, 22:42
  2. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 11:45
  3. Using WDT as a Temp Sensor?
    By modifyit in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 20th June 2006, 17:55
  4. RH/Temp Sensor Example Code
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 15th June 2006, 15:55
  5. Temp sensor problem
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 14th June 2006, 14:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts