Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

PIC Controller for Multiply and Division?

Status
Not open for further replies.

Sajjadkhan

Full Member level 5
Full Member level 5
Joined
Sep 25, 2010
Messages
307
Helped
17
Reputation
34
Reaction score
16
Trophy points
1,298
Location
Rawalpindi,Pakistan
www.facebook.com
Activity points
4,199
I want to monitor remaining battery capacity by measuring and keeping record of its in/out charge current given the battery capacity. That requires floating point calculations. I have seen PIC24 series architecture and one of its block says "Hardware multiply and division". Had anyone any experience with that?

**broken link removed**
 

You don't necessarily need to use floating point for most of the calculations if you scale the numbers. If you are using C then all the hard work is done for you anyway, even if you use an 8 bit PIC. The only thing you need to watch out for is how long the calculations take. From memory a 16*16 multiply with 32 bit result is done in a single instruction cycle and divides are around 18 cycles. If the numbers are 32 bit or floating point it will take longer. I am not sure if there are times given in the C compiler help but if not you will need to benchmark it. Provided you have some 'dead time' in which to do the calculations I doubt it will be a problem with a PIC24.

Keith

- - - Updated - - -

By the way, my PIC24 experience is mostly the E and H versions but I think the F versions are similar - just slower clocks,
 

Hi,

You did not mentioned what sort of battery it is and how much is the capacity. How are you charging and discharging. There are a lot of IC's for this purpose. Gas Guage IC's from TI (BQ2010 that I worked with) are available. These IC's have the tendency to calculate the charge and discharge rate and also take care of the battery temperature.
Enjoy!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top