PDA

View Full Version : Pic 16 F877 to 18F452...?



turkuaz
- 30th October 2007, 16:04
Hi everyone.
I wrote a program for Pic16F877 and work fine. But ı want to add some more info to program ı get error message that indicate insufficient memory.
than ı bought a new pc 18F452 .I bouht it becouse ı red some information regarding F18542 that two pic is same only different is mmemory size .
I beleive that and ı compile and program 18F452 but my system does not work with 18F452 .
Do you know what is the problem.
When ı change pic 16F877 system works fine but with 18F452 not....

BobK
- 30th October 2007, 19:38
Hi Turkuaz,

I made a similar move two years ago. You are going to need datasheets on both devices and compare the area that covers analog registers and the comparator. I think but I'm not quite sure, but the problem lies within the configuration for these areas. Someone else will probably comment on this later today. If I get a chance tonight I'll take a look at them. But you should still get the datasheets from www.microchip.com and start comparing them.

HTH,

BobK

RodSTAR
- 31st October 2007, 04:55
Could you tell both PIC's compilation sizes ?

Maybe you could optimize your code by some labeling repetitive 'procedures' or 'functions'. Almost always something can be done
I've had that problem and modularization has been my solution
16F876 is to 18F252 as
16F877 is to 18F452

turkuaz
- 31st October 2007, 15:54
Thanks for your reply.
I solve this problem myself.
Problem was 18F452 enstead 18F4520.
When ı copile the prog. ı choose Pic 18F452 than program did not work.
When ı compile as 18F4520 the program work nice.

But ı want to learn another think.
I use " OPTION_REG.7 = 0" at 16F877
but at 18F452 ı getting syntax error for it.
What can ı use enstead for it.
Thaks.