Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: How switches work

2008-09-11 by Jim Wagner

A couple of comments about problems that starting programmers often  
have. I did NOT look at your code so these might not be the real issues:

1) The common arrangement is to use an internal pull-up with a switch  
to ground. When the switch is pushed, you read a ZERO for that port pin.

2) One common arrangement for LEDs is to have the diode connected  
between Vcc and the port pin. In this situation, the LED is ON when  
the port pin is low. The other common arrangement is LED between port  
pin and ground; then the LED is ON when you raise the port pin. On an  
STK500, the topology, though it uses a transistor, etc, is basically  
the first one.

Jim Wagner
Oregon Research Electronics

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.