
CHAPTER 4 - MODTILE OPERATION AND PROGRAMMING ..........4.I
BA +0: ReadStatus/StartConvert
(Read/Write) .........4-4
BA + l: Read
A/DData/Update
DACOutputs
(ReadAVrite)
................... .............4-4
BA+2:
BA +3: Scan/Burst
@ead/lVrite) ............4-5
BA +4: PPI
PortA - DigitalVO
(ReadAVrite)
.............. .................4-5
BA+
5: PPI
Port
B- Channel/Board
Functions
Select
(ReadAVrite)
.............. .........................4-5
BA+6: PPI
Port
C
- Digital
VO
(Read/Write)
................ ...............4-6
BA+7: 8255
PPI
Control
Word
(Write
Only)........... .......................4-6
BA+8: 8254
Timer/Counter
0(Read/lVrite)
................. ...................4-8
BA+9: 82!4Timer/Counter
I (Read/Write)
................. ...................4-8
BA+ l0: 8254
Timer/Counter2@ead/Write)
................. .................4-8
BA+ l1: 8254Control
Word
(Write
Only)........... .......4-8
BA+ 12:D/AConverter
I LSB
(Write
Only)
........... ........................4-9
BA+ 13:
D/A
ConverterI MSB
(Write
Only)........... .......................4-9
BA + 14:Clear
IRQ
Status/D/A
Converter
2LSB
(Read/Write)
............. ..............4-9
BA + 15:Clear
DMADone
Flag/D/AConverter2MSB
(Read/lVrite) .................4-9
Clearingand
SettingBits
in
aPort........... ....................4-10
Initializing
Enabling
and
Disabling
theExternal
Trigger ........'.4-13
Enablingand
DisablingIntemrpts ......4-13
Startingan
A./DConversion ................4-15
MonitoringConversion
Status
(DMADoneor
End-of-Convert)............... .......4-15
Reading
the
Converted
Data ...............4-16
Programmingthe
PacerClock
.......... .......................4-1'l
What
8259
Programmable
Intemtpt
Controller '....'....'......4-18
IntemrptMask
Register
(IMR) .......'...4-18
End-of-Intemrpt
(EOI)
Command ......4-18
WhatExactly
Happens
Whenan
IntemrptOccurs? .'.....'.............4-18
Using
Interrupts
inYour
Programs
........... .-.----........4'19
Writingan
IntemrptService
Routine
(ISR)............ ...'.'................4-19
Saving
the
StartupIntemrpt
Mask
Register
(IMR)andIntemrpt
Vector .....-....4-20
Restoring
the
Startup
IMR andIntemrpt
Vector .....4'21
Common
Interrupt
Mistakes ...............4-21
Data
Transfers
Using
Choosinga
DMAChannel ...'..............4-21
Allocating
aDMABuffer ...-.-.-.---...-...4-21
Calculating
thePageand
Offset
ofa
Buffer .......'....4-22
Setting
the
DMA Page
Register .-...-....4-23
DMAMask
DMA Mode
Programming
the
DMA Controller ..-..4-25
Programming
the
400/5400
forDMA..... ................'4-25