CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

MAX31865 what am I doing wrong??
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Aug 26, 2021 5:20 am     Reply with quote

Big grin. Very Happy
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Aug 26, 2021 11:53 am     Reply with quote

I'll transfer it into the code library for anyone else wanting to use this
chip.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Fri Aug 27, 2021 12:53 am     Reply with quote

As a comment, I would (if you have a spare pin), try it using DRDY.
Connect this to an input on the PIC, and get rid of the delays after the
init, and in the loop. Replace these with something like:

Code:

#define WAIT_FOR_MAX()  while(input(DRDY_PIN)==1) {}


This should run slightly faster than the wait.
Steve_P



Joined: 05 Jun 2017
Posts: 6

View user's profile Send private message

PostPosted: Fri Aug 27, 2021 6:59 am     Reply with quote

Temp Calculation for MAX31865 without float variables:

sint32 t,t1;

t= ADC Value from MAX
t1=t-8192;
t=t1*463;
t=t/1000;
t=t+100000;
t=t*t1;
t=t/32000);

t hold the Tempvalue with two places after the decimal point
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group