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: 571
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: 1582
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


Post Reply