A more common "migration" would be from the 16F74 or 16C74 to the 18F452 or 18C252. Microchip has an ap note on this migration. The 18 has several more instructions that can simplify your code, but you don't have to use them right away. The 16 and 18 behave a little differently on setting flags or condition codes, especially on increments and decrements. Watch for that. Also, the word size changes the way you do jump tables. You have to shift left, then do a branch instruction. The goto is a 4 byte instruction, so you'd have to do two shifts to use it. Also, bank switching is considerably easier. There are more FSRs, and they are bigger (high and low byte). I'd have a look at the above mentioned ap note, change to the appropriate Microchip include file, and test your code! Harold > Rafael Vidal Aroca wrote: >> Hi, i'm migrating a 16F628 based system to 18F452 > > That's quite a jump. 18 pins to 40, 2K to 16K words program memory, 14 to 16 bit core. That's practially a new design, not a "migration". > >> 2. May I use the code I have running in 16F628 in 18F452 with no >> changes, > > Of course not. The two processors have different instruction word sizes for > one thing. If you wrote the original code with portability in mind, or used > something like my development environment (http://www.embedinc.com/pic) then > the source code only requires minimal changes and a rebuild. If you didn't, > it's going to be more tedius. > > > ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > -- FCC Rules Online at http://www.hallikainen.com/FccRules/ -- FCC Rules Online at http://www.hallikainen.com/FccRules/ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu