Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Pic 18F assembly with GUI problem

Status
Not open for further replies.

Raju C

Member level 2
Joined
Sep 17, 2009
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore
Activity points
1,558
Hi all...
If i enter the frequency through GUI(graphical user interface) and with that frequency i want to calculate some other value that i am going to use in my code .
ex: i am entering frequency 400.125MHz and band width=25kHz
so i need to calculate N value
i.e N = 400.125MHz/25kHz
= 16005 = 3E85(hex)
so each time entering different frequency it has to calculate N value. is that in the code the first step i can take which divides that frequency?? and how can i divide this ?
pls help anyone..
 

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,897
Helped
438
Reputation
880
Reaction score
287
Trophy points
1,363
Location
Oberon
Activity points
12,861
You need a floating point maths library for the Pic. If you search with google you will find a lot of them on the web.
Floating point math will take a large chunk of your memory.
This would be a lot easier if you used C programming language.
 

atferrari

Full Member level 4
Joined
Jun 29, 2004
Messages
237
Helped
7
Reputation
14
Reaction score
3
Trophy points
1,298
Location
Buenos Aires - Argentina
Activity points
1,996
"Easier" is arguable but not the point here, anyway.

I am sure that it is also going to take a lot of space in memory. Nothing is for free.

JUst another comment: before resorting to floating point maths, make sure that you actually need them. Maybe, you can go away with fixed point maths.
 

Raju C

Member level 2
Joined
Sep 17, 2009
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore
Activity points
1,558
ya it will take lot of space thats why i want to put it in a single formula kind thing.. just i enter the frequency in GUI .. In my code i need to calculate N value.. so anyway bandwidth is fixed so i wll store it and whenever i enter frequency it should divide by BW so.. is their any option to do this??
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top