123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|729|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Hardware and Technology -> Building a Touchable Keyboard

Page : 1 Prev 2 3 Next 4 5
Fri, 09 Aug 2019, 06:51
steve_ancell
You're better off using a 74HC165 shift register (parallel in serial out) rather than using a resistor ladder, shift registers can also be daisy-chained for even more pins if needed. I did a resistive ladder a while back, it works for one button at a time but not very practical for multiple inputs at a time. In theory it could be done using a resistor ladder but the algorithm may glitch due to voltage spikes or batteries changing voltage on usage etc.

Here's a video of me doing the resistor ladder to Arduino thing. Links to files are available in the description.


View on YouTube
Fri, 09 Aug 2019, 12:49
spinal
I think I'll give this https://pilizard.blogspot.com/2017/11/the-pi-lizards-64-images.html?m=1 a try, if it really boots straight into vice quick then it might work well. Hopefully I can add an LCD screen to the startup sequence 👍

-=-=-
Check out my excellent homepage!
Sat, 10 Aug 2019, 08:12
spinal
This is the plan, I've just this second built a C64 joystick, I have a master system controller, created 2 joystick ports and I'm about to wire them up.


I think reading the joystick every second frame is more than fast enough for what I need

-=-=-
Check out my excellent homepage!
Sat, 10 Aug 2019, 08:48
steve_ancell
Yeah, I reckon that should be quick enough. You could even read both joysticks at the beginning of each loop and then store them in an array for later access within that loop.
Sat, 10 Aug 2019, 11:19
spinal
OK, I'm half done. It seems there is a minor glitch though. It's detecting both joystick correctly, with each one sending the correct key presses. However, if both joysticks are pressing the same direction/button then it releases both. Can anyone see if i've missed a step in reading the inputs or something else just as stupid?





-=-=-
Check out my excellent homepage!
Sat, 10 Aug 2019, 11:43
Jayenkai
Nope. I'm afraid I can't see anything obvious.
.. you have double checked the hardware, to be sure it's not doing that..??

-=-=-
''Load, Next List!''
Sat, 10 Aug 2019, 13:43
spinal
I can't think of anything that would work for everything other than getting the same reading from both sticks. I have to be missing something ☹️

-=-=-
Check out my excellent homepage!
Sat, 10 Aug 2019, 14:28
Jayenkai
Make a test proggy that constantly prints out both raw pin 20 values, (joy left) then test if the "both at once" still fails.
If it does, it's the hardware doing it.
If it doesn't, it's something in your code.

-=-=-
''Load, Next List!''
Sun, 11 Aug 2019, 04:23
spinal
OK, after reversing the circuit - pulling each pin low with an external resistor and applying +3v and reading that way, I get a slightly different outcome, I can press the same direction on both joysticks at the same time, but can't press more than one direction on one joystick, that is, UP on both sticks registers, but UP+LEFT on one stick will not.

It looks like I'll have to modify it a little and put some diodes in, perhaps the current is back-flowing through the joystick and causing issues?

|edit| Yup, after a little googling, it seems this is a common problem with reading keypads, you have to have a diode attached to every single switch, or else unexpected shorts will get in the way of reading the buttons.

-=-=-
Check out my excellent homepage!
Sun, 11 Aug 2019, 04:31
Jayenkai
Crikey.
How the smeg did they cope with this shit in the 80s!?!

-=-=-
''Load, Next List!''
Sun, 11 Aug 2019, 06:50
spinal
It think that'd be part of the reason that keyboard controls were a bit odd, like z/X for left/right and p/l for up/down maybe specifically choosing keys that wouldn't clash...?

-=-=-
Check out my excellent homepage!
Sun, 11 Aug 2019, 08:03
Jayenkai
Quite possibly.
Still get clashing nowadays (cursors and space) but it's nowhere near as pronounced.. Jus5 shows the amount of amazing things the old 8bits had to deal with!

-=-=-
''Load, Next List!''
Sun, 11 Aug 2019, 12:26
spinal
Back on the c64 emulation side I seem to be stuck. I found 2 distros that boot straight into a c64 emulator. One simply will not show up on my network, the other refuses to actually run the emulator as well as network not working also.
It's a shame I know nothing about linux at all 😟

-=-=-
Check out my excellent homepage!
Sun, 11 Aug 2019, 16:39
Jayenkai
I just about managed to bluff my way through what little Linux I've dared to use.
My GoogleFu is stronger than my Linuxination!

-=-=-
''Load, Next List!''
Fri, 23 Aug 2019, 10:02
spinal
Got my hopes up today as I got an email saying my screen had arrived! Got home, opened it, it's cracked.

-=-=-
Check out my excellent homepage!
Fri, 23 Aug 2019, 10:02
Jayenkai
Fuck..
Fri, 23 Aug 2019, 11:28
spinal
Meh, I put in a return request. We'll see how that goes.

-=-=-
Check out my excellent homepage!
Thu, 29 Aug 2019, 14:52
spinal
I'm going to put this here because it took me all week to get it working again for some reason -


It seems that the ili9341 tft screens thatare so popular are quite picky about their working conditions. Couldn't get it working with a genuine level shifter, couldn't get it working without one, got it sometimes working, sometimes not working. It seems that throwing in some resistors so that the voltage was lowered enough to be not 5v was most of the trick, but also, the reset pin, which is supposed to be toggled from low to high on a delay before sending the init code simply didn't work, but keeping it high without shifting it from low works 100% of the time. Go figure.

-=-=-
Check out my excellent homepage!
Thu, 29 Aug 2019, 14:54
Jayenkai
Crikey!
Fri, 30 Aug 2019, 01:09
spinal


Tricky to get the brightness right...

What's going to be fun later on, is emulating a keyboard adapter that I don't have access to.
I guess just fire up vice c64 on my pc, press every imaginable key and see what the emulator displays and work from there.

-=-=-
Check out my excellent homepage!
Fri, 30 Aug 2019, 06:30
steve_ancell
I'm impressed.
Fri, 30 Aug 2019, 11:11
rockford
That's really pretty cool
Fri, 30 Aug 2019, 12:08
spinal
Don't be impressed just yet, nothing does anything at the moment 🤔

-=-=-
Check out my excellent homepage!
Fri, 30 Aug 2019, 12:16
rockford
It displays an image. That's something. And waaaaaay more than I could ever achieve.
Fri, 30 Aug 2019, 12:28
Jayenkai
Indeed, I wouldn't have a flamin' clue!

Most Excellent work!

-=-=-
''Load, Next List!''
Sat, 31 Aug 2019, 09:19
steve_ancell
spinal Don't be impressed just yet, nothing does anything at the moment

Over all the years I've seen you on the forums, you have always just got on with what you do and have never been afraid of failure. If that's not impressive then I don't know what is!
Page : 1 Prev 2 3 Next 4 5