|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdioscuri.module.AbstractModule
dioscuri.module.ModuleSerialPort
dioscuri.module.serialport.SerialPort
public class SerialPort
An implementation of a serial port module.
Metadata module ********************************************
general.type : serialport general.name : UART 16550A Serial Port
general.architecture : Von Neumann general.description : Models a 9-pin
serial port general.creator : Tessella Support Services, Koninklijke
Bibliotheek, Nationaal Archief of the Netherlands general.version : 1.0
general.keywords : serial port, port, RS232, DE-9, COM, UART
general.relations : Motherboard, PIC general.yearOfIntroduction :
general.yearOfEnding : general.ancestor : general.successor :
Notes: - AbstractModule serial port supports up to 4 COM ports - It is based on
the UART 16550A interface (including FIFO buffer) - Data is transmitted
in little-endian order (least significant bit first)
References: - I/O Port information:
http://mudlist.eorbit.net/~adam/pickey/ports.html - UART register
information from PC16550D UART with FIFOs (National Semiconductor):
http://www.national.com/mpf/PC/PC16550D.html - Bochs X86 emulator:
http://bochs.sourceforge.net
PORT 03F8-03FF - serial port (8250,8250A,8251,16450,16550,16550A,etc.)
COM1 Range: PORT 02E8h-02EFh (COM2), PORT 02F8h-02FFh (typical non-PS/2
COM3), and PORT 03E8h-03EFh (typical non-PS/2 COM4)
Chips overview: 8250 original PC, specified up to 56Kbd, but mostly runs
only 9600Bd, no scratchregister, bug: sometimes shots ints without
reasons 8250A, 16450, 16C451: ATs, most chips run up to 115KBd, no bug:
shots no causeless ints 8250B: PC,XT,AT, pseudo bug: shots one causeless
int for compatibility with 8250, runs up to 56KBd 16550, 16550N, 16550V:
early PS/2, FIFO bugs 16550A,16550AF,16550AFN,16550C,16C551,16C552:
PS/2, FIFO ok 82510: laptops & industry, multi emulation mode
(default=16450), special-FIFO. 8251: completely different synchronous
SIO chip, not compatible!
Each COM-port uses 8 I/O ports and 12 UART interface registers: 03F8 W
transmitter holding register (THR), which contains the character to be
sent. Bit 0 is sent first. bit 7-0 data bits when DLAB=0 (Divisor Latch
Access Bit) 03F8 R receiver buffer register (RBR), which contains the
received character. Bit 0 is received first bit 7-0 data bits when
DLAB=0 (Divisor Latch Access Bit) 03F8 RW divisor latch low byte (DLL)
when DLAB=1 (see #P189) 03F9 RW divisor latch high byte (DLM) when
DLAB=1 (see #P189) 03F9 RW interrupt enable register (IER) when DLAB=0
(see #P190) 03FA R interrupt identification register (IIR) Information
about a pending interrupt is stored here. When the ID register is
addressed, the highest priority interrupt is held, and no other
interrupts are acknowledged until the CPU services that interrupt. 03FA
W 16650 FIFO Control Register (FCR) (see #P192) 03FB RW line control
register (LCR) (see #P193) 03FC RW modem control register (see #P194)
03FD R line status register (LSR) (see #P195) 03FE R modem status
register (MSR) (see #P196) 03FF RW scratch register (SCR) (not used for
serial I/O; available to any application using 16450, 16550) (not
present on original 8250)| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface dioscuri.interfaces.Module |
|---|
Module.Type |
| Field Summary | |
|---|---|
static int |
TOTALCOMPORTS
|
| Fields inherited from class dioscuri.module.AbstractModule |
|---|
type |
| Constructor Summary | |
|---|---|
SerialPort(Emulator owner)
Class constructor |
|
| Method Summary | |
|---|---|
byte |
getIOPortByte(int portAddress)
|
byte[] |
getIOPortDoubleWord(int portAddress)
|
byte[] |
getIOPortWord(int portAddress)
|
int |
getUpdateInterval()
Get the update interval. |
boolean |
reset()
Reset all parameters of module. |
void |
setIOPortByte(int portAddress,
byte data)
|
void |
setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
|
void |
setIOPortWord(int portAddress,
byte[] dataWord)
|
boolean |
setUARTDevice(UART device,
int comPort)
|
void |
setUpdateInterval(int interval)
Defines the interval between subsequent updates |
void |
update()
Update the module. |
| Methods inherited from class dioscuri.module.AbstractModule |
|---|
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface dioscuri.interfaces.Module |
|---|
getConnection, getConnections, getDebugMode, getDump, getExpectedConnections, getType, isConnected, setConnection, setDebugMode, start, stop |
| Field Detail |
|---|
public static final int TOTALCOMPORTS
| Constructor Detail |
|---|
public SerialPort(Emulator owner)
owner - | Method Detail |
|---|
public boolean reset()
reset in interface Modulereset in class AbstractModuleAbstractModulepublic int getUpdateInterval()
Updateablepublic void setUpdateInterval(int interval)
interval - the interval between subsequent updates in ms.Updateablepublic void update()
Updateable
public byte getIOPortByte(int portAddress)
throws UnknownPortException,
WriteOnlyPortException
UnknownPortException
WriteOnlyPortExceptionAddressable
public void setIOPortByte(int portAddress,
byte data)
throws UnknownPortException
UnknownPortExceptionAddressable
public byte[] getIOPortWord(int portAddress)
throws ModuleException,
WriteOnlyPortException
ModuleException
WriteOnlyPortExceptionAddressable
public void setIOPortWord(int portAddress,
byte[] dataWord)
throws ModuleException
ModuleExceptionAddressable
public byte[] getIOPortDoubleWord(int portAddress)
throws ModuleException,
WriteOnlyPortException
ModuleException
WriteOnlyPortExceptionAddressable
public void setIOPortDoubleWord(int portAddress,
byte[] dataDoubleWord)
throws ModuleException
ModuleExceptionAddressable
public boolean setUARTDevice(UART device,
int comPort)
setUARTDevice in class ModuleSerialPortModuleSerialPort
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||