TCN75 Temp Sensor


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    OK I have it reading the data correctly, it think:

    I2CREAD PORTC.4, PORTC.3,%10010001 ,$0, [temph,templ]

    temph is the first 8 bits, and templ is the next 8 bits.

    temph is difined earlier as the first byte in the word temp, while templ is defined at the second byte in the word temp.

    Now that I have the temperature reading, is thre a way to convert it to ascii characters so I can send them to my display?
    Last edited by Frozen001; - 22nd September 2008 at 15:30.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Frozen001 View Post
    OK I have it reading the data correctly, it think:

    I2CREAD PORTC.4, PORTC.3,%10010001 ,$0, [temph,templ]

    temph is the first 8 bits, and templ is the next 8 bits.

    temph is difined earlier as the first byte in the word temp, while templ is defined at the second byte in the word temp.

    Now that I have the temperature reading, is thre a way to convert it to ascii characters so I can send them to my display?
    Look at the modifiers listed in the Serial out routines, HEX, BIN, STR Etc. . . usually, if my poor memory serves me, data goes ascii without the modifiers, but go look at them anyway, also while you are checking those out look also at the DIG and DEC modifiers, they do good things too.
    http://www.melabs.com/resources/pbpmanual/
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    The modifier would be OK , but my display does not used a serial interface, rather I have to access address for each character to display (HDSP-2112).

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Frozen001 View Post
    I2CREAD PORTC.4, PORTC.3,%10010001 ,$0, [temph,templ]
    temph is the first 8 bits, and templ is the next 8 bits.
    temph is difined earlier as the first byte in the word temp, while templ is defined at the second byte in the word temp.
    Now that I have the temperature reading, is thre a way to convert it to ascii characters so I can send them to my display?
    tempw var word
    tempw.highbyte = temph
    templw.lowbyte = templ
    lcdout $fe,1,DEC5 tempw

    Just like it shows in the LCDOUT section of the PBP manual.

  5. #5
    Join Date
    Aug 2008
    Posts
    39


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    tempw var word
    tempw.highbyte = temph
    templw.lowbyte = templ
    lcdout $fe,1,DEC5 tempw

    Just like it shows in the LCDOUT section of the PBP manual.
    Thanks for the information, but the display is not compatible with the LCDOUT routine. I got it working though, had to do some math. Working great so far.

    Thanks again...

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