Why would sketch work on ATMega328 and ! ATMega168

I have a pretty simple program that reads input from an XBee and writes output to a 16x24 matrix. The code works great on a ATMega328, but even though it compiles and loads just fine, will not do anything on a ATMega168. It’s not size (both compile to 5K).

I’ve moved the shield that the wiring is on back and forth. The XBee receives packets just fine on both. The 328 writes to the display, the other doesn’t.

To be honest, I haven’t dug into what’s going on, being lazy and asking first.

There are several kinds of memory. The 32K/16K sketch memory is only one type. You may well be exceeding the other memory limits. Would need to see the sketch to know more.

http://www.skymoco.com/XBMatrix.zip

Is a link to my code. Pretty straightforward stuff.

Is there a way to compile and check for memory usage like on a Parallax Stamp?

Sorry if I’b asking the obvious. but I find that sometimes it is the best place to start.
Can you download any of the examples to the 164?

I have one of each (328 and 168), both work fine with some of my smaller sketches, just this one only works in the 328.

Is there a way to compile and check for memory usage like on a Parallax Stamp?

No.

It sounds like it is lack of user RAM to store variables. As it loads in OK then the code size is the same.

Is there a way to test for out of RAM to store variables other than the sketch just doesn't work? :-/

Any of these may work…
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1246358387/5#5
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236343710/3#3
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274126895/5
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213583720/18#18
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213583720/19#19

Here’s a nice graphic of the memory layout…
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1231801806/9#9

A few minutes searching the forum will reveal more.