Dale, So do I need to use #byte port_b=6 and #use fast IO(port_b) at the top of the program and then after the set_tris_b(0); type in port_b=value in the main program? Dean Matthews -----Original Message----- From: Dale Botkin [mailto:dale@BOTKIN.ORG] Sent: 06 November 2001 17:00 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]:help using CCS C code On Tue, 6 Nov 2001, D Lloyd wrote: > Is it not because of the upper case "P"/also? Presumably (uh-oh, out rolls > the "presumably"), the compiler knows about "port_b" because it is used in > the "#use fast_IO" but knows zippo about the "Port_b". Nope, CCS is case insensitive by default, so that's most likely not the problem. And oddly enough, though port_b is used in the preprocessor directive #use fast_io, it's not actually defined in th sense that you can use it as a variable. And I think there's a reason for that: I may want to define port_b as a variable, which is treated like any other variable and can be stored anywhere in RAM. I may instead want to use the #byte directive to specify *where* in memory port_b is located. So in this case port_b is local to the #use fast_io preprocessor directive. Confusing enough? 8-) Dale -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads