Datasheet
ADC12030, ADC12032, ADC12034
ADC12038, ADC12H030, ADC12H032
ADC12H034, ADC12H038
SNAS080K –JULY 1999–REVISED MARCH 2013
www.ti.com
The ADC powers up with No Auto Cal, No Auto Zero, 10 CCLK Acquisition Time, 12-bit conversion, data out with
sign, power up, 12- or 13-bit MSB first, and user mode. Auto Cal, Auto Zero, Power Up and Power Down
instructions do not change these default settings. The following power up sequence should be followed:
1. Run the program
2. Prior to responding to the prompt apply the power to the ADC12038
3. Respond to the program prompts
It is recommended that the first instruction issued to the ADC12038 be Auto Cal (see Section 1.1 Interface
Concepts).
Code Listing:'variables DOL=Data Out word length, DI=Data string for ADC DI input,
' DO=ADC result string
'SET CS# HIGH
OUT &H3FC, (&H2 OR INP (&H3FC)) 'set RTS HIGH
OUT &H3FC, (&HFE AND INP(&H3FC)) 'set DTR LOW
OUT &H3FC, (&HFD AND INP(&H3FC)) 'set RTS LOW
OUT &H3FC, (&HEF AND INP(&H3FC)) 'set B4 low
10
LINE INPUT “DI data for ADC12038 (see Mode Table on data sheet)”; DI$
INPUT “ADC12038 output word length (8,9,12,13,16 or 17)”; DOL
20
'SET CS# HIGH
OUT &H3FC, (&H2 OR INP (&H3FC)) 'set RTS HIGH
OUT &H3FC, (&HFE AND INP(&H3FC)) 'set DTR LOW
OUT &H3FC, (&HFD AND INP(&H3FC)) 'set RTS LOW
'SET CS# LOW
OUT &H3FC, (&H2 OR INP (&H3FC)) 'set RTS HIGH
OUT &H3FC, (&H1 OR INP(&H3FC)) 'set DTR HIGH
OUT &H3FC, (&HFD AND INP(&H3FC)) 'set RTS LOW
DO$= “ ” 'reset DO variable
OUT &H3FC, (&H1 OR INP(&H3FC)) 'SET DTR HIGH
OUT &H3FC, (&HFD AND INP(&H3FC)) 'SCLK low
FOR N=1 TO 8
Temp$=MID$(DI$,N,1)
IF Temp$=“0” THEN
OUT &H3FC,(&H1 OR INP(&H3FC))
ELSE OUT &H3FC, (&HFE AND INP(&H3FC))
END IF 'out DI
OUT &H3FC, (&H2 OR INP(&H3FC)) 'SCLK high
IF (INP(&H3FE) AND 16)=16 THEN
DO$=DO$+“0”
ELSE
DO$=DO$+“1”
END IF 'input DO
OUT &H3FC, (&H1 OR INP(&H3FC)) 'SET DTR HIGH
OUT &H3FC, (&HFD AND INP(&H3FC)) 'SCLK low
NEXT N
IF DOL>8 THEN
FOR N=9 TO DOL
OUT &H3FC, (&H1 OR INP(&H3FC)) 'SET DTR HIGH
OUT &H3FC, (&HFD AND INP(&H3FC)) 'SCLK low
OUT &H3FC, (&H2 OR INP(&H3FC)) 'SCLK high
IF (INP(&H3FE) AND &H10)=&H10 THEN
DO$=DO$+“0”
ELSE
DO$=DO$+“1”
END IF
NEXT N
END IF
OUT &H3FC, (&HFA AND INP(&H3FC)) 'SCLK low and DI high
FOR N=1 TO 500
NEXT N
PRINT DO$
INPUT “Enter “C” to convert else “RETURN” to alter DI data”; s$
42 Submit Documentation Feedback Copyright © 1999–2013, Texas Instruments Incorporated
Product Folder Links: ADC12030 ADC12032 ADC12034 ADC12038 ADC12H030 ADC12H032 ADC12H034
ADC12H038