View previous topic :: View next topic |
Author |
Message |
JCasals
Joined: 12 Oct 2009 Posts: 6
|
dspic33F MAX6675 No reading return |
Posted: Thu Jul 17, 2014 2:44 pm |
|
|
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
|
|
Posted: Thu Jul 17, 2014 5:22 pm |
|
|
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
|
|
Posted: Fri Jul 18, 2014 8:28 am |
|
|
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: 19569
|
|
Posted: Fri Jul 18, 2014 12:05 pm |
|
|
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
|
|
Posted: Wed Jul 23, 2014 2:27 pm |
|
|
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: 19569
|
|
Posted: Wed Jul 23, 2014 2:43 pm |
|
|
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?. |
|
|
|