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

dspic33F MAX6675 No reading return

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JCasals



Joined: 12 Oct 2009
Posts: 6

View user's profile Send private message

dspic33F MAX6675 No reading return
PostPosted: Thu Jul 17, 2014 2:44 pm     Reply with quote

Hi all

I have worked with the pic16 and pic18 and the max6675 for long time, working OK.

Today I am working in a new project with a dsPIC33FJ256GP710A MCU with the Explorer 16 Development Board - DM240001 of Micochip.

The cpu and the max6675 are working on 3.3 VDC to stable the SPI voltage.

CCS Compiler PCD 5.007 / pickit3
SPI port 1

[C:\Users\Javier\Desktop\20140717_162707_resized_2.jpg]

for the SPI sequence is OK with the Scope ...
1) CS
2) CLK
3) SPI DOut OK

but the CPU does not return no data only an empty buffer 0000

I tried configuring the SPI port by the register and the USE _SPI , SETUP_SPI the same return empty.



Any ideas ???

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 17, 2014 5:22 pm     Reply with quote

This image is on your hard drive. It's not on a image hosting website.
So we can't see it:
[C:\Users\Javier\Desktop\20140717_162707_resized_2.jpg]
Examples of image hosting websites:
http://postimage.org
http://tinypic.com
https://imageshack.com/
Post it on one of those sites, then post the link to it here.
JCasals



Joined: 12 Oct 2009
Posts: 6

View user's profile Send private message

PostPosted: Fri Jul 18, 2014 8:28 am     Reply with quote

Sorry for my mistake ... here is the picture of the Scope with a pure nice SPI signal.

SCK and return Data DO from the MAX6675.

[http://postimg.org/image/d57f9ol9x/]
Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19481

View user's profile Send private message

PostPosted: Fri Jul 18, 2014 12:05 pm     Reply with quote

Obvious first thing, verify that the signal really is getting to the PIC pin. Possibly unplug the MAX chip, and put a square wave out on RF2, and verify this signal does arrive at the right pin on the Maxim chip. Most likely thing is that the connection is not to the right pin.

Verify you are using MODE0 in the setup. Second thing would be reading the wrong edge.
JCasals



Joined: 12 Oct 2009
Posts: 6

View user's profile Send private message

PostPosted: Wed Jul 23, 2014 2:27 pm     Reply with quote

Hi to all,

Thanks Ttelmah , the Microchip DM240001 Explorer Board have a resistence that was no install therefore the SPI RF7 line was not conected.

Issue resolve but the TWO byte reading is returning a 2°C to 5°C value a little bit to cold I guess.

Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19481

View user's profile Send private message

PostPosted: Wed Jul 23, 2014 2:43 pm     Reply with quote

Possibly check your scaling of the reply?.
You need to shift it right four times, then divide the value by 4 as a 'float', to give the temperature.
Have you got the decoupling capacitor right by the chip?.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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