Keyboard from where

Nagging hardware related question? Post here!
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Keyboard from where

Post by tofro »

Ruptor wrote: Mon Dec 12, 2022 1:07 pm
tofro wrote: Mon Dec 12, 2022 12:28 pmPin 1, 2, 9 of what?
The 9 pin scan lines of the QL keyboard matrix without the membrane plugged in.
Without a membrane plugged in, I doubt you can measure anything useful (Except on Pin 9, as that is the only one without a diode.) The 8049 is probably unable to pull down strongly against it's pull-ups without the help of the pull-downs on the other end of the matrix. What you're seeing is the 804 is definitely pulsing and that's fine. It's relatively irrelevant what you see on unconnected output ports - Of relevance is more what you see on the input port when a key is pressed.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Keyboard from where

Post by Ruptor »

tofro wrote: Mon Dec 12, 2022 2:57 pmWithout a membrane plugged in, I doubt you can measure anything useful (Except on Pin 9, as that is the only one without a diode.)
Thanks for pointing out pin 9 has no diode and I am a dipstick for measuring floating pins. :lol: I have the scope the other side of the diodes so the 8049 can't really pull it down and relies on stuff on the scope side to load the scope probe. :roll: The 8049 doesn't seem to do much. Since this keyboard is serial I could replace the 8049 with a 28 pin PIC as 18 pins are not required. Is there a concise specification of the other functions of the 8049? I had a look at the Hermes stuff but can't understand enough to code a PIC for the other functions.


User avatar
M68008
Trump Card
Posts: 224
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: Keyboard from where

Post by M68008 »

Ruptor wrote: Mon Dec 12, 2022 6:34 pm Is there a concise specification of the other functions of the 8049? I had a look at the Hermes stuff but can't understand enough to code a PIC for the other functions.
Apart from keyboard/joystick, the 8049 generates sound and handles the receive part of RS232. Plenty of info in the QL Service Manual, QL manual (KEYROW, BEEP), QDOS Technical Guide (trap #1 D0=$11 lists the supported/used commands), 8049 QL firmware disassembly, Mister QL sources (for ZX8302-8049 communication).


User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Keyboard from where

Post by Ruptor »

M68008 wrote: Mon Dec 12, 2022 7:46 pmPlenty of info in the QL Service Manual, QL manual (KEYROW, BEEP), QDOS Technical Guide (trap #1 D0=$11 lists the supported/used commands), 8049 QL firmware disassembly, Mister QL sources (for ZX8302-8049 communication).
You just described my problem & why I just lost the will to live. It would take ten times longer to assimilate the information than to design & implement the code. There must have been a design specification for the part but I suppose that was thrown out with the cat when Sinclair went toast.


User avatar
M68008
Trump Card
Posts: 224
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: Keyboard from where

Post by M68008 »

Ruptor wrote: Mon Dec 12, 2022 8:26 pm You just described my problem & why I just lost the will to live. It would take ten times longer to assimilate the information than to design & implement the code. There must have been a design specification for the part but I suppose that was thrown out with the cat when Sinclair went toast.
I see :)
Then I would suggest not replacing the entire 8049 to avoid headaches, and continue your early plan with the keyboard with the same matrix layout as a QL.
Or if you prefer to go USB, you could use the same matrix IC as in Stephan's project together with the microcontroller you have.


User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Keyboard from where

Post by Ruptor »

M68008 wrote: Mon Dec 12, 2022 9:41 pmThen I would suggest not replacing the entire 8049 to avoid headaches, and continue your early plan with the keyboard with the same matrix layout as a QL.
Now Tofro has made me realise the key scanning is working & I have done the code for the PIC I shall continue to fit it to the two QL matrix plugs. I am not sure the scheme will work at first because I am guessing things about the scan but the scope shows the signal is up for 60uS so the key must be there for quite a few scans. Some weird things happened when I was using the scope like the key scanning stopped for a few seconds that lead me to thinking the scanning was faulty. Are there times when key scanning stops because other things are going on?


User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Keyboard from where

Post by tofro »

Ruptor wrote: Mon Dec 12, 2022 10:28 pm Some weird things happened when I was using the scope like the key scanning stopped for a few seconds that lead me to thinking the scanning was faulty. Are there times when key scanning stops because other things are going on?
I am assuming you're measuring when the QL is idle and no program running. Then the only thing I can imagine is that you're seeing when the QL polls the 8049 for keys - That should happen every 1/50s or multiples of that and would keep the 8049 busy for a short time.

But "a few seconds" is really unlikely.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Keyboard from where

Post by Ruptor »

tofro wrote: Mon Dec 12, 2022 11:23 pmI am assuming you're measuring when the QL is idle and no program running. Then the only thing I can imagine is that you're seeing when the QL polls the 8049 for keys - That should happen every 1/50s or multiples of that and would keep the 8049 busy for a short time. But "a few seconds" is really unlikely.
I just turn on the power & measure them. What about when a microdrive is running? Perhaps a reset occurred I am not sure but I had the scope on a scan line and it went high for seconds then started again. The scan lines don't stop for 20mS they run continuously as in my pictures but at regular intervals there are slightly longer gaps maybe 120uS but mS no way it would take them off the scope screen. I expected the lines to be held for longer like 1mS per line so about 9 or 10 mS to scan them all not 60uS.


User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Keyboard from where

Post by tofro »

Ruptor wrote: Mon Dec 12, 2022 11:45 pm
tofro wrote: Mon Dec 12, 2022 11:23 pmI am assuming you're measuring when the QL is idle and no program running. Then the only thing I can imagine is that you're seeing when the QL polls the 8049 for keys - That should happen every 1/50s or multiples of that and would keep the 8049 busy for a short time. But "a few seconds" is really unlikely.
I just turn on the power & measure them. What about when a microdrive is running? Perhaps a reset occurred I am not sure but I had the scope on a scan line and it went high for seconds then started again. The scan lines don't stop for 20mS they run continuously as in my pictures but at regular intervals there are slightly longer gaps maybe 120uS but mS no way it would take them off the scope screen. I expected the lines to be held for longer like 1mS per line so about 9 or 10 mS to scan them all not 60uS.
The 8049 has nothing to do with microdrives - Wouldn't affect it. A BEEP probably would, but why would your QL beep when it's just switched on....

The 8049 only handles keyboard, joysticks (which is essentially the same thing) serial receive and sound.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Keyboard from where

Post by Ruptor »

I finally wired up the PIC interface board that will convert the QL membrane input pins to give me a serial input that I can connect to a computer. After belling out all the wires I flashed a chip with my first version of software stuck the 5V from the QL on it and the 10 MHz oscillator is running so some of the code is correct for the clock set up. :) I have done the code for reading the Hall effect keyboard to give it serial output to match the QL PIC receiver but I have to rewire the keyboard and make a second PIC interface board to read it. Not sure how long it will be to my next post that will be when a computer serial port can talk to the QL. :?
Attachments
QLKeyIntWired.jpg


Post Reply