Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: LED & Button connection

2006-05-29 by c.barbaro

Hi,

I don't know the the PIC18 port hardware details but,
regarding your question 2, why configure the port pin as
output?
Usually the switch is connected between the pin and gnd,
the pin is an input and you read high when switch is off and
low when switch is on.
Regarding the LED, I can't easily imagine how it is connected:
is it lit by the CPU internal pullup resistor and turned
off driving the port pin low?

The processors in LPC family have some pins open collector
(see the I2C interface pins), but unfortunately no internal
pullup resistor.
Best regards

--- In lpc2000@yahoogroups.com, Èâàí Êîí÷àëîâñêèé <Hummel-80@...> wrote:
>
> 
> Hello All.
> 
> >   I have two questions for you:
> >   1. Is it possible to connect LED (super bright 1mA) to port pin
> >   without additional current limiting resistor?
> >   2. Is it possible to connect button between port pin and
> >   ground while configuring this port pin as output with
> >   high level and read its state (button pressed or not)?
> 
> First of all thanks to everybody for your answers.
> 
> Secondly i am not a newby in electronics and MCUs (as i
> think). So why i was asking this question? Lately i worked
> with PIC18 MCU, as you probably know it has port B with
> internal pull-up resistors. I use to connect buttons and
> LEDs to it without any resistors (of course). In Philips`
> datasheets i found no port schematics and decided to ask in
> this conference.
> 
> -- 
> Best regards,
>  Hummel
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.