Hello Andy, > That's the fastest way to shift the values... But if you have a lot > of values (more than 4), it might be faster and take less code space > to avoid shifting altogether. Instead of shifting, make the buffer > circular and just change the value of a pointer into the buffer. I was already thinking about circular buffers, but have never implemented one so I'm a bit "scared". :^) Any tricks on how to do it? Well, I'll take a look at the archives. Thank you, Brusque ----------------------------------- Edson Brusque Research and Development C.I.Tronics Lighting Designers Ltda Blumenau - SC - Brazil www.citronics.com.br Say NO to HTML mail ----------------------------------- -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.