PDA

View Full Version : Multiplexing PWM pin with other outputs



bcd
- 19th September 2006, 10:15
Hi All,

Just running through a concept here. I have a button plate with LED feedback for each button.

I want to use the PWM output used to create a 'backlight' that will illuminate all the status leds at a lower level when the button feedback outputs are not high. The Backlight is driven from the PWM out from the 16f87 (via a transistor to produce the required drive for the 4 LEDS).

First thought was to use a couple of diodes (poss schottkys to reduce the V drop) to act as an old school OR gate to drive the LEDs:
(Cheesy ASCii art follows..)

<code>
PWM---[>|-----[>|--[___]---+5
...........| (LED) 560R
LED---[>|--
</code>

Any comments before I proto it and see if I blow anything up ??

Bill.

keithdoxey
- 19th September 2006, 10:41
Change the "+5" to "0V" or it wont work at all :)

bcd
- 19th September 2006, 11:24
Arr, mmm, yes

that was a test. well done.
8-)