> An even better answer is to specify the amount of *time* to waste. Let the > assembler calculate how many instruction cycles that is, then calclulate the > least number of instructions to take that many cycles. But there's another > wrinkle. Often you need two instructions to be a fixed minimum time apart, > but you have other things you can do during those instructions although they > don't guarantee taking that minimum amount of time. So you want a minimum > guaranteed delay in time, but are going to spend some of that with a fixed > number of instruction cycles. Therefore what you really need is a way of > saying, for example, "Take 2uS, but I've already used 5 instruction cycles > out of that 2uS.". This shows the part you know about and can control in > the source code without any implicit reliance on the processor clock speed. One step better, and one level up in the language picking order: I'd like to specify that, and not have to worry about how many instructions I spent doing those other things. And I want to be able to specify that in loops too. Does anyone know of a HLL syntax (or even an implementation) for this? Like: timing_start; for( i = 0; i <= 8; i ++ ){ timing_interval( 1.0 / 115200 ); outpin = data : 0; data = data >> 1; } timing_interval( 1.0 / 115200 ); outpin = 1; timing_interval( 2.0 / 115200 ); Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist