DM5210 analog input module 4-3 RTD Embedded Technologies, Inc.
Table 4-1: DM210/DM5210 I/O Map
Register Description
Read Function
Write Function
Address *
(Decimal)
8255 PPI Port A
Read Port A digital input lines
Program Port A digital output
lines
BA + 0
8255 PPI Port B
(Channel Select)
Read Port B bits
Program channel number;
PB4-7 available for digital I/O
operations
BA + 1
8255 PPI Port C
Read Port C digital input lines
Program Port C digital output
lines
BA + 2
8255 PPI Control Word
Reserved
Program PPI configuration
BA + 3
8254 Timer/Counter 0
Read count value
Load count register
BA + 4
8254 Timer/Counter 1
Read count value
Load count register
BA + 5
8254 Timer/Counter 2
Read count value
Load count register
BA + 6
8254 Timer/Counter Control
Word
Reserved
Program counter mode
BA + 7
Read Data/
Start 12-bit Conversion
Read A/D converted data,
MSB
Start 12-bit A/D conversion
BA + 8
Read Data/
Start 8-bit Conversion
Read A/D converted data, LSB Start 8-bit A/D conversion
BA + 9
Read Status/Clear IRQ
Read status word
Clear interrupt line
BA + 10
IRQ Enable
Reserved
Enable and disable interrupt
generation
BA + 11
* BA = Base Address
Defining the I/O Map
The I/O map for the 210/5210 is shown in Table 4-1 below. As shown, the module occupies 12 consecutive I/O
port locations. The base address (designated as BA) can be selected using DIP switch S1 as described in Chapter 1,
Module Settings. This switch can be accessed without removing the module from the connector. S1 is factory set at
300 hex (768 decimal). The following sections describe the register contents of each address used in the I/O map.
BA + 0: PPI Port A — Digital I/O (Read/Write)
Transfers the 8-bit Port A digital input and digital output data between the module and an external device. A
read transfers data from the external device, through P2, and into PPI Port A; a write transfers the written data from
Port A through P2 to an external device.
BA + 1: PPI Port B — Channel Select (Read/Write)
The bottom four bits, PB0-PB3, program the analog input channel. The remaining four bits, PB4-PB7, are
brought out onto on-board pads, labeled P8, so that they can be used for digital control functions. Remember that if
you are using these four lines for control operations, you must preserve their settings when you write to this port to
change channels or enable interrupts.
Reading this register shows you the current settings.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com