Searching \ for '16C74 Analog In Pins' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=analog
Search entire site for: '16C74 Analog In Pins'.

Truncated match.
PICList Thread
'16C74 Analog In Pins'
1999\03\07@142006 by Vincent Deno

flavicon
face
Actually, that's not quite what I was asking.  I do need to use a couple
pins as analog in (for the ADC).  But I was wondering if it was possible
to use pins actually set as analog pins in ADCON1 as digital out by
clearing the appropriate tris bits.

Guess it's not possible according to previous posting.

Thanks Again,

Vincent Deno

{Quote hidden}

--------------
Vincent Deno
Design Engineer
Theta Digital Corp.
http://www.thetadigital.com
denovjspamKILLspamemail.uc.edu
_____________
| ____   ____ |
|/| | | | | |\|
| | |/| |\| | |
| | | | | | | |
| |_/ | | \_| |
| |   | |   | |
|_/  /___\  \_|

1999\03\07@170609 by Dwayne Reid

flavicon
face
>On Sun, Mar 07, 1999 at 05:29:27AM -0500, Vincent Deno wrote:
>> Has anyone encountered problems using pins assigned as analog in (via
>> ADCON1) as digital out (set in TRIS register)?  I realize these pins
>
>It won't work. If you configure a pin as an analog input, then clearing
>the corresponding TRIS bit will make it useless for analog, but will
>not make it into an output pin.


Sorry to have to disagree, Clyde.  Clearing the analog TRIS pins DOES turn
them into outputs.  But you cannot use any Read-Modify-Write instructions
with port A since those pins always read as 0.

Perhaps I should clarify things a bit:  one of my products uses only 2 a/d
inputs on a 16c73.  ADC_CONFIG is 00000100 which sets ra 0,1,2 to a/d inputs
and the rest as digital i/o.  Ra3 is usable as output only (not input) and
is always cleared if I perform any R-M-W operation on port A.  I have
numerous warnings scattered thru that code to remind me of this so that it
doesn't bite me (again).

I can't speak of any other parts - I haven't had to find out.  But pin RA3
is definitely usable as a digital output on a '73 even though it is also
configured as analog input.

dwayne


Dwayne Reid   <.....dwaynerKILLspamspam.....planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice          (403) 487-6397 fax

Celebrating 15 years of Engineering Innovation (1984 - 1999)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
My posting messages to Usenet neither grants consent to receive
unsolicited commercial email nor is intended to solicit commercial
email.

1999\03\08@000748 by Clyde Smith-Stubbs

flavicon
face
Dwayne,

> Sorry to have to disagree, Clyde.  Clearing the analog TRIS pins DOES turn
> them into outputs.  But you cannot use any Read-Modify-Write instructions
> with port A since those pins always read as 0.
...
> I can't speak of any other parts - I haven't had to find out.  But pin RA3

Ok, maybe I should clarify that - my tests that determined the above were done
on a 16C71. Maybe the 16C73 and 16C74 are different, but I checked the datasheet
s
for both the '71 and '74 before posting my message, and the wording about
the analog inputs is the same. Furthermore I probably didn't test RA3.

So we may be both right; and the '74 could be different again :-) Personally
I wouldn't rely on it.

Regards, Clyde

--
Clyde Smith-Stubbs               |            HI-TECH Software
Email: EraseMEclydespam_OUTspamTakeThisOuThtsoft.com          |          Phone            Fax
WWW:   http://www.htsoft.com/    | USA: (408) 490 2885  (408) 490 2885
PGP:   finger clydespamspam_OUThtsoft.com   | AUS: +61 7 3355 8333 +61 7 3355 8334
---------------------------------------------------------------------------
HI-TECH C: compiling the real world.

1999\03\08@032213 by Gerhard Fiedler

picon face
At 15:04 03/08/99 +1000, Clyde Smith-Stubbs wrote:
>Ok, maybe I should clarify that - my tests that determined the above were done
>on a 16C71. Maybe the 16C73 and 16C74 are different, but I checked the
>datasheets
>for both the '71 and '74 before posting my message, and the wording about
>the analog inputs is the same. Furthermore I probably didn't test RA3.

now here i'd just like to clarify my understanding of the english language
(even though i agree with you on that i'd probably not rely on it :)

in my data sheets of all the 16c7x series it says "the trisa register
controls the direction of the ra pins, even  when they are being used as
analog inputs" in the porta chapter, and "the port pins that are desired as
analog inputs must have their corresponding tris bits set. if the tris bit
is cleared, the digital output level (Voh or Vol) will be converted" in the
adc chapter.

i read this as that the output level will actually be a digital one (Voh or
Vol) in case the tris bit is cleared (which is consistent with the
schematic of the porta inputs in the data sheets). do you read something
different here?

ge

1999\03\08@080820 by Clyde Smith-Stubbs

flavicon
face
On Mon, Mar 08, 1999 at 12:14:22AM -0800, Gerhard Fiedler wrote:

> in my data sheets of all the 16c7x series it says "the trisa register
> controls the direction of the ra pins, even  when they are being used as
> analog inputs" in the porta chapter, and "the port pins that are desired as
> analog inputs must have their corresponding tris bits set. if the tris bit
> is cleared, the digital output level (Voh or Vol) will be converted" in the
> adc chapter.
>
> i read this as that the output level will actually be a digital one (Voh or
> Vol) in case the tris bit is cleared (which is consistent with the
> schematic of the porta inputs in the data sheets). do you read something
> different here?

Well, at no point does it actually say that if the TRIS bit is cleared will
the digital output level appear on the pin; the statement about "the output
level will be converted" means that the analog input will see the digital output
,
but says nothing about what will appear on the external pin.

Certainly nothing in the text is a clear assurance that with TRIS cleared the
pin will work as an output, OTOH I agree with you that the logic diagram does se
em
quite clear; but I know that in practice, I found it not to work. Also remember
that the logic diagram is illustrative only, and is not the actual circuit.

If I get time, I'll run some tests again, just to get to the bottom of this.

Cheers, Clyde

--
Clyde Smith-Stubbs               |            HI-TECH Software
Email: @spam@clydeKILLspamspamhtsoft.com          |          Phone            Fax
WWW:   http://www.htsoft.com/    | USA: (408) 490 2885  (408) 490 2885
PGP:   finger KILLspamclydeKILLspamspamhtsoft.com   | AUS: +61 7 3355 8333 +61 7 3355 8334
---------------------------------------------------------------------------
HI-TECH C: compiling the real world.

1999\03\08@114543 by Bob Blick

face
flavicon
face
I've not followed all the messages in this thread, but I have used
analog in pins as outputs. There are several caveats.
1) Any read-modify-write instructions on any pin on that port will
change your pin to a 0.
2) Any read of the pin or port will show the pin as a 0.
3) All writes must be to the entire port(see #1).

I've only done this on a 16C74A.

Cheers,
Bob

1999\03\09@170346 by John Payson

flavicon
face
|Has anyone encountered problems using pins assigned as analog in (via
|ADCON1) as digital out (set in TRIS register)?  I realize these pins
|wouldn't function properly in digital in mode but that is of no
|consequence, they're always used as output.

As far as I can tell, the ADCON register has two effects:

[1] It enables or disables the ADC.  If _ANY_ port pin is selected to
   be an analog input, then the ADC can read all of them.

[2] It disables the digital input registers on the pins configured as
   "analog".  This eliminates the extra current consumption that could
   result from having a CMOS input biased at half-rail.

Note that pins may be used for analog input, even when configured as
digital, provided that the ADC is turned on.  Current consumption will
be increased somewhat, and digital reads of the port may cause some
small capacitive transients to be coupled to the pin, but otherwise
there shouldn't be any real problems.

As for configuring the pins as analog and then using them for digital
outputs, that works fine provided that you don't use any read/modify/
write operations on the port.  If you use a "shadow register" and copy
that to the real port when it's changed, you should do fine.

1999\03\09@231809 by Vincent Deno

flavicon
face
Again, thanks for everyone's responses and recommendations.  For my
application, I will be safe in using the "analog" pins as output because I
will always know the correct state of the pins used as output and will not
need to use any read/modify/write operations.

Regards,

Vincent Deno

PS.  Am I the only one who can't read their own posting consistantly?

{Quote hidden}

--------------
Vincent Deno
Design Engineer
Theta Digital Corp.
http://www.thetadigital.com
RemoveMEdenovjTakeThisOuTspamemail.uc.edu
_____________
| ____   ____ |
|/| | | | | |\|
| | |/| |\| | |
| | | | | | | |
| |_/ | | \_| |
| |   | |   | |
|_/  /___\  \_|

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...