The following code runs fine on the ATMEGA8 and also when transferred to the ATMEGA168. However when code size increases somewhat, we start getting weird behavior (internal variables streaming out of the serial port) and then crashes. Reducing the size of the code eliminates this badness.
Is it our code? Is it some sort of flaw with the 168?
Here's the current version. There's some extra char variables at the top of the program. The last one (commented out) increases the size of the program enough to cause a crash.
http://rob.faludi.com/itp/Plants_XBee_ATMEGA168_ForumExample.pde