electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Pic 18F assembly with GUI problem


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Pic 18F assembly with GUI problem
Author Message
Raju C



Joined: 17 Sep 2009
Posts: 43
Location: Bangalore


Post04 Nov 2009 3:58   

Pic 18F assembly with GUI problem


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..
Back to top
btbass



Joined: 20 Jul 2001
Posts: 1187
Helped: 113
Location: Oberon


Post04 Nov 2009 8:28   

Re: Pic 18F assembly with GUI problem


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.
Back to top
atferrari



Joined: 29 Jun 2004
Posts: 207
Helped: 3
Location: Buenos Aires - Argentina


Post04 Nov 2009 8:50   

Pic 18F assembly with GUI problem


"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.
Back to top
Google
AdSense
Google Adsense




Post04 Nov 2009 8:50   

Ads




Back to top
Raju C



Joined: 17 Sep 2009
Posts: 43
Location: Bangalore


Post04 Nov 2009 9:05   

Pic 18F assembly with GUI problem


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??
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Pic 18F assembly with GUI problem
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Problem with 18f series PIC (9)
Motor Dc controller with pic 18f (4)
LCD Software with PIC 18f family (1)
How to decide for compiler to use with PIC 18F in MPLAB? (6)
Pic assembly problem (1)
Pic assembly problem (2)
Assembly Problem PIC 18F4520 Please help/Give hints!!! (1)
PIC 18F series performance (7)
send sms using PIC 18F (3)
BCF, BSF instructions on PIC 18F (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS