If you have PBP 2.50 and use a 18F
chip, you can compile with PBPL
that will give you 32 bit math.
This will give you the ability to use
numbers with a range of
-2147483648 to
+2147483647
That should solve the problem.
If you have PBP 2.50 and use a 18F
chip, you can compile with PBPL
that will give you 32 bit math.
This will give you the ability to use
numbers with a range of
-2147483648 to
+2147483647
That should solve the problem.
Dave
Always wear safety glasses while programming.
the codes that i created in 16f877 can be used when i changed to 18f, what 18f pic is almost the same as 16f877? and it must be pbp 2.50? coz im currently using 2.47 only.. thnx
Last edited by taisen83; - 5th January 2009 at 04:39.
If you want to use the LONG variable that gives you 32 bit math you will have to upgrade to 2.50.
When moving your code from a 16F to an 18F there will be some modifications needed. example, the 16F877 does not have comparators, so you may hace to turn them off on the 18F chip depending on the pins used.
As far as pin outs go, and as far as I know, all of the 40 pin PICs use the same pins for power, programming, OSC and MCLR.
The 18Fs will have several extra features, that may or may not be useful, such as USB pins and may even have an internal OSC.
An 18F4320 might be a good one to start with. It has an internal OSC, but does not have USB.
Dave
Always wear safety glasses while programming.
18f452 can also be a substitute right? coz i've seen in forums about transferring codes from 16f877 to 18f452..
Micro Chip says the 18F4520 would be the better choice.
http://www.microchip.com/stellent/id...ct2=PIC18F4520
But if you have some 452s laying around and this is not a production project then the 452 should be fine. With a little imagination![]()
Dave
Always wear safety glasses while programming.
thnx for all the help! really a great help for a beginners like me.. i'll report asap when i got the result using new IC.. thnx again!![]()
Bookmarks