??? 04/19/05 15:05 Read: times |
#91929 - 16bit by 8bit divide Responding to: ???'s previous message |
Thank you all for your kind attentions
To Erik generate 3 phase sine wave with variable frequency and amplitude The idea is to simulate the Caterpillar Engine/Generator to generate the 3 phase power to test the Controller Module in the Lab before send them out to customers. What is your min and max frequency of the "sine wave" ? Due to the limitation of the engine (mechanical), and the system spec, the frequency is from 20-80Hz. So I dicide to use LUT instead of division algorithm now. Before I thougt of wide range input frequency, therefore I need the divide algorithm. Which '51 derivative do you intend to use? If you have chosen the wrong processor, do not cry foul, chose another The MCU is 87C752. The reason I'm stick with this because I have the emulator and probe of this MCU at hand, that all. Secondly, this product is intended to use "in house" for Lab testing purposes only. Therefore I didn't consider to change MCU. How "clean" must the "sine wave" waveform be? It has to be very good sinwave in order for the Controller to control Voltage, Current, Frequency, and calculate KW, KVAR, Power Factor, and a bunch of other features... To Gramham Cole The division code you have given is a classic binary division algorithm. This is inherently slow. The Keil C51 16-bit divide operation is well optimised, you might download the evaluation version of Keil and examine it for ideas. Have you considered doing division by multiplying by the reciprocal of the divisor? You can store a table of 16-bit reciprocals and the 8051 can do a fixed point 16-bit by 16-bit multiply pretty quickly. This will give a 32-bit result from which you can extract just the 16 most significant bits to give your answer. The result will not be exact so you will have to carefully consider how much resolution you actually need Thank you for the link and idea. To Kerim Fahme Thank you for the idea. I will try the method later. Regards, T.L |
Topic | Author | Date |
16bit by 8bit divide | 01/01/70 00:00 | |
Check This! | 01/01/70 00:00 | |
And This: | 01/01/70 00:00 | |
16bit by 8bit divide | 01/01/70 00:00 | |
Re: | 01/01/70 00:00 | |
16bit by 8bit divide | 01/01/70 00:00 | |
To Thelam: | 01/01/70 00:00 | |
well, if you look a bit to the left | 01/01/70 00:00 | |
16bit by 8bit divide | 01/01/70 00:00 | |
Its just ben done | 01/01/70 00:00 | |
Non-iterative Division | 01/01/70 00:00 | |
Accuracy | 01/01/70 00:00 | |
No wonder | 01/01/70 00:00 | |
again and again | 01/01/70 00:00 | |
Efficient Division | 01/01/70 00:00 | |
the divide may ne the tip of the iceberg | 01/01/70 00:00 | |
16bit by 8bit divide | 01/01/70 00:00 | |
the Titanic hit the iceberg | 01/01/70 00:00 | |
16bit by 8bit divide | 01/01/70 00:00 | |
Don't know if it helps.![]() | 01/01/70 00:00 |