![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
migrating from 16F886/7 to 18F ?? |
Posted: Sun Jul 13, 2008 7:53 pm |
|
|
assuming one is happy with the assorted peripheral and I/O capability of the 16f88x but wants
much program and user ram
( as can be hard in a 28 and 40 pin package - )
any suggestions on 18F ? |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Mon Jul 14, 2008 2:32 am |
|
|
Probably the 2520 (for the 28pin device), and 4520 for the 4 pin device. Same basic peripherals, double the ROM, and about five times the RAM. Generally cheaper than the older chips. You can also gain extra I/O pins, with the MCLR pin programmable as an input, and if your application does not require really high accuracy, you can use the internal oscillator, to give two more pins here. Clocks over 50% faster. Be prepared for 18 code to be slightly larger for things like interrupt handlers, but smaller for things like multiply.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
migration thnak you |
Posted: Mon Jul 14, 2008 6:07 pm |
|
|
thanks for your generous help
the microchip site SAYS migration is EZ - but in half an hour of poking around - i never could FIND that pesky interactive migration tool they talked about ...
have you ??
either way MUCH appreciated |
|
![](templates/subSilver/images/spacer.gif) |
dyeatman
Joined: 06 Sep 2003 Posts: 1924 Location: Norman, OK
|
|
Posted: Mon Jul 14, 2008 7:27 pm |
|
|
Be careful of the pitfall that gets a lot of folks... Many of the register addresses are different so, if things don't work correctly, be sure to double check them...
You might get lucky and all the ones you use are in the header file and no additional changes will be required.
Also, if you get a "not defined" message for a constant during the compile check that the spelling hasn't changed in the .H file.
Dave |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Tue Jul 15, 2008 2:09 pm |
|
|
The migration tool, is for Microchip assembler code, not CCS.
Migration with CCS, varies according to how your code is written.
If you use 'pure CCS' code (no assembler, and no direct register accesses), then all that needs to be done, is to change the header references, get the 18 compiler version (PCH, rather than PCM) update the fuses (generally the 18 chips add a few new fuses), compile, and the code will probably run (99% probability).
If you use direct register accesses, these will need to be updated.
If you use assembler, this will need to be re-written (though things like the automatic register addressing of the CCS compiler, make the changes small).
If the chip adds extra peripherals, these will need to be disabled.
I have a program that has versions running in both the 18F452, and the 16F887. The same source code is used for both, with about a dozen lines, selected by a #ifdef, changing the fuses required. Otherwise, it runs 'as is'.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Tue Jul 15, 2008 3:34 pm |
|
|
Ttelmah wrote: | Probably the 2520 (for the 28pin device), and 4520 for the 4 pin device. Same basic peripherals, double the ROM, and about five times the RAM. Generally cheaper than the older chips. You can also gain extra I/O pins, with the MCLR pin programmable as an input, and if your application does not require really high accuracy, you can use the internal oscillator, to give two more pins here. Clocks over 50% faster. Be prepared for 18 code to be slightly larger for things like interrupt handlers, but smaller for things like multiply.
Best Wishes |
I suggest looking at the 2620/4620 instead. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Wed Jul 16, 2008 2:55 am |
|
|
A bit 'roundabouts and swings'. I have had more errata problems still showing their faces on these versions of the chips. Both derivatives have had a lot of problems, but the 2520 has been working OK, for the last couple of years, while the 2620, still shows some real surprises.
I do still consider the 2520, slightly more reliable.
I does depend 'massively' on how much more memory is needed. These give 4* the ROM, versus the 2520, giving 2*.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|