Scott Dattalo wrote: > No, I said 4 cycles while reading from RAM. The ROM part your thinking about is > that the loop is unrolled such that indirect addressing can be avoided. > Consequently, the code looks rather large. Also, I notice that the loop you show > above has no means of exiting. If you can live with this, then it's possible to > read the values from RAM and update the samples once every 3 cycles. (It's easy > enough to break out of the loop if you have the interrupt-on-change interrupt > enabled. When the interrupt is processed, you exit with a goto instead of a > return. Take a second look at what I (and also Nikolai) posted the other day. > > Scott Hi Scott, I never though about a frequency generator on the PIC's clock - Cool idea. I can vary the frequency by using a scaler value 7 - 255. It's a bit rough, but I'm not building something for Hewlett Packard :-) How do you read from RAM in 3 cycles? I thought 4 minimum to keep data evenly spaced. Loop movf RAM1,W movwf PORTB goto $ + 1 movf RAM2,W movwf PORTB goto Loop I actually implemented an IRQ on USART receive so that I can stop the wave when the PC sends a char. -- Best regards Tony http://www.picnpoke.com mailto:sales@picnpoke.com