On Mon, 19 Jun 2000, Tony Nixon wrote: > Hi all, > > Thanks for the responses. > > I did make a typo - sorry. > > The data I need is from 0x40 to 0x7F. > > I had to stick with.. > > WaveData bsf FSR,6 > movf INDF,W > incf FSR > movwf PORTB > bcf FSR,7 > goto WaveData7 > > I thought about doing this in ROM which, as Scott mentioned, will result > in 4 cycles, but the user is likely to change things quite a bit and the > ROM will probably fail too quickly. 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