EmbeddedRelated.com
Forums

MAX 6675

Started by Mikael Karstikko October 18, 2005
Hello !

Has anyone used the MAX 6675 K-Type thermocouple A/D chip with BX-24 ??

Is this hook-up correct ? no need to invert the CS line ?
MAX6675 BX-24
SO ---------- MISO (hole 6)
SCK --------- SCK (hole 7)
-CS- -------- CS (hole 4)

If anyone has knowledge of this SPI bus , please help me with the code !
Sample code would be appreciated !

Thanks in advance !


--- In basicx@basi..., Mikael Karstikko <makarst@p...> wrote:
>
> Hello !
>
> Has anyone used the MAX 6675 K-Type thermocouple A/D chip with BX-24 ??
>
> Is this hook-up correct ? no need to invert the CS line ?
> MAX6675 BX-24
> SO ---------- MISO (hole 6)
> SCK --------- SCK (hole 7)
> -CS- -------- CS (hole 4)
>
> If anyone has knowledge of this SPI bus , please help me with the code !
> Sample code would be appreciated !
>
> Thanks in advance !
>

There is sample code at http://www.phanderson.com/basicx/ .

The interface with the MAX6675 is implemented using bit bang SPI.
But, I also have a discussion of the BX24s SPI capability.

P H Anderson



> The interface with the MAX6675 is implemented using bit bang SPI.
> But, I also have a discussion of the BX24s SPI capability.
>
> P H Anderson
>
I guess the 'bit bang SPI' is useful to avoid interfering with EEPROM
functions by using 'generic' I/O pins. I am pleased to find there is
an alternative.

I am quite interested too as I have purchased a set of MCP2551 &
MCP2515 chips to create a CANbus interface. They require a SPI Master
to control and monitor them.

I will take a look at your site and code.



--- In basicx@basi..., "G. Kramer Herzog" <hwanghetw@y...>
wrote:
>I will take a look at your site and code.

Another source for solutions in Tom's site:
http://home.comcast.net/~tomhandley/bx-24/bx-24.html

Don


--- In basicx@basi..., "G. Kramer Herzog" <hwanghetw@y...>
wrote:
> I guess the 'bit bang SPI' is useful to avoid interfering with EEPROM
> functions by using 'generic' I/O pins.

You may be correct, but the speed of "bit banging" might be so slow as
to still be slower than sub-optimal hardware SPI.

It would be very interesting to see the relative speeds of HW SPI
vs "bit-bang" SPI. And even more interesting to see under which
circumstances one exceeds the other. I guess I will work on my SPI
FRAM module to try to answer this question.

I am also planning to use that SPI functionality I develop for the FRAM
to interface to SD flash cards. Another thought, you will lose 3 more of your general I/O pins with the
bit bang technique.

-Tony



As Don mentioned, I've posted an SPI Module on my web site. I use the
two LEDs and the OutputCapture() pads on the edge of the BX-24 module
to free-up regular pins. You still need one for the Slave-Select
line. It handles the four CPOL/CPHA states but not Slave-Disconnect
though it would be easy to add. It's been tested with a variety of
devices. However, there are some drawbacks. Here is a quote from my
ReadMe text:

There are four disadvantages to the software approach. (1) It uses
some pins that you may want to use for their original purpose though
you can easily use regular pins. (2) It does require a slight
software overhead. (3) It may leave the LEDs on depending on the
state. I provide a work-around to keep the LEDs Off when the SPI is
not in use. (4) The SCLK rate is much slower than the hardware
version. In this case, around 1.111KHz. However, this can be a good
thing when testing SPI devices. Once you get it working, you can
usually convert to the hardware SPI.

You can find it here [SPI.zip]:

http://home.comcast.net/~tomhandley/bx-24/bx-24.html

- Tom

--- In basicx@basi..., "G. Kramer Herzog" <hwanghetw@y...>
wrote:
>
> I guess the 'bit bang SPI' is useful to avoid interfering with
EEPROM
> functions by using 'generic' I/O pins. I am pleased to find there
is
> an alternative.