[...] it really eats up SRAM. The CRC tables use about 256 bytes of RAM (from the 1 kbytes the atmega168 has).
On my system I have temporarily commented out that section, but I think a good solution would be to use PROGMEM for the CRC tables.
A better solution, I think, would be to do the CRC calculation in code, without using the lookup table at all. I spent a couple of hours on that yesterday and worked it out. Just replace the current code for the OneWire::crc8() function with the following,
uint8_t OneWire::crc8 ( uint8_t *addr, uint8_t len )
{
uint8_t i, j;
uint8_t crc = 0;
for (i = 0; i < len; i++) {
uint8_t inbyte = addr[i];
for (j = 0; j < 8; j++) {
uint8_t mix = (crc ^ inbyte) & 0x01;
crc >>= 1;
if (mix) crc ^= 0x8C;
inbyte >>= 1;
}
}
return crc;
}