Painless micro program

May 17, 2007 64 Replies

"Primos"?

formatting link
had one of these beasts

gcc has pure, I'm not sure that it's actually enforced, I think it's more of a hint to the optimiser so that it can optimise

when I put a function call in a boolean statement I rely on the short-circuiting

char *a; /* ... */ if ( a && strlen(a)>10 ) /* ... */ Bye. Jasen

I have a square root routine I implemented as part of an RMS detector in an MEGA 88 AVR (32-bits in, 16-bits out). I can post it somewhere if you're interested.

I've used the MSP430 too ... it's generally noisier from an RF POV, but I've always liked TI for reliability.

Frank Raffaeli

The square root might come in handy; I'd appreciate it. Please post somewhere or email to me, jjlarkin atthing highlandtechnology dthing com. How does it work... Newton?

One can always square root (or divide!) by successive approximation, if you have a multiply.

John

On May 27, 3:14 am, "Michael A. Terrell"

{... Prime computers ....]

The one I had experience with was doing scientific computations not things like MRP. For a while, they were the best deal on processors that could do floating point.

Ok, here is the code. There is a square root routine and a ratio routine. I used it in an RMS volt-ohm meter about 5 years ago, assy program on an AVR Mega8.

formatting link

Frank Raffaeli

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required