Attiny85 wih MAX6675

Gentlemen,

I have a requirement where I am trying to build a temperature data logger and due to size constraints, I have chosen Attiny85 as the microccontroller. I will be using a MAX6675 with a thermocouple (Max6675 is a kit purchased from the internet) I would like to know if a MAX6675 can be integrated with Attiny85. I know MAX6675 uses SPI and Attiny can be programmed to use its USI as SPI. But other than that I would like to know the feasibility of this project before I order the Attiny85. If it is feasible, a custom pcb will be designed with Attiny85 and max6675 in a single pcb.

EDIT: I am planning on using just 1 K-type thermocouple for this application.

EDIT 2 : It has to be a thermocouple because of we have it custom made for it to fit into the product and I need to measure the temperature of that said product. Also the temperature might go upto 750 deg C .

Thank you!
Vish

SPI on an ATtiny is definitely possible.

Reading about your project I wonder what you're going to do with the read temperatures, as you'll have only a single I/O pin left (2x power, 1x RESET, 4x SPI - that's 7 out of 8 pins taken).

Could one hard wire the chip select to gain 1 more pin (asking cause I don't know)? Then use I2C or soft serial to transmit data.

EDIT:
I should have looked at the data sheet first. The cs going low initiates a data transfer so I guess you can't hard wire it.

I read an article where one guy managed to store the values in the EEPROM. But then this experiment of mine would go on for quite sometime and I will be needing more space. What are the possibilities to store the temperature values?

Like groundFungus said, can we hardwire the CS pin to gain one more pin?

Like groundFungus said, can we hardwire the CS pin to gain one more pin?

See my edit.

Force CS low and apply a clock signal at SCK to read
the results at SO. Forcing CS low immediately stops
any conversion process. Initiate a new conversion
process by forcing CS high.

groundFungus:
See my edit.

Thanks for clearing that up. I do not want a display or anything but is there a way to store the values? SD card means more IO requirement, which leads to increased size of Attiny. I looked at Attiny84 and it was a little big for my application.

SD cards are SPI so SCK, MOSI and MISO are shared. You need one pin for Chip Select so... I have read that some SD modules do not share the SPI bus properly. You will need to find one that does. Sadly, I can't recommend any particular module. Hopefully someone with more experience will.

Normally you would be able to hardwire the SC indeed.

You won't be able to use I2C to transmit data out, as those pins are shared with the SPI pins. However you could of course use the SPI bus to send the data to another device - SD card, other Arduino, whatever. The one remaining pin you can use for CS for that device.

It is possible to use the RESET as I/O pin by setting fuses, but that makes programming harder (you need a 12V programmer or so, the higher voltage puts the chip in program mode).

Or of course you could use an ATtiny84a, or it's successor, the 841. Those have 11 I/O pins.

wvmarle:
Normally you would be able to hardwire the SC indeed.

You won’t be able to use I2C to transmit data out, as those pins are shared with the SPI pins. However you could of course use the SPI bus to send the data to another device - SD card, other Arduino, whatever. The one remaining pin you can use for CS for that device.

It is possible to use the RESET as I/O pin by setting fuses, but that makes programming harder (you need a 12V programmer or so, the higher voltage puts the chip in program mode).

Or of course you could use an ATtiny84a, or it’s successor, the 841. Those have 11 I/O pins.

Thank you! I checked the dimensions of Attiny84a and Attiny841. It would suit perfectly for my application and hoping that the SD card could be integrated to them.

THank you!

The 84a comes in various packages including DIP-14 (very convenient for prototyping). The 841 has no DIP package available, the largest package is SSOP14 (1.27 mm pitch SMD). Also available as QFN if you want to shrink it down even more, just a few mm square.

I haven't tried connecting an SD card to any of them myself.