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 CCS Technical Support

MAX6675 and 18F2580, temp always zero. Why?
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
halibatsuiba



Joined: 12 Aug 2009
Posts: 30

View user's profile Send private message

PostPosted: Sun Aug 08, 2010 4:25 pm     Reply with quote

PCM programmer wrote:
Quote:
void main()
{
int16 temp;
.
.
.
printf(lcd_putc,"TEMP: %x ", temp);

I noticed another problem in your program. You're trying to display
an 'int16' with "%x". That's not correct. You must use "%lx". That's
a lower-case L in front of the x.


Argh! Trivial mistake.
Mode 0 does not work.
I just replaced the 6675 to rule out chip issues.

Now when I managed to kill my scope, I think I will take this circuit with me to work tomorrow and check if there is any data in clock and data lines.

Before my scope died, I managed to verify that CS is working as expected.
halibatsuiba



Joined: 12 Aug 2009
Posts: 30

View user's profile Send private message

PostPosted: Tue Aug 10, 2010 9:26 pm     Reply with quote

Checked with scope: CS and clock lines are ok but there is nothing going on in data line.
No shorts in circuit either.

I find it hard to believe both chips I have would be dead.

Oh well, perhaps I should order couple more from Sparkfun.
pmuldoon



Joined: 26 Sep 2003
Posts: 218
Location: Northern Indiana

View user's profile Send private message

PostPosted: Thu Aug 12, 2010 12:01 pm     Reply with quote

If the chip is setup using stdio, then the output_low(MAX_DO); statement will drive the pic pin low into the output line of the MAX chip. Could that have killed your data line?
halibatsuiba



Joined: 12 Aug 2009
Posts: 30

View user's profile Send private message

PostPosted: Sat Aug 14, 2010 4:35 pm     Reply with quote

Howdy again.
I just got new MAX6675 from Sparkfun.com.

Replaced old one in breadboard and whadda'y'know... now it works.
Then I did put the old one back and it works too!
Code is still the same.

Spooky...

I don't think it was loose connection or some kind of short because I rebuilt the circuit three times before replacing the 6675 and it did not have any effect.

Thank you all for your advice.
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Aug 15, 2010 11:56 am     Reply with quote

halibatsuiba wrote:
Howdy again.
I just got new MAX6675 from Sparkfun.com.

Replaced old one in breadboard and whadda'y'know... now it works.
Then I did put the old one back and it works too!
Code is still the same.

Spooky...

I don't think it was loose connection or some kind of short because I rebuilt the circuit three times before replacing the 6675 and it did not have any effect.

Thank you all for your advice.


Sounds like a possible soldering problem.

Always make sure to use enough flux and a small enough tip to keep the joints clean and oxide free.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
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