Quote Originally Posted by Joe Rocci View Post
Chris,

I'm using a 20mhz crystal, so cycle time is 200nsec. My ~260 cycle assembler SR should thus take about 52 usec, if my math is correct. I was planning to use the crystal to run a Timer1 timer to generate prescise 100usec interrupts. If I sample at 100usec (10khz), that leaves about 48usec to do 'other things'. That would do it in the assembler version.

The big question, is there a PBP alternative that would be fast enough, and in fact leave a little time for other things?? I suspect not, and that I'll end up with a hybrid solution, using assembler for the SR, and PBP for the 'other things'.

Joe

Joe
I would go for the 100uS interrupt and do the basic shifting in the ISR. every 8th bitshift do a single byte pointer reallocation. That would be the circular buffer. You could trim it down to 10 clock cycles per interrupt, and every 8th interrupt 20 clock cycles.

Picbasic, like C, and most other high level languages, are macro systems for assembler, of particular flavours depending on the main application. I consider myself lucky that I learned assembler first before any other langauge (with the exception of the file handler friendly OPL on Psion PDA's)