Continue to Site

# assembly problem pls help

Status
Not open for further replies.

#### Raju C

##### Member level 2
Hi all..
how to implement 400.125MHz/25k=3E85 this in assembly program.. ?? i am using pic 18f .. pls help any one

One is a frequency, one is a number, what are you trying to do, divide a signal or do a math equation?

Brian.

actually i am entering frequency in GUI .. it is a variable that i am taking into my code ..and dividing it by 25k that is constant for all freq .. math equation only

I can't help you directly but the best source of information on math routines like that is at:

You will find all sorts of useful routines there.

Brian.

betwixt said:
I can't help you directly but the best source of information on math routines like that is at:

You will find all sorts of useful routines there.

Brian.
I tried this code but i am not getting where i am going wrong bcz not getting the exact answer??

It still isn't clear what you are trying to do. Are you dividing 400.125/25 or 400125000/25000 ?

I'm guessing you are working out a frequency division ratio, perhaps for a PLL synthesizer. If you want to know how many times 25KHz fits into 400.125MHz, the answer is 16,005 or 0x3E85 exactly, but you had that worked out already.

If it is a frequency divider and 25K is the divisor, scale it down by 1,000 times so everything is in KHz and the equation becomes 400125/25.

Brian.

thanks to every one i got this ..

Raju C said:
thanks to every one i got this ..
It is nice to know that you got the solution. But for information sake of all the intrested memebers, can you post your solution here? Cheers.

ya sure.. actually i was dividing frequency with BW , BW is constant , i wanted to take the result value in my code , but what i thought instead of calculating it in code i can create one GUI their i will enter frequency and BW also their i can divide just i have to take that value in the main code..

Status
Not open for further replies.