On Fri, 11 May 2007 08:41:39 +0100, you wrote: >>What do you think I might have to watch out for? Will the assembly >>code for the 16F device work straight away on the 18F device? > >I haven't done any 16 to 18 series conversions, but my understanding is the >answer is "Depends". If you have written the code so that it is designed for >conversion, possibly using an environment like Olins where the macros take >care of many of the differences, then the conversion should be straight >forward. > >>And can I just replace the 16F device with the 18F device in my circuit? > >>From what you have already said about pinout, it sounds like it should be >straight forward. However any pin where you looked carefully at voltage >levels or current capability will need the same scrutiny again. > >>Anything that needs to be configured differently? > >The 18 series do have a more comprehensive config word selection. Also I >imagine one of the reasons for doing the change is to make use of the >hardware multiply instruction to reduce execution times. If this is not the >case, I winder why you are looking at the conversion. > >I believe Microchip do have an application note on converting from 16 to 18 >series. IIRC it is pretty old, and dealt with 16C to 18C, but much of it >should be relevant. The 18F452 periperals are mostly designed to be backward-compatible to the older parts in their default configuration. Mostly. the 4520 has a few additional differences - agin the default settings tend to be backward compatible except the ADC input channel config registers, and these will almost certainly need changing. Also watch the config settings for the 4520, as this chip can use PortB as ADC in which can mess things up if it's enabled unintentionally. Another significant difference is that on the 18F, the WDT prescaler setting can't be changed from software - it is a configure-only setting. This could really ruin your day if your old app relied on using different WDT prescaler settings. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist