MAX6675

Questions on control of serial busses
Post Reply
YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

MAX6675

Post by YahooArchive » Sun Feb 10, 2013 10:00 pm

>from help line
>I\'m trying to use SPI to interface a MAX6675 TC chip to an ARMmite with BASIC.
Could you provide a bare bones code example that would give me a start on this?
I\'ve been unable to make any headway after considerable effort.

SPI is not really a standard, it basically means you have a couple wires that
are a serial interface to the peripheral.

This device falls into a class that might better be done with SHIFTIN

While I can't test it this should be pretty close (I assume that CSpin, CLKpin
and INpin have been #define 'd)


#define SHIFTpreSample ' because data is ready when CS goes low
#include

shiftCounts(0) = 32

IO(CSpin) = 0
shiftin (INpin,CLKpin,0,1) 'read the value
IO(CSpin) = 1

max6675_reading = shiftValues(0)



Post Reply