|
|
View previous topic :: View next topic |
Author |
Message |
rudy905
Joined: 30 Nov 2008 Posts: 2
|
PIC Wizard - I/O pin config doesn't work |
Posted: Sun Nov 30, 2008 1:08 pm |
|
|
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: 1933 Location: Norman, OK
|
|
Posted: Sun Nov 30, 2008 1:38 pm |
|
|
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 |
|
|
|
|
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
|