On 07/06/2011 23:45, Kerry Wentworth wrote: > How do you get it to count to 361, rather than having it stop at 1? > When the zero crossing detector fires, you capture the value of the=20 counter but don't zero it, just let it run for as many samples as you=20 want to average and store the values in an array. I think... :-) --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .