Page 1 of 1
Interfacing LED using push button switch to 6502
Posted: Tue Jun 09, 2015 8:33 pm
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?
Re: Interfacing LED using push button switch to 6502
Posted: Tue Jun 09, 2015 9:46 pm
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.