
Chapter 5
Programming
©
National Instruments Corporation
5-35
AT-MIO-16X User Manual
2.
Write the mode value to the Am9513A Data Register to store the
Counter 2 mode value. Am9513A counter mode information can be
found in Appendix C, AMD Am9513A Data Sheet.
C225 — Selects 5-MHz clock (from SOURCE2 pin)
CB25 — Selects 1-MHz clock
CC25 — Selects 100-kHz clock
CD25 — Selects 10-kHz clock
CE25 — Selects 1-kHz clock
CF25 — Selects 100-Hz clock
C525 — Selects signal at SOURCE5 input as clock
(counts the rising edge of the signal, 6 MHz maximum)
3.
Write FF0A to the Am9513A Command Register to select the
Counter 2 Load Register.
4.
Write the desired cycle interval plus one to the Am9513A Data
Register to store the Counter 2 load value.
5.
Write FF42 to the Am9513A Command Register to load Counter 2.
6.
Write FFF2 to the Am9513A Command Register to decrement
Counter 2.
7.
Write FF22 to the Am9513A Command Register to arm Counter 2.
After you complete this programming sequence, Counter 2 is
configured to count the desired interval after each rising edge on
GATE2 is encountered. The terminal count active low edge will restart
the waveform generation process.
Servicing Update Requests
Updating the DACs using a timer signal can be handled using either
polled I/O, interrupts or DMA requests. Upon the application of a
falling edge signal to the TMRTRIG* signal, both DACs are updated
and TMRREQ in Status Register 1 is set and if DMA or interrupts are
enabled, a request is generated. TMRTRIG* can be connected to
selected internal signals on the RTSI bus with A4RCV set or the
external signal EXTTMRTRIG* with A4RCV cleared. In the polled I/O
mode, the TMRREQ signal must be monitored in the Status Register to
determine when the previous value has been updated to the DAC and a
new value is required. The most desirable solution involves the use of
interrupts because the PC is not dedicated to monitoring the Status
Register. If interrupts are enabled, an interrupt occurs when TMRREQ
is set. In interrupt mode, TMRREQ must be cleared using the TMRREQ
Summary of Contents for DAQ AT-MIO-16X
Page 240: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 2 National Instruments Corporation...
Page 241: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 3 AT MIO 16X User Manual...
Page 242: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 4 National Instruments Corporation...
Page 243: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 5 AT MIO 16X User Manual...
Page 244: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 6 National Instruments Corporation...
Page 245: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 7 AT MIO 16X User Manual...
Page 246: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 8 National Instruments Corporation...
Page 247: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 9 AT MIO 16X User Manual...
Page 248: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 10 National Instruments Corporation...
Page 249: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 11 AT MIO 16X User Manual...
Page 250: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 12 National Instruments Corporation...
Page 251: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 13 AT MIO 16X User Manual...
Page 252: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 14 National Instruments Corporation...
Page 253: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 15 AT MIO 16X User Manual...
Page 254: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 16 National Instruments Corporation...
Page 255: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 17 AT MIO 16X User Manual...
Page 256: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 18 National Instruments Corporation...
Page 257: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 19 AT MIO 16X User Manual...
Page 258: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 20 National Instruments Corporation...
Page 259: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 21 AT MIO 16X User Manual...
Page 260: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 22 National Instruments Corporation...
Page 261: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 23 AT MIO 16X User Manual...
Page 262: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 24 National Instruments Corporation...
Page 263: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 25 AT MIO 16X User Manual...
Page 264: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 26 National Instruments Corporation...
Page 265: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 27 AT MIO 16X User Manual...
Page 266: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 28 National Instruments Corporation...
Page 267: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 29 AT MIO 16X User Manual...
Page 268: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 30 National Instruments Corporation...
Page 269: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 31 AT MIO 16X User Manual...
Page 270: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 32 National Instruments Corporation...
Page 271: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 33 AT MIO 16X User Manual...
Page 272: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 34 National Instruments Corporation...
Page 273: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 35 AT MIO 16X User Manual...
Page 274: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 36 National Instruments Corporation...
Page 275: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 37 AT MIO 16X User Manual...
Page 276: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 38 National Instruments Corporation...
Page 277: ...Appendix C AMD Am9513A Data Sheet National Instruments Corporation C 39 AT MIO 16X User Manual...
Page 278: ...Appendix C AMD Am9513A Data Sheet AT MIO 16X User Manual C 40 National Instruments Corporation...