Hi guys!
So I've put up a new branch of STC-1000+ (very imaginatively called 'test', as it started out as a test, but seemed to work out quite well...). I'm thinking this might actually end up in the master branch some time, but there are a few issues to iron out first.
So, what's up?
Well, from early on people have been bugging me about being able to read temperature and stuff from the STC from their computer or whatever...
I (think) I've always responded, 'it might be possible, but is beyond the scope and will be tricky'. Now, I've gotten tricky, and have after a lot of hair pulling and learning the ropes with my new scope, actually managed to get a simple one wire communication working.
So you can, from an arduino, read and write to the eeprom + get the current temperature.
Now this, comes at the expense of probe 2 (you can't use probe 2 anyway, as this is the data line that needs to be used + I need to 'steal' code space from somewhere, I'm kind of amazed it actually works out anyway...)
Documentation is so far lacking, it is still work in progress, but if you want to try it out you can find it
here. There is a sketch called
com.ino, that has the required code to run on the arduino + some basic examples (read temperature and setpoint).
In order for it to work, you need a pull-down resistor on ICSPCLK (or probe 2 input) to ground. 10k is fine, which incidentally (well, not really, pretty deliberately actually) is what will already be there if you are setup to use probe 2. You will need another resistor as well, about 1k, that is put in series with the ICSPDAT line from the arduino. The same pinout is used as for the programmer, so if you already have got a programmer (that is an arduino wired to program the STC), all you need is to add this resistor. You'll need it because the data line is bidirectional, and if timing or communication is a bit off both the STC and the arduino might try to drive the line in opposite directions ant might fry either of them, unless current is limited. I've tried to write 'safe' code, and maybe in time the resistor can be omitted, but for now just use it (practice safe HEX!!!).
I've prolly forgotten some vital information here, but check it out
I'm kind of excited that it works
Edit: Oh yeah... If you have the programmer, and add the 1k resistor in series, it will still work fine as a programmer, so it is sort of 'transparent'. You just 'mod' your programmer a bit, and it will work for both purposes. You could probably add a say 47k resistor from ICSPDAT line to ground on the programmer as well, so it will work even if the STC is not 'dual probe' version (that has the 10k resistor in place).
Cheers!
//mats