PDA

View Full Version : 32 bit multiplication



lerameur
- 14th December 2010, 20:25
Hi,
My question is concerning the pbpl option to compile.
I have this formula I need to calculate:
voltage_percent = (((voltage -134) * 2152 ) / 1000 )
this part 'voltage -134) * 2152 ' can be bigger then a word 65535,
So basically I have three question,
1) should I compile using PBPL ? I tried and it do not find pbpl.
2) Should the formula on top work since my result in within a word in size
3) should I do this instead:
voltage_percent = (((voltage -134) * 2152 )
voltage_percent Div32 1000

or any other ideas ?

O BTW, here is the message I am getting while trying to compile with PBPL:

C:\PBP>pbpl -p16f887 charge.bas
PICBASIC PRO(TM) Compiler 2.60L, (c) 1998, 2009 microEngineering Labs, Inc.
All Rights Reserved.

ERROR: Unable to find -p<pic> processor file 16f887.BAL


K

mackrackit
- 14th December 2010, 22:19
You can only use PBPL with 18Fx chips.