On Mon, 21 Aug 2000, Dan Michaels wrote: > At 11:05 AM 08/21/2000 -0400, you wrote: > >>And it's *obvious* to the programmer what it is? > >> > >>How can you tell *exactly* how many cycles a routine takes > >>without looking at the assembly code? > > > >I said I don't WRITE much assembly code, but I still READ it! > > > >The HiTech C compiler gives you the C with the assembly that it generates > in the > >.AS file. > > > >Andy > > > > Ahh, so. "Deterministic timing" is whatever the compiler **gives** you, > whether it gives 10 cycles to code a loop, or 25 - whether a C instruction > gets coded into 1 cycle or 8. Slowly it's coming across. I think the level of "determinism" needs to be defined. In many applications, a timer interrupt can be used to trigger events that can then be processed by high-level C-code. I had an application like this to control a bank of 64 relays once. It just didn't need to be deterministic to the microsecond, 10's of milliseconds was good enough. That was written in C. If you need 10's of microseconds of resolution, then you'd be hard pressed to get determinism out of C-compiler. You'd have to either resort to inline assembly and/or careful tune the way C-code is written. Scott -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu