-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS/2 keyboard init problems #2
Comments
Hi c1570, Yes, I have found a few keyboards that have the same issue. I found that unplugging the keyboard from the adaptor while the adaptor is plugged in to the c64 main board and powerd on seems to resolve my issue of the keyboard 'not being seen'. |
It appears in the latest version of schematics, I omitted the bypass capacitor. I will correct in the next revision. i will be revisiting the project this year and I am looking to include PCB transfers and possible fix for power up key detection. |
Hi Hartland, Thanks for the prompt response. This is a great project. I see quite a few PS2/USB keyboard to C64 builders have used your code. I wondered if I could ask for some advice. I don't see a questions tab in this GitHub profile. Only an issues tab. Could I use the issues tab to ask for advice or is there a better way? I will look forward to seeing your next revision. Regards.. |
I forgot to mention that I already added additional capacitors to rule that out. It looks like the PS2KeyAdvanced lib goes into some weird state in case setLock() gets called before the keyboard is actually ready. I suspect one has to wait for the 0xAA/BAT message from the keyboard after power on before sending control codes. |
Banman11, I believe the discussion tab is now available. Responses may be a bit slow as my day job is entering the busier season. As for the keyboard issue, has anybody tried to add a delay before ps2advanced is loaded? |
Hi Hartland, First of all I would like to you for this great project. Much appreciated for adding the discussion tab.😁 No, I haven't added a delay before the ps2advanced is loaded. This may actually be a good way to check it. I must apologise, I am a very mediocre hobbyist at best. I definitely will let you know the types of keyboard that works and doesn't work. A few of us started this thread.... https://www.melon64.com/forum/viewtopic.php?t=15160&hilit=Usb+keyboard We had tried to contact you some time ago to get permission to use your project. However we got no reply. |
No issues, I always meant this project to be available to all hobbyists. In fact ,I will be changing to a MIT license during the updates planned this year. Also, I have published the overall plan this year in the discussion forum. |
Hello Heartland, Thank you very much for your blessing. It would absolutely be our pleasure if you would join us on Melon64. It would be a great opportunity for us hobbyist's have your views and inputs. There are so many things I want to know regarding your great work. Melon64 is a good easy forum for off the cuff discussion of things with an incline towards retro computer related stuff. Thanks again for a great project. |
Hi Hartland, Well, I can say I that I haven't had any issues with breaking any keyboards using your current circuit layout. At the time I thought the C16 machine is finished. I would hazard a guess the crosspoint IC chip you have implemented has safety cutoff features. You mentioned earlier in this thread about adding a time delay in the Arduino microcontroller code. |
@Hartland Not sure if your findings are actually related to the original description of this issue. Have you tried removing the setLock() call in resetMT8808() ? If that fixes the issue, then it's clearly related, if not, a new issue should get opened. Perhaps the early setLock() call triggers some USB detection on keyboard side? And that only happens if - due to supply voltage/power line length/resistance - the keyboard is a bit late when initializing? |
I deleted a few of my posts as they are no longer relevant and do not provide useful information. I have a tendency to share in my troubleshooting process in hopes of somebody will have some helpful insights. After tentatively fixing the issue, I thought it appropriate to cleanup a bit. I believe I have a solution to the PS/2 initialization issue that may or may not be be related to this issue. On certain PS/2 - USB combo keyboards, including those with only a wired PS/2 connector, there appears to be something different with the pull-up resistance on both data and clock lines. Whether or not the micro-controller has the pins set as pull-up makes no difference. For those unfamiliar with pull up resistors, it is simply adding a resistor from V+ to clock and data pins separately (each pin has its own resistor). If this does not help with the OP issue, I will separate this into a new issue. |
Hi Hartland, Very interesting! Thank you for the tip on using the 4.7k -10k Ohm pullup resistor between the + 5v power rail and the Clock and Data separately. I'll get back to you with my observations. Thanks |
As mentioned in in the discussion post, I found that 220 ohm resistors work best. At least with the keyboard I experimented with, that value really brought it under control and working smoothly. |
It seems I'm stumbled upon a PS/2 keyboard (a cheap "Labtec 867571-0102") that has some issues with the startup timing.
Setup: ATmega8, 8MHz internal clock, 64ms startup, 4V BOD, rather long power lines.
Symptom:
I suspect the problem is power related as this doesn't happen that often with very strong power supply/very short power lines. Perhaps the ATmega powers on much before the keyboard does, bringing them out of sync or similar.
In any case, disabling the setLock() call in resetMT8808() seems to fix the issue. I suspect delaying that somewhat would also be fine.
The text was updated successfully, but these errors were encountered: