Jason,
The PWM (analog output(s)) have dedicated pins, and you can't move these around.
And the A/D options available in ADCON is what you have to play with... no way around
this!
You must adapt your program and circuit layout accordingly.
Yes ports can be reconfigured at runtime, and this is sometimes done, although not all
that
common. If you do this take care so no output pin drives current into an external
output,
or to GND or VCC (creates a short circuit)... alternatively put current limiting resistors
on
all pertinent pins, at least during development so any 'bugs' won't burn out the chip.
Jason Hsu wrote:
> For the PIC16F72, I'm using pins 0 and 1 of Port A as analog inputs
> while ALL of the other pins (rest of Port A, all of Port B, and all of
> Port C) need to be digital outputs.
>
> However, I cannot configure ADCON to do this. Of all the options
> available by configuring ADCON, NONE have the analog/digital
> combination I need.
>
> Any suggestions? Would there be anything wrong with configuring pins
> 0 and 1 of Port A as analog inputs during the part of the program that
> requires this and then configuring them as digital outputs during the
> other parts of the program (the times that the input sampling function
> isn't needed)? In my project (SWR/wattmeter display), the timing
> isn't that critical, since I'm using a 3.58 MHz crystal, and the human
> eye won't notice things that take place for a few microseconds out of
> a 1 ms cycle.
--
*******************************************
VISIT MY HOME PAGE:
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Thanks. I'll just have the ports reconfigured at the key times. I'm
surprised that it's rarely done. I can't possibly be the first person
in the history of the world to find that the available analog/digital
port configurations are not suitable. I'm not concerned about
excessive current in any of the pins, because both of my designated
input pins have 10 kohms between them and their respective voltage
sources.
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )