If all you want to do is set certain output pins high/low you can do = this easily in PICC, it has already defined variables for the pins, and it depends of course which target PIC you're compiling to. Note that Microchip's C18 compiler uses a different syntax for this (usining a = union on the port, I think). For example: // Give the output bits some nice names (which I noticed you did, and = then commented out) #define CS RA0 // Chip Select output #define SCLK RA1 // Serial Clock output #define SDI RA2 // Serial Data In output // Make CS high: CS =3D 1; // Make SCLK low SCLK =3D 0; One thing I did notice is that you didn't set any fuses (configuration = bits) in your program, without those, depending on how you're programming your pic, it most likely won't work, or wont do what you want it to. The = fuses set things like osc type (HS, XT), watchdog timers, brownout timers, = etc. Also, you are using Port A, and port A usually has special features, = such as an A/D, and you need to specifically turn off this functionality = otherwise those pins won't behave as expected. Not sure about the specific PIC you = are using, but some PIC's have certain Port A pins as input only (is is that output only?). It might be better to use Port B for testing purposes. PS, I'm still pretty new to PICs and the C compilers, so I apologize in advance for any mistakes :-). _____ =20 Andr=E9 Miller =09 -----Original Message----- From: pic microcontroller discussion list = [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Anthony Van Herrewege Sent: 24 March 2004 04:59 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] PGA2310 Control Code > 5. Does your C compiler support bit-wide variables? > If so, it'd > make your code more readable and less error-prone, since you > could simply write "SDI =3D 0" or whatever, instead of the > complicated logical operations. If not, "set" > and "clear" > macros would do almost as well. I had something like that first, but that seemed too simple. I'm using = the High-Tech PICC18 demo, but I can't seem to get it to work. I might also = try the Microchip C18 compiler demo. I guess they support 1 bit wide vars? Thanks, Anthony =3D=3D=3D=3D=3D Website: http://members.lycos.nl/anthonyvh -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.