A timer with Celoxica RC100

Aug 19, 2004 2 Replies

Hi, somebody can tell me how can I make a counter (that count 1,6ms and other that count microseconds) I make it:



static macro proc espera2 (time) { unsigned 64 i;



for (i=0; i


I can't figure out if this could be homework or not, but I will say that milliseconds are normally larger than microseconds, not smaller.

Marc

In message , snipped-for-privacy@wanadoo.es writes

-- 8< - snip - 8< --

Try re-arranging the _integer_ division and multiplication.

e.g. for a wait of 5 us

(5 / 1000000) = 0 (5 / 1000000) * 80000000 = 0

5 * (80000000 / 1000000) = 400

Rich

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required