John Nall wrote: > someone like Olin might jump in and tell > me how to do it with just one instruction. :-) > > Anyway, in the meantime, I have discovered a few more like that. So be > it. Not very elegant, though. There are a few operations for which a PIC 18 has a specific instruction that the PIC 30 does not. There are a few skip instructions, but there are far more BRA instructions for conditionals. Once you go native on the 30F you won't use the file register operations much, and generally do arithmetic decisions with BRA instructions. The one I notice missing most is some sort of decrement and test in one instruction, like DECFSZ on other PICs. The PIC 30 does have the DO instruction for looping, but it only has two hardware levels so you reserve that for the rare bit of truly critical code. You generally don't use file register instructions because these can only reach a subset of the address space. You can define some critical words to be in near memory so that these instructions can be used, but you don't want to do that generally in non-critical code (even though the RAM space of most dsPICs is small enough so that all of it is "near", it's just not a good practise.). I hadn't jumped in here before because I personally don't see much point in a PIC 18 to PIC 30 translator, other than it's something you want to do just because you want to do it. The differences in peripherals are going to make all put purely "internal" code pretty much impossible. You can make a PIC 30 stand on its head and waste a bunch of cycles and sortof act like a PIC 18 some ot the time with a lot of work. I'd rather spend the time to recode the application into native PIC 30 and get the full benefit of the processor. If you aren't pushing the speed, then why isn't the 18F good enough in the first place? ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist