Re: QL Keyboard to PS/2
Posted: Sun Feb 27, 2022 5:43 pm
Thanks for all the replays, let me give you some answers to your questions:
- Development environment is standard Arduino IDE which can be easily found here https://www.arduino.cc/en/software. First version was build on a breadboard using an Arduino Nano but then changed to the Atmega 328P (basically the same as on the Arduino Nano board) for this 1st PCB version.
- Capslock LED is PB5 like the Arduino Nano. So same as in your QLbase setup
- For a single pin 16 to 18 mA is no issue. Norman already gave some details about the limitations of the Atmega 328p. Currently I have no idea how much current flows trough the other Pins in case of a key press. I doubt this is a problem but I am going to measure this within this evening and will let you know the answer.
- The QL Power LED draws quite a lot of current. The one on my board, see picture above, is just using 2mA and bright enough.
- tofro wrote: "...(2 "normal" keys combined with the modifier keys)..." Is this really the case? This means I can not move my sprite in a game diagonal and shoot using space in the same time? Only go straight up down left right and shoot? A PS/2 Keyboard connected to QZero can do this (go diagonal and shoot). I never tried this using a QL keyboard on a standard QL. Probably some gamer can give clarification if this feature is needed? I guess a Joystick is probably an even better choice?
- "...<Shift><CursorUp>, some <Alt><CursorUp>..." So this is interesting. <Arrow up> creates the PS/2 scan codes 224, 117, 224, 240, 117 which seems to be correct. <Shift> + <Arrow up> creates the scan codes 18, 224, 117, 240, 18, 224, 240, 117. I see no scan code for page up. BUT the cursor movement in SMSQ/E is clearly page up, page down and word left, word right respectively. Is SMSQ/E translating this? I do not see any problem here but could be interesting to fully understand.
- "...16 MHz? If you could run it at 8 MHz..." I have no idea if it could run at 8Mhz w/o external X-tal and one could use the 2 gained pins for an other use case. I am most likely not going to try this but I am happy to see the results of someone else experiments.
Remarks: Thanks for all your inputs, really appreciate it. The project is still in an early stage where as I am already very satisfied with the result. Of course there will be some modifications in the software. I will release it in one or the other way to the community, I know some community members plan to build a Q68 into a QL housing. I am just doing this for fun, I personally have no use case for such an IF.
Stephan
- Development environment is standard Arduino IDE which can be easily found here https://www.arduino.cc/en/software. First version was build on a breadboard using an Arduino Nano but then changed to the Atmega 328P (basically the same as on the Arduino Nano board) for this 1st PCB version.
- Capslock LED is PB5 like the Arduino Nano. So same as in your QLbase setup
- For a single pin 16 to 18 mA is no issue. Norman already gave some details about the limitations of the Atmega 328p. Currently I have no idea how much current flows trough the other Pins in case of a key press. I doubt this is a problem but I am going to measure this within this evening and will let you know the answer.
- The QL Power LED draws quite a lot of current. The one on my board, see picture above, is just using 2mA and bright enough.
- tofro wrote: "...(2 "normal" keys combined with the modifier keys)..." Is this really the case? This means I can not move my sprite in a game diagonal and shoot using space in the same time? Only go straight up down left right and shoot? A PS/2 Keyboard connected to QZero can do this (go diagonal and shoot). I never tried this using a QL keyboard on a standard QL. Probably some gamer can give clarification if this feature is needed? I guess a Joystick is probably an even better choice?
- "...<Shift><CursorUp>, some <Alt><CursorUp>..." So this is interesting. <Arrow up> creates the PS/2 scan codes 224, 117, 224, 240, 117 which seems to be correct. <Shift> + <Arrow up> creates the scan codes 18, 224, 117, 240, 18, 224, 240, 117. I see no scan code for page up. BUT the cursor movement in SMSQ/E is clearly page up, page down and word left, word right respectively. Is SMSQ/E translating this? I do not see any problem here but could be interesting to fully understand.
- "...16 MHz? If you could run it at 8 MHz..." I have no idea if it could run at 8Mhz w/o external X-tal and one could use the 2 gained pins for an other use case. I am most likely not going to try this but I am happy to see the results of someone else experiments.
Remarks: Thanks for all your inputs, really appreciate it. The project is still in an early stage where as I am already very satisfied with the result. Of course there will be some modifications in the software. I will release it in one or the other way to the community, I know some community members plan to build a Q68 into a QL housing. I am just doing this for fun, I personally have no use case for such an IF.
Stephan