Christmas tree decorations

Hello everybody, I am in the process of making some small scrolling message ornaments for hanging on my X-mas tree. these work real nice except for after about 5 minutes they stop scrolling and only display half of the first letter then reset to begin the cycle over again of just half of the first letter. I tried to add the sketch to this post but it was too long and I don’t know what I am doing so here is a link to the sketch

http://oomlout.com/8X8M/8X8M-ScrollMessage.txt

and with the exception of the 16mhz crystal here is a link to how i have it wired

http://oomlout.com/8X8M/8X8M-Guide.pdf

The only parts I am using are

1 RG display
1 16 mhz crystal
8 100 ohm resistors

these parts do not get hot or even warm.
If anyone has any suggestions i would greatly appreciate it. I need to get these done before Christmas, Thank you

I'd put the character tables into PROGMEM

Wow i was not expecting such a quick response, thanks For the record i did not write this sketch and am unsure how to do as you suggest. I am still in the process of trying to teach myself to write code but i am not very good at it.

I also should mention that the control chip I am using is an Atmega168

At a second look, I'm not sure that is the problem (though it wouldn't do any harm to learn about PROGMEM) - there doesn't seem to be too much in the way of RAM usage. Strange.

const int _COLDOT[]

const byte would be better throughout for the character tables. That would make "const byte* letters[] " too, and then some more other minor changes. You could try that.

Sorry it took so long to get back but i changed all const int to const byte and i still have the same problem. could it be anything else like not using the crystal maybe?

I don't think it could be a memory leak. Have you tried a simple loop that just prints something to the serial monitor? You seem to have jumped straight in to something, without proving that all the foundation stages are solid.

Like I mentioned earlier I did not write this code but your suggestion does sound interesting. Could you help me with the coding and where to place it, I am not very confident with my code writing skills (or lack of said skills). Thank you

The crystal for the microprocessor needs two 22pf ceramic capacitors connected to the ground. See the schematic here:

http://arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf

Your right i don't have those two caps hooked up, right now my problem is I don't have any of those caps hear and I can't get to a Radio shack till after X-mas. Do you think these caps could be substituted with some other value?

Any value between 22pF and 33pF will work ok.

The larger the values, the slower the start up time but more stable clock. If you want to get technical, get a data sheet for the crystal you are going to use. There you will find the information and formulas for calculating the values.

Well I got the caps today , hooked them up and still no change, i am totally running out of ideas.

If you are using external power source, can you test it with a battery?

Yes, actually I have these running on two 3v 2032 button cell batteries, but if needed i can also hook these up to a 9v battery or even my computer wih a USB cable

Try it using the usb cable, see what happens

I still get the same results.

I had to reload the sketch into the Atmega 128 chip and when i ran the compile function of the Arduino 21 software the program forced me to delete the following lines, could that have anything to do with it?

const int FULL =30; const int CHECK = 31; const int A3 = 32; const int TEMP = 33;

case ‘<’: returnValue = TEMP; break;

case ‘*’: returnValue = FULL; break;

Here again is a link to the sketch i am using.

http://oomlout.com/8X8M/8X8M-ScrollMessage.txt

A3 is now a reserved keyword. None of the rest of them are, that I know of.

However, since all capital letters are generally recommended only for #define'd names, you should not be using all capital letters for general variable names.

Sorry but I am not sure I know what you are talking about, are you suggesting that i change all variable names to lower case? Do you think thats the reason I am having this problem? I will try anything and everything suggested I really want (need) to get these working properly. Thank you

are you suggesting that i change all variable names to lower case?

Lower case or mixed case, whatever looks best to you. Just not all upper case.