PDA

View Full Version : Analog 627



ChrisMicro
- 5th December 2010, 11:53
Can I use port a 0-1 as analog inputs and the rest as digital output on the PIC16F62x? and how do I do it?

cncmachineguy
- 5th December 2010, 14:03
Had to reply just cuz I like your avaitar! But Also, You realize you don't have Analog Inputs so to speak, you have analog comparators. At least thats how I read the datasheet.

As far as your original queston goes, I think yes, just set CMCON for the AN inputs you want, and then TRISA for outputs where you want

Acetronics2
- 6th December 2010, 07:26
Hi, Chris

you even can use a digital input as an analog one ....

with the RCTime function ... ;)

Alain

ChrisMicro
- 6th December 2010, 08:41
Had to reply just cuz I like your avaitar! But Also, You realize you don't have Analog Inputs so to speak, you have analog comparators. At least thats how I read the datasheet.

As far as your original queston goes, I think yes, just set CMCON for the AN inputs you want, and then TRISA for outputs where you want

And I like yours, cncmachineguy no it is both I always use porta for AD conversion but I never tried it with only 2 ports as AD and the rest output see the lower down in the data sheet.