Getting Software on to a Minimal Adam System Part 2

Understanding the Adam Link Modem and Eve Serial ports

When the Adam was introduced by Coleco there was also available the 300 baud Adam Link Modem. This modem was installed in the second expansion slot and allowed the Adam to access bulletin boards and information services using a regular phone line. The modem only operated at 300 baud when the standard of the day was 1200 baud and soon after 2400 baud.

To fix this issue many serial expansion ports were released by third party manufacturers that could access higher speeds and allowed you to plug in faster modems. These expansion ports are hard to come by now but if you do run across one you may wish to get it. The standard for the time was the Eve serial board and this is the one I have an will be discussing along with the Adam Link Modem. I will not be giving specific code in this article, just pseudo-code. I will show real code in future articles.

Adam Link Modem (aka 8251)

The Adam Link modem is a combination of serial port and modem in one and there are designs online that will allow you to convert it to a serial port if you want. The main chip is an Intel 8251 PCI. This chip technically can handle speeds up to 64K baud but is limited by the crystal in the modem to a maximum of 1200 baud with modifications. Communicating with 8521 and to the modem is accomplished through two ports, the data port 5Eh and the status port 5Fh.

Eve Serial Port (aka 2651)

The Eve serial port is a full function port that allows you to plug a modem or other serial device into and can be used to speeds up to 19.2K baud though in actuality it works best at 9600 baud or less do to a lack of a hardware buffer. The main chip is a National Semiconductor 2651. Communicating with the 2651 PCI is accomplished through four ports, the data port 44h, the status port 45h, the modem port 46h and the control port 37h.

Initializing

To initialize communications we need to output commands and data to either the 8251 ro the 2651 to get it set up. We are going to assume we are using 300 baud with both but you can use faster speeds 2651 later if you want. So to initialize the port we would do the following:

8251:

; Get the 8251’s attention

Send 80h to port 05Fh
Send 80h to port 05Fh
Send 04h to port 05Fh

; Set up the baud, clock rate, number of bits, parity and stop bits

Send 04Fh to port 05Fh

; Set serial lines RXE, TXE and RTS to make sure modem is hung up

Send 25h to 05Fh

2651:

; Set the mode to 8 bits, no parity, 1 stop bit, 16x asynch

Send value 4Eh to port 46h

; Set 300 baud (for other baud rates use: 35h = 300,
; 37h = 1200, 3Ah = 2400, 3Eh = 9600, 3Fh = 19.2)

Send value 35h to port 46h

; Reset the flags RTS, DTR and enable R/T

Send 37h to port 47h

; Clear any incoming characters

Get byte form port 47h
Get byte form port 47h

Send a character:

8251:

; Keep reading status port till high bit is clear

Loop:
Read status port 5Fh
Jump to Loop if bit 7 is not clear
Send character out port 5Eh

2651:

; Keep reading status port till low bit is clear

Loop:
Read status port 45h
Jump to Loop if bit 0 is not clear
Send character out port 44h

Read a character:

8251:

; Get character if there is one

Read status port 5Fh
Return if bit 6 is clear
Read character from port 5Eh

2651:

; Get character if there is one

Read status port 45h
Return if bit 1 is clear
Read character from port 44h

 

Leave a Reply

Your email address will not be published. Required fields are marked *