piclist 1998\05\26\100855a >
Thread: calculation in MPASM
www.piclist.com/techref/language/index.htm?key=asm
picon face BY : Mark Jurras email (remove spam text)



I need to calculate a constant at compile time to set a delay. I have
an equate:

NumAve  equ     0x40            ;Average 64 Readings

that I set for the number of A/D readings I want to average. I want to
average that number over one cycle of the AC power or 1/60 seconds. I
want to call a Macro (You know it well Andy!) with the amount of the
delay between A/D readings. The equation for the delay is:

1000000/60/NumAve-80


1000000 is me instruction rate
60 is the power line freq.
NumAve (see above)
80 is my A/D overhead

I want to invoke Andrew Warren's WAIT macro with
the result. Any hints how to setup the expression??

Thank you,

- -Mark



_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

<19980526124651.19221.rocketmail@send1e.yahoomail.com>

See also: www.piclist.com/techref/language/index.htm?key=asm

Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) calculation in MPASM

month overview.

new search...