12.07.2015 Views

MAX192 Low-Power, 8-Channel, Serial 10-Bit ADC - Robotics UWA

MAX192 Low-Power, 8-Channel, Serial 10-Bit ADC - Robotics UWA

MAX192 Low-Power, 8-Channel, Serial 10-Bit ADC - Robotics UWA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Low</strong>-<strong>Power</strong>, 8-<strong>Channel</strong>,<strong>Serial</strong> <strong>10</strong>-<strong>Bit</strong> <strong>ADC</strong><strong>MAX192</strong>LDD #$0800STD SPCR2 ;set ENDQP to $8 for 9 transfers***** Initialize QSPI Command RAM *****LDAA #$80 ;CONT=1,BITSE=0,DT=0,DSCK=0,PCS0=ACTIVESTAA $FD40 ;store first byte in COMMAND RAMLDAA #$C0 ;CONT=1,BITSE=1,DT=0,DSCK=0,PCS0=ACTIVESTAA $FD41STAA $FD42STAA $FD43STAA $FD44STAA $FD45STAA $FD46STAA $FD47LDAA #$40 ;CONT=0,BITSE=1,DT=0,DSCK=0,PCS0=ACTIVESTAA $FD48***** Initialize QSPI Transmit RAM *****LDDLDDLDDLDDLDDLDDLDDLDD#$008F#$00CF#$009F#$00DF#$00AF#$00EF#$00BF#$00FFLDD #$0000PULBPULARTSSTDSTDSTDSTDSTDSTDSTDSTDSTD$FD20$FD22$FD24$FD26$FD28$FD2A$FD2C$FD2E$FD30READ192:;This routine triggers the QSPI microsequencer to autonomously;trigger conversions on all 8 channels of the <strong>MAX192</strong>. Each;conversion result is stored in the receive data RAM.PSHALDAA #$80ORAA SPCR1STAA SPCR1 ;just set SPEPULARTS***** Interrupts/Exceptions *****BDM: BGND;exception vectors point here;and put the user in background debug modeFigure 20. <strong>MAX192</strong> Assembly-Code Listing (continued)22 ______________________________________________________________________________________

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!