Interfacing LED using push button switch to 6502

Building your first 6502-based project? We'll help you get started here.
Post Reply
paulig
Posts: 2
Joined: 28 Sep 2014

Interfacing LED using push button switch to 6502

Post by paulig »

Im newbie. a month ago I bought apatco kit to learn 65c02 programming. Fast question, does anyone can help me in Interfacing LED using push button switch to 6502 with some code?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Interfacing LED using push button switch to 6502

Post by GARTHWILSON »

Welcome.

What do you want the pushbutton to do? You could connect it from one of the 65c22 VIA port pins to ground, with a pull-up resistor to Vcc. It will need debouncing, but that can be done in software.

As for connecting the LED, it can go from one of the port pins of a 65c22 VIA to either Vcc or ground. (If to ground, put the LED's cathode toward ground. If to Vcc, put the LED's anode toward Vcc.) I would add a series resistor of at least 470 ohms if not 1K to keep the LED current (and port pin current) under control.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Post Reply