On Sun, 2004-08-22 at 14:54, Robert Monsen wrote: > > Still, even with that, I only get a speed of 250kHz, still WELL below > > what I'd expect of a processor running at 50MHz, that's still 200 cycles > > just to flip a bit back and forth. TTYL > > > > > You might want to try it in asm, just to see if its any faster. The io call > is probably whats getting you. You can often embed asm statements in C code > using some kind of asm("stmt") statement. FWIW the modification I made resulted in no more function calls, but it seems the loop still ends up costing 200 cycles total, very weird... > There may also be compiler optimization options you can enable. These might > allow the compiler to forgo setting up the index register repeatedly. I've looked and all I could find was a setting to "optimized for speed", which I set, with no difference. TTYL ----------------------------- Herbert's PIC Stuff: http://repatch.dyndns.org:8383/pic_stuff/ -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body