Model 100 Serial Interface: Difference between revisions

From Bitchin100 DocGarden
Jump to navigationJump to search
Line 14: Line 14:
|0  || Stop bits || 0 &rarr; 1 stop bit<br/>1 &rarr; 2 or 1.5 stop bits (1.5 if character length is 5, 2 otherwise)
|0  || Stop bits || 0 &rarr; 1 stop bit<br/>1 &rarr; 2 or 1.5 stop bits (1.5 if character length is 5, 2 otherwise)
|-
|-
|1  || Parity || 0 &rarr; Odd parity<br/>1 &rarr; Even
|1  || Even/ Odd Parity || 0 &rarr; Odd parity<br/>1 &rarr; Even
|-
|-
|2  || Parity Inhibit || 0 &rarr; Parity<br/>1 &rarr; No parity
|2  || Parity Inhibit || 0 &rarr; Parity<br/>1 &rarr; No parity

Revision as of 15:19, 1 February 2009

Overview

The BASIC ROM provides access to the serial port. BASIC ROM support is well documented elsewhere. This article covers direct use of the IM6402 UART.

Configuration

Serial Word Format

Port $D8 controls the serial word format.

Bit Function Note
0 Stop bits 0 → 1 stop bit
1 → 2 or 1.5 stop bits (1.5 if character length is 5, 2 otherwise)
1 Even/ Odd Parity 0 → Odd parity
1 → Even
2 Parity Inhibit 0 → Parity
1 → No parity
4-3 Character length Number of bits:
00 → 5
01 → 6
10 → 7
11 → 8
7-5 Unused

Baud Rate

Data Transmission

Data Reception

I/O Map

NameDirectionPort
TX Output $C8
RX Input $C8
RTS Output $BA, bit 7
CTS Input $BB, bit 4
DSR Input $BB, bit 5
DTR Output $BA, bit 6

Direction indicates both data flow, and whether to use an IN or OUT instruction to read/write to the given pin.