[newbie] MPLAB help
Lea email (remove spam text)
At 12:29 AM 10/25/99 +0200, you wrote:
> bsf porta,0
> bcf porta,1
>Is there a way i can define names for porta,0 and porta,1 so that in the
>code i can use the names, instead of the pin names? Then if i move something
>around, all i need to do is change the name -> pin assignment and recompile,
>instead of searching all the code for porta,0 etc.
you can doit, It is very helpfull to know what are you turning setting or
when writing the code :-).
here is an example:
#define _txda PORT_A,1 ;SPI txdata
#define _rxda PORT_A,2 ;SPI rxdata
#define _we PORT_A,3 ;write enable/1
I usually do it at the begining of the program.
so if you whant to do : BCF PORT_A,1
just do BCF _txda
easier isn't it?.
Hope it helps.
Leandro J. Laporta (LU2AOQ)
wrk: Arg. Assoc. for Space Technology.
ham: TCP/IP high speed group HSG
See also: www.piclist.com/techref/microchip/begin.htm?key=mplab
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the