Searching \ for ' [PIC] %5BPIC%5D%3A' 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/devices.htm?key=pic
Search entire site for: '5BPIC5D3A'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [PIC] %5BPIC%5D%3A'
2001\04\15@065920 by Jinx

face picon face
 Can someone please tell me a way to connect eight momentary   action pushbuttons to a PIC so that each button will light a
 --------------------

 It depends on which PIC you want to use and what else is
 connected to it. For example, doing this on a 12C508 is   possible but would involve external circuitry. An F84 or   other mulitport PIC could do this on it's own. Although an   F84 or one with a similar number of i/o pins would perhaps
 be configured to use the most number of i/o pins that would reliaby
 detect the first pushbutton press, and then maybe use either the
 same i/o as LED drivers, or alternatively multiplex the LEDs with an   external shift register. If you can specify a particular PIC, then it will
 be easier to make suggestions

 Apologies for the drift into HTML if you can see it, the original post must   have it turned on. My mail program is set to plain text

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\04\15@173626 by Craig Cassin

flavicon
face
Here is what I suggest:

use  8 output pins
one input pin
pull down the input with a 10k resistor
every output pin is connected to the input pin
thru a switch
the switchs also have an led and resistor
connected to ground on the side opposite from
the output

using 1/8 duty cycle,
set each output pin in turn to 5v
at this time also set the other outputs to inputs
if someone presses a switch, 5v is detected
at the input, so the code should pause until the 5v is gone.
the led will light on the switch press.
{Original Message removed}

2001\04\15@223820 by Spehro Pefhany

picon face
At 02:37 PM 4/15/01 -0700, you wrote:
>Here is what I suggest:
>
>use  8 output pins
>one input pin
>pull down the input with a 10k resistor
>every output pin is connected to the input pin
>thru a switch
>the switchs also have an led and resistor
>connected to ground on the side opposite from
>the output
>
>using 1/8 duty cycle,
>set each output pin in turn to 5v
>at this time also set the other outputs to inputs
> if someone presses a switch, 5v is detected
>at the input, so the code should pause until the 5v is gone.
>the led will light on the switch press.

You can use one more output to keep the lights from
all lighting while it is scanning (keep it high (or open)
until a hit is detected- it goes to the LED common).

Also, when the first press is detected multiple leds may
show until some of the switches are released. You'd need
diodes on each switch to get around that. I'd suggest an
18-pin PIC16F627 with internal 4MHz clock for minimum parts
count.

Best regards,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam@spam@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2001\04\16@093533 by Craig Cassin

flavicon
face
----- Original Message -----
From: "Spehro Pefhany" <.....speffKILLspamspam.....INTERLOG.COM>
To: <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Sent: Sunday, April 15, 2001 7:36 PM
Subject: Re: [PIC] %5BPIC%5D%3A


{Quote hidden}

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=
> Spehro Pefhany --"it's the network..."            "The Journey is the
reward"
> speffspamspam_OUTinterlog.com             Info for manufacturers:
http://www.trexon.com
> Embedded software/hardware/analog  Info for designers:
http://www.speff.com
> Contributions invited->The AVR-gcc FAQ is at:
http://www.bluecollarlinux.com
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=
>
> --
> http://www.piclist.com#nomail Going offline? Don't AutoReply us!
> email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body
>
>
>
you are right. 8 diodes are needed to prevent all the leds from lighting.
16 ports cuts the parts list to 8 switches and 8 leds
(the led outputs can be duty-cycled )

-thanks

-Craig

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


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