NTC thermistor temperature sensing


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    But this time I think the sim is correct. I think you ment to set ADCON2, not ADCON1. ADCON 2 sets right or left justified. Default is left justified.
    How do you right-justify bits?
    tb0=ntc>>8?

    Or there is an another command?

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by pxidr84 View Post
    How do you right-justify bits?
    tb0=ntc>>8?

    Or there is an another command?
    Look at the datasheet for ADCON2. I feel like the setting you have for ADCON1 is really ment for ADCON2. ADCON1 only has 2 valid bits. Not the 2 you have set.

    BTW, tb0=ntc>>8 will shift it 8 places. you would only need to shift 6 times. Yes this will work, but better to just set the registers up for what you want, then no un-needed code
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

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