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
Message
Re: [AVR-Chat] Re: How switches work
2008-09-11 by Jim Wagner
Attachments
- No local attachments were found for this message.