EmbeddedRelated.com
Forums

PIC18 Pseudo-Instructions

Started by PigPOg October 31, 2007
Hi. Can anyone advise please? 

I'm migrating code from a base device to a PIC18Fxxx. No real problems
except the original code uses Pseudo-Instructions and I can't find
equivalent(s) for the higher-end devices. Do they exist for the 18F
parts or do I have to take say, CLRC and use BCF STATUS,C instead? 

Cheers, 
Simon 
On Wed, 31 Oct 2007 10:29:41 +0000, the renowned PigPOg
<simon@capella.co.uk> wrote:

>Hi. Can anyone advise please? > >I'm migrating code from a base device to a PIC18Fxxx. No real problems >except the original code uses Pseudo-Instructions and I can't find >equivalent(s) for the higher-end devices. Do they exist for the 18F >parts or do I have to take say, CLRC and use BCF STATUS,C instead? > >Cheers, >Simon
AFAIUI, Microchip is discouraging the use of pseudo instructions even for the 12 & 14 bit cores. I think it's a good idea to get rid of them, particularly the ones that generate more than one instruction. If you must have them, simply write some macros, but I would definitely use upper case so it's obvious that they are macros. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
On Wed, 31 Oct 2007 08:01:25 -0500, Spehro Pefhany
<speffSNIP@interlogDOTyou.knowwhat> wrote:

>On Wed, 31 Oct 2007 10:29:41 +0000, the renowned PigPOg ><simon@capella.co.uk> wrote: > >>Hi. Can anyone advise please? >> >>I'm migrating code from a base device to a PIC18Fxxx. No real problems >>except the original code uses Pseudo-Instructions and I can't find >>equivalent(s) for the higher-end devices. Do they exist for the 18F >>parts or do I have to take say, CLRC and use BCF STATUS,C instead? >> >>Cheers, >>Simon > >AFAIUI, Microchip is discouraging the use of pseudo instructions even >for the 12 & 14 bit cores. I think it's a good idea to get rid of >them, particularly the ones that generate more than one instruction. > >If you must have them, simply write some macros, but I would >definitely use upper case so it's obvious that they are macros. > > >Best regards, >Spehro Pefhany
Thanks Spehro - someone on the Microchip forum has suggested Macros as well. I'll do this instead. Ta, Simon
On Oct 31, 3:29 pm, PigPOg <si...@capella.co.uk> wrote:
> Hi. Can anyone advise please? > > I'm migrating code from a base device to a PIC18Fxxx. No real problems > except the original code uses Pseudo-Instructions and I can't find > equivalent(s) for the higher-end devices. Do they exist for the 18F > parts or do I have to take say, CLRC and use BCF STATUS,C instead? >
Strip off the pseudo-instructions. Karthik Balaguru
On Wed, 31 Oct 2007 08:00:46 -0700, karthikbalaguru
<karthikbalaguru79@gmail.com> wrote:

>On Oct 31, 3:29 pm, PigPOg <si...@capella.co.uk> wrote: >> Hi. Can anyone advise please? >> >> I'm migrating code from a base device to a PIC18Fxxx. No real problems >> except the original code uses Pseudo-Instructions and I can't find >> equivalent(s) for the higher-end devices. Do they exist for the 18F >> parts or do I have to take say, CLRC and use BCF STATUS,C instead? >> > >Strip off the pseudo-instructions. > >Karthik Balaguru
Macros done - code runs perfectly! Cheers, Simon