Hello All! Where can I find a complete example of using C167 coprocessor, including its initialization and (espesially desired) chasing when results of calculation are ready for reading? There are some details obscure for me. Thanks.
What do you mean by C167 coprocessor?
Mathematical coprocessor of 16x controller.
AFAIK, this is all transparent to the programmer. Simply use the MUL and DIV instructions and let the processor do the rest.
Well, what about Sin, Cos and other non-obvious functions?
Hi Alexey, Sine, cosine and other functions were written in assembly language by Keil Software. They use MUL, DIV, ADD, SUB etc. instructions to do the job. Those functions were well optimized (hopefully :-)). Of course you can try and write your own if you don't like Keil's ones. C166 and x86 are very different architectures. Don't assume that every processor has a single-instruction sine computation capability just because x86 does. Read the manual. Regards, - mike
So as far as I realise Keil compiler uses Taylor's series (or smth. similar) to compute sine, cosine, etc? And that's why these appear to be computed VERY slow. I can't see any optimisation here while there's coprocessor's Sin, Cos functions which take 600 and 700 ns, resp. And there's documented interface to coprocessor, but I've got some probs with it. So now the question is HOW to use coprocessor, not IF to use it ;) I don't care about x86's coprocessor capabilities. If I did, I wouldn't take C16x at all. So if there are manuals/examples, I'd gratefully take them. That's why I ask.
If you need a math coprocessor you just chose the wrong chip to begin with. The '51s are microcontrollers not microprocessors Erik
So the C16xs are, too. Or I don't understand your words...
So the C16xs are, too. Or I don't understand your words... Yes they are microcontrollers and for extensive math you need a microprocessor Have a look at the x86 series Erik
To Mike: C166 and x86 are very different architectures. Don't assume that every processor has a single-instruction sine computation capability just because x86 does. Read the manual. Oh I didn't at once undestand what you mean. Of course there IS a single-instruction Sin function in MF167's mathematical coprocessor. I just know it because I READ the manual on MF167 microcontroller.
To erik: You mean that there's x86 processor in C16x controllers, and so what I have to do is find manual on x86 instructions? Could you kindly address me to where I can find it, please? Thanks.
View all questions in Keil forum