Andrew Kieran wrote: > I suggest setting aside one bit of RAM for every LED. Then, you > can write a routine that simply takes the contents of RAM and > outputs it, one column at a time, to the LED matrix. Your 8 X 8 > matrix will need only 8 bytes of RAM. > > Using this approach, you completely separate the routine that > displays whatever is in those 8 bytes, from the code that > 'decides' what to display. (Did you say that it will be based > on Martin Gardiner's game of Life?) I agree this is a good approach if you want to display arbitrary combinations of LEDs on. However, this is considerably more complex than required for turning on a single LED, which was the original problem statement. On the other hand, he did then mention the game of life later, which seems at odds with the first description. > To do smooth animation you may want to refresh every column 50 > times per second (for example). There are two separate update rates to consider. The first is how fast must one LED turn on and another off so that something can appear to be moving smoothly without visually "clunking" from one animation frame to another. The second is if the display is multiplexed and therefore each LED is refreshed for only a short amount of time, how fast must the refresh be to avoid the appearance of flicker. Animation update rate does not need to be that high. 35mm movies only update at 24Hz, for example. The tougher requirement in this case is refresh rate to avoid flicker. CRT monitors usually update at 60-80Hz, but they also utilize the persitance of the phosphor to help out. LEDs have essentially no persistance, and will require a faster update rate. With discrete points of light like LEDs, there is also the problem that as you move your eyes you will see a trail of frozen images, or the display will appear to wiggle if your head vibrates a little like when eating crunchy food. This is why LED displays are usually updated at a few 100Hz. Wave an LED clock in front of you and with a little cleverness should be able to get a round idea of refresh rate. In this case a good trick is to perform interleaved refresh, just like televisions do. Instead of doing row 0, then row 1, then row 2, etc, do rows 0, 2, 4, 6, then rows 1, 3, 5, 7. This will appear to flicker less to a human observer. You may notice the LED clock using the same trick in the order the digits are refreshed. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist