MAX186 Maxim, MAX186 Datasheet - Page 21
![no-image](/images/no-image-200.jpg)
MAX186
Manufacturer Part Number
MAX186
Description
Low-Power / 8-Channel / Serial 12-Bit ADCs
Manufacturer
Maxim
Datasheet
1.MAX186.pdf
(24 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MAX1864EEE
Manufacturer:
MAXIM/美信
Quantity:
20 000
Company:
Part Number:
MAX1864TEEE
Manufacturer:
MAXIM
Quantity:
81
Part Number:
MAX1864TEEE
Manufacturer:
MAXIM/美信
Quantity:
20 000
Company:
Part Number:
MAX1864TEEE-T
Manufacturer:
ANPEC
Quantity:
3 400
Part Number:
MAX1865EEE
Manufacturer:
MAXIM/美信
Quantity:
20 000
Part Number:
MAX1865TEEP
Manufacturer:
MAXIM/美信
Quantity:
20 000
Company:
Part Number:
MAX1865TEEP+
Manufacturer:
Maxim Integrated Products
Quantity:
135
Part Number:
MAX1866EUB
Manufacturer:
MAXIM/美信
Quantity:
20 000
Figure 20. MAX186/MAX188 Assembly-Code Listing
*Title : MAX186.ASM
* Description :
*
*
*
*
* Roger J.A. Chen, Applications Engineer
* MAXIM Integrated Products
* November 20, 1992
*
******************************************************************************************************************************************************
MAIN:
MAINLOOP:
WAIT:
ENDPROGRAM:
INITQSPI:
;This routine sets up the QSPI microsequencer to operate on its own.
;The sequencer will read all eight channels of a MAX186/MAX188 each time
;it is triggered. The A/D converter results will be left in the
;receive data RAM. Each 16 bit receive data RAM location will
;have a leading zero, 12 bits of conversion result and three zeros.
;
;Receive RAM Bits 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
;A/D Result
***** Initialize the QSPI Registers ******
INCLUDE
INCLUDE
INCLUDE
ORG
INCLUDE ‘INITSYS.ASM’
INCLUDE ‘INITRAM.ASM’
JSR
JSR
LDAA
ANDA
BEQ
BRA MAINLOOP
PSHA
PSHB
LDAA
STAA
LDAA
STAA
LDAA
STAA
LDD
STD
LDD
STD
This is a shell program for using a stand-alone 68HC16 without any external memory. The internal 1K RAM
is put into bank $0F to maintain 68HC11 code compatibility. This program was written with software
provided in the Motorola 68HC16 Evaluation Kit.
INITQSPI
READ186
SPCR0
SPCR1
#$8008
#$0000
WAIT
$0200
QPDR
QPAR
QDDR
SPSR
#%01111000
#%01111011
#%01111110
#$80
‘EQUATES.ASM’ ;Equates for common reg addrs
‘ORG00000.ASM’ ;initialize reset vector
‘ORG00008.ASM’ ;initialize interrupt vectors
0 MSB
______________________________________________________________________________________
;idle state for PCS0-3 = high
;assign port D to be QSPI
;only MISO is an input
;master mode,16 bits/transfer,
;CPOL=CPHA=0,1MHz Ser Clock
;set delay between PCS0 and SCK,
;turn on internal SRAM at $10000
;start program after interrupt vectors
;set EK=F,XK=0,YK=0,ZK=0
;set sys clock at 16.78 MHz, COP off
;set stack (SK=1, SP=03FE)
;wait for QSPI to finish
LSB 0 0 0
Low-Power, 8-Channel,
Serial 12-Bit ADCs
21