IPC keyboard scanning: Anyone know what the maximum delay between input and output?

Nagging hardware related question? Post here!
Post Reply
stephen_usher
Super Gold Card
Posts: 576
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

IPC keyboard scanning: Anyone know what the maximum delay between input and output?

Post by stephen_usher »

Does anyone know what the maximum delay between the column scan going high and the IPC reading a correct value from the row is?

JustCurious(tm)...


User avatar
Pr0f
QL Wafer Drive
Posts: 1586
Joined: Thu Oct 12, 2017 9:54 am

Re: IPC keyboard scanning: Anyone know what the maximum delay between input and output?

Post by Pr0f »

It will depend a bit on which IPC you are using. It would mean counting the states / cycles for the instructions between setting the row address and then reading the column data in.

In the original IPC code:

; scan keyboard, entry A (one bit=1), ret A
05C8: 39 OUTL P1,A output A on P1
05C9: AB MOV R3,A
05CA: 80 MOVX A,@R0 put P0 in read mode=HI-Z ??
05CB: 00 NOP wait a bit
05CC: 00 NOP
05CD: 00 NOP
05CE: 00 NOP
05CF: 00 NOP
05D0: 00 NOP
05D1: 08 IN A,P0 get P0 into A
05D2: 93 RETR

OUTL and MOVX are 2 cycle instructions , the rest all 1 cycle - a cycle is 5 T states (11MHz / 5) - so I make that about 10 cycles - a bit over 4.5uS


stephen_usher
Super Gold Card
Posts: 576
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: IPC keyboard scanning: Anyone know what the maximum delay between input and output?

Post by stephen_usher »

Thanks.

I'm wondering about using a Pi Pico to be a USB keyboard -> J11+J12 membrane substitute using PIO to do the pin transitions triggered by the scanning on the 8 real input lines. If the scans on the inputs are sequential (or predictable) then the FIFO can be charged by the core calculating the outputs with the correct values. PIO is VERY fast so it wouldn't need time critical programming of the ARM core.


User avatar
Pr0f
QL Wafer Drive
Posts: 1586
Joined: Thu Oct 12, 2017 9:54 am

Re: IPC keyboard scanning: Anyone know what the maximum delay between input and output?

Post by Pr0f »

sounds like a good idea for a project!

I am working on getting something along the lines of a SuperHermes lite (hermes with PS/2) with some some SuperHermes functions included (mainly using the onboard NVRAM on the PIC), but getting the whole thing to fit into the 40 pin IPC socket. I don't need the extra serial ports, but I think it would be nice to use the PIC's USART to do the receiving for RS232 for Ser1 and Ser2 - as it should cope easily with the ask, and it will keep the coding more simple.


stephen_usher
Super Gold Card
Posts: 576
Joined: Tue Mar 11, 2014 8:00 pm
Location: Oxford, UK.
Contact:

Re: IPC keyboard scanning: Anyone know what the maximum delay between input and output?

Post by stephen_usher »

Well, that's annoying... This is the output from J11 as seen by a logic analyser (ignore the labels)...

IMG_4516.jpeg

Not only do the output pulses overlap but they're not quite in order. The former part is the problem as I can't use them as a simple clock logic clocking the data out from the FIFO.


User avatar
aalea
Over Heated PSU
Posts: 148
Joined: Mon Feb 07, 2022 9:27 pm

Re: IPC keyboard scanning: Anyone know what the maximum delay between input and output?

Post by aalea »

The direm keyboard interface do the same with a pic at 20mhz, so the Pico at more than 100mhz shall be able even with the overload of do it in C instead of assembler.


Post Reply