CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC Wizard - I/O pin config doesn't work

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rudy905



Joined: 30 Nov 2008
Posts: 2

View user's profile Send private message

PIC Wizard - I/O pin config doesn't work
PostPosted: Sun Nov 30, 2008 1:08 pm     Reply with quote

I am a newbie with this compiler, but very experienced with PICs, and this just doesn't make sense...

When I create a project with the wizard, selecting which pins are inputs, outputs, or analogs in the I/O pin config section doesn't generate any code. You can plainly see when you click the CODE tab in the I/O pin config section, that none of your selections generate any code, except when you rename a pin. So you pick some pins as outputs, generate your project, and your program doesn't work because the pins are inputs by default, and no code was generated to make them outputs. Am I missing something???

Thanks,
Randy
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Nov 30, 2008 1:38 pm     Reply with quote

Randy,
The reason why no code appears is because none is required. By default
pin initialization occurs within the code when the pin is actually used by a
pin specific command (i.e input, output, port etc. comands). The Fast_IO
instruction disables this feature.

If you look at posts discussing the TRIS command you will find that it is
generally not required except for time critical appications. The wizard is a
basic code generation utility and leaves advanced things like TRIS to the
user to add as required. Maybe, on the I/O page they should have a
FAST_IO option that inserts TRIS commands....

So then comes the question, "why do they even ask for you to define
which pins are inputs or outputs?" Good question.. Only changng a pin
to ADC (analog) generates code. The other options do not generate any
code (correctly so).

In any case, I have not changed the port settings around in the wizard
then looked to to see if any listing code changes occur. So there may be
more to this internally than is apparent.

Maybe someone else here has some additional insight...

dave
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group