Searching \ for 'Photosensitive PIC circuit' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Photosensitive PIC circuit'.

Truncated match.
PICList Thread
'Photosensitive PIC circuit'
1996\07\01@180647 by pic

picon face
It seemed so simple.  I wanted a yellow LED in my PIC16C84 design, so I
connected it via a 3K3 resistor between RA4 and Vdd.  So far so good.

Then I noticed something odd.  With the PIC spending most of its time in
sleep mode, its quiescent supply current (with the LED off) varied from
30uA to 90uA in sympathy with the ambient light level - disconnection of
the LED removed this variation.  A voltmeter (>1M impedance) showed RA4
to sit at +3.6V relative to Vss when its open-drain output was inactive.

It seems as if the photocurrent injected by the LED is entering RA4 and
affecting the operation of the PIC (maybe via the Schmitt input buffer).

Several questions spring to mind:

1.  What is causing the supply current variations?
2.  Is there any risk of misoperation of the PIC in this configuration?
3.  Would a non open-drain port pin be a better choice to drive an LED?

Any thoughts?

- Ian Chapman

1996\07\02@084057 by Wolfram Liebchen

Ian Chapman wrote:
{Quote hidden}


the inputs of CMOS circuits like the PIC don't like intermediate
input levels, because then you partially enable both of the input
amplifier transistors, making a weak rail-to-rail connection.
The more you come to the center voltage (2.5V) the more current
flows. The PIC datasheets show the input stage of the port pins,
and - as I think - also the current consumption under various
If you would use a non open collector output, this effect should
not happen, because you short-circuit the LED
(plus-rail * LED * port-pin at Vdd).



! Wolfram Liebchen, !
!        Forschungsinstitut fuer Optik          !

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