on the note of that IR remote. i wonder if you could decode the signal in software with just a VIA (for example IRQ on the first low pulse, then stay in ISR until the whole thing is read). even at a measly 1MHz that seems pretty doable.
Connecting a 16-key keypad to VIA: Did I do it right?
Re: Connecting a 16-key keypad to VIA: Did I do it right?
I love the "no escape" key, it's very ominous! 
on the note of that IR remote. i wonder if you could decode the signal in software with just a VIA (for example IRQ on the first low pulse, then stay in ISR until the whole thing is read). even at a measly 1MHz that seems pretty doable.
on the note of that IR remote. i wonder if you could decode the signal in software with just a VIA (for example IRQ on the first low pulse, then stay in ISR until the whole thing is read). even at a measly 1MHz that seems pretty doable.
Re: Connecting a 16-key keypad to VIA: Did I do it right?
GARTHWILSON wrote:
Just use a 4x4 with one of the keys being a shift key.
I chose to have shift-A mean, "switch to Address entry mode." Shift-D means, "switch to Data entry mode," and shift-E means Execute starting at the currently displayed address. The other keys also have a "shift" interpretation, but I can't remember what they are -- I would have to refer to my records!
(Oh -- and the other red pushbutton is reset. I trimmed its plastic knob because I wanted reset to be more difficult to actuate.)
Welcome, Jeff!
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- JeffJetton
- Posts: 6
- Joined: 18 Mar 2024
- Location: Nashville, Tennessee, USA
- Contact:
Re: Connecting a 16-key keypad to VIA: Did I do it right?
Michael wrote:
One possible low-cost solution, if I may? I've used some 24-key and 44-key IR Remotes in PIC projects in the past. The IR Receiver IC comes with the keypad and only needs a single pin and pull-up on the host. The NEC IR protocol is relatively easy to decode and you can print custom keypad overlays.
- JeffJetton
- Posts: 6
- Joined: 18 Mar 2024
- Location: Nashville, Tennessee, USA
- Contact:
Re: Connecting a 16-key keypad to VIA: Did I do it right?
Dr Jefyll wrote:
Welcome, Jeff!
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Connecting a 16-key keypad to VIA: Did I do it right?
Proxy wrote:
I love the "no escape" key, it's very ominous!
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Connecting a 16-key keypad to VIA: Did I do it right?
Regarding Infrared control. Yes you can http://www.6502.org/users/andre/icaphw/remote.html
Caveat: that was many years ago and IR remote controls may have changed.
Caveat: that was many years ago and IR remote controls may have changed.
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
Re: Connecting a 16-key keypad to VIA: Did I do it right?
IR keypads - great idea - I should have thought it that for a project I'm looking at - moreso as I've used them in the past...
The easiest thing these days for receiving IR is to use a dedicated IR detector and demodulator. All remotes (TV, Radio, Keypad for your RGB LEDs, etc.) use a modulated signalling method - the modulated signal is anywhere from 30Khz to about 56Khz - and ideally you need to match the receiver to the transmitter. I have used the TSOP38236 receiver in the past - those last 2 digits are the frequency, 36 here means the carrier is 36Khz.
That then gives you the bit-stream from the sending device.
I wrote some code for an ATmega MCU a few years back (all in C) and my strategy was to sample the incoming bits (actually the time between bit changes - the input pin triggering an interrupt on falling edges) into a buffer then analyse the buffer for various start bits, bits to skip and the bit pattern that represents a logic 1 and logic 1. A 64 byte buffer was big enough for all the controllers I tried. (The timestamps were 8 bits wide). When trying a new controller, I'd put the code into "discovery" mode where it did the 64 samples then just printed them on the screen where it was relatively easy to work out the magic numbers. I'm sure there may be a better way but this worked extremely well.
Also a good test of the transmitter is to point it at your mobile phone in camera mode. You ought to see the IR LED light up.
-Gordon
The easiest thing these days for receiving IR is to use a dedicated IR detector and demodulator. All remotes (TV, Radio, Keypad for your RGB LEDs, etc.) use a modulated signalling method - the modulated signal is anywhere from 30Khz to about 56Khz - and ideally you need to match the receiver to the transmitter. I have used the TSOP38236 receiver in the past - those last 2 digits are the frequency, 36 here means the carrier is 36Khz.
That then gives you the bit-stream from the sending device.
I wrote some code for an ATmega MCU a few years back (all in C) and my strategy was to sample the incoming bits (actually the time between bit changes - the input pin triggering an interrupt on falling edges) into a buffer then analyse the buffer for various start bits, bits to skip and the bit pattern that represents a logic 1 and logic 1. A 64 byte buffer was big enough for all the controllers I tried. (The timestamps were 8 bits wide). When trying a new controller, I'd put the code into "discovery" mode where it did the 64 samples then just printed them on the screen where it was relatively easy to work out the magic numbers. I'm sure there may be a better way but this worked extremely well.
Also a good test of the transmitter is to point it at your mobile phone in camera mode. You ought to see the IR LED light up.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/