summaryrefslogtreecommitdiff
path: root/Tonokip_Firmware
diff options
context:
space:
mode:
authorkliment <kliment.yanev@gmail.com>2011-04-22 12:10:25 +0200
committerkliment <kliment.yanev@gmail.com>2011-04-22 12:14:49 +0200
commit86e97c14faa1c4354ce3bf459b2cf24af139daf0 (patch)
treeb006c9d184cbae6b7ce6a66fa694a08d7e40d598 /Tonokip_Firmware
parent72e4ce1c2cd54c1d3dabb3aa728f7329684ca8f6 (diff)
Fix pin definitions for MAX6675 (SS)
Diffstat (limited to 'Tonokip_Firmware')
-rw-r--r--Tonokip_Firmware/Tonokip_Firmware.pde8
-rw-r--r--Tonokip_Firmware/pins.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde
index 2a12e00..0e99ad2 100644
--- a/Tonokip_Firmware/Tonokip_Firmware.pde
+++ b/Tonokip_Firmware/Tonokip_Firmware.pde
@@ -213,8 +213,8 @@ void setup()
digitalWrite(MISO_PIN,1);
pinMode(MISO_PIN,INPUT);
- digitalWrite(SS_PIN,1);
- pinMode(SS_PIN,OUTPUT);
+ digitalWrite(MAX6675_SS,1);
+ pinMode(MAX6675_SS,OUTPUT);
#endif
#ifdef SDSUPPORT
@@ -1004,7 +1004,7 @@ inline int read_max6675()
SPCR = (1<<MSTR) | (1<<SPE) | (1<<SPR0);
// enable TT_MAX6675
- digitalWrite(SS_PIN, 0);
+ digitalWrite(MAX6675_SS, 0);
// ensure 100ns delay - a bit extra is fine
delay(1);
@@ -1021,7 +1021,7 @@ inline int read_max6675()
max6675_temp |= SPDR;
// disable TT_MAX6675
- digitalWrite(SS_PIN, 1);
+ digitalWrite(MAX6675_SS, 1);
if (max6675_temp & 4)
{
diff --git a/Tonokip_Firmware/pins.h b/Tonokip_Firmware/pins.h
index f881e60..eb305cb 100644
--- a/Tonokip_Firmware/pins.h
+++ b/Tonokip_Firmware/pins.h
@@ -252,11 +252,13 @@
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
-#define SS_PIN 53
-
+#define MAX6675_SS 53
+#else
+#define MAX6675_SS 49
#endif
+
/****************************************************************************************
* Duemilanove w/ ATMega328P pin assignment
*