• Please review our updated Terms and Rules here

Ericsson PC - Keyboard Interface

sergey

Veteran Member
Joined
Jul 15, 2010
Messages
880
Location
Silicon Forest, Oregon, USA
ExPLIT got a bit of a puzzle for me... His colleague has an Ericsson PC, and they tried to run my 8088 BIOS on it.
Everything seems to work fine, except of the keyboard.

I partially disassembled the INT 9/IRQ1 interrupt handler, and apart from typical PC/XT interaction with the 8255 PPI I/O ports 60h and 61h, there is something going on with port 71h...
Looking closer at the board, I spotted the 8251 USART next to the 8255 PPI. That USART is an unusual thing in an IBM PC/XT compatible. It should be noted that in addition to it, the computer has 8250 UART that is obviously used for the on-board serial port.

So, my suspicion now is that this computer uses the 8251 USART to interface with the keyboard.

Before I go any deeper into disassembling the original BIOS and studying the PCB layout to understand how the keyboard is interfaced, perhaps someone has already figured it all out?
Are there any documents or schematic available for that computer?
 
Well, thanks for the help I guess ;)
I did disassemble the POST part of the BIOS. Indeed, it appears that the system uses 8251 USART to communicate to the keyboard.
The USART's data register is mapped to I/O port 60h, same as the keyboard port on IBM PC/XT and AT, but it allows a bi-directional communication.
The USART's command register is mapped to I/O port 71h. That is used to setup the USART and to check for errors.

Looking at this system/keyboard and also serial mice, I am wondering why did IBM go through the trouble of implementing the keyboard interface using shift registers (in PC/XT) and then using a dedicated MCU (in AT) instead of simply using an UART/USART? Cost savings in case of the PC/XT and compatibility with the former in case of AT?!

Other than using the USART, the BIOS uses an interesting approach of initializing on-board peripherals using tables containing the initial values and the I/O port numbers. Typically BIOSes just use a series of MOV AL,xx; OUT yy,AL instructions...
Another "optimization" is passing the return address in a register (e.g., DI). This allows a subroutine to be used with or without stack... Looks something like this:
CALL_ENTRY_POINT:
POP DI ; load the return address into DI
JMP_ENTRY_POINT:
<Subroutine goes here. Avoid using stack...>
JMP DI ; return

If used without the stack, the call is going to look something like:

MOV DI,RETURN_HERE
JMP JMP_ENTRY_POINT
RETURN_HERE:
 
Last edited:
Looking at this system/keyboard and also serial mice, I am wondering why did IBM go through the trouble of implementing the keyboard interface using shift registers (in PC/XT) and then using a dedicated MCU (in AT) instead of simply using an UART/USART? Cost savings in case of the PC/XT and compatibility with the former in case of AT?!

My *extremely vague* impression of the reason the AT has the MCU for the keyboard controller is because in addition to its job of effectively being an overly fancy UART it handles a few oddball tasks like controlling the A20 gate and performing a soft RESET watchdog function to allow switching the 80286 back into real mode from protected mode? Those latter things certainly could have been done with hardware state machines, but the MCU was probably cheap enough to make it a wash. (And maybe it saved some board space.)
 
Yes, there is. The Ericsson PC is not very common outside Sweden or for that matter Europe. I have a technical manual for it, unfortunately not scanned. I also have a binder with schematics somewhere. I can try to look them up next weekend.
That would be valuable. For my effort, at least the description of the keyboard interface and related schematic would be indispensable
 
Some more. I have dumped content of the 6801 in the keyboard for the MAME project. There is full support for Ericsson PC in mame. It might help.

IMG_2998.jpegIMG_2997.jpeg
 
Thank you! That's very useful.
It looks that my analysis of the BIOS was correct :)

Does it provide any information on how to turn on and off the Caps Lock and Num Lock LEDs?
Also it says that the key 84 (num pad Enter) is reprogrammable. Any information on how to do that?
 
Back
Top