NSC ADC12130 Test Interface

with dot matrix LCD Display
 

Table of Contents [Toc]

Overview
Specifications
Recommendations
Project Resources
   Available Microchip PIC Assembler Source Code
   Schematics & Data Sheets
 

Overview   [Toc] [Top]

The analog-to-digital converter (ADC) output data format can be chosen from 8 different configurations. To get rid of crosstalk in the prototyping setup, separate every interface data wire from each other with an extra ground wire between them (ADC to PIC interface). In the beginning I got really confusing results because of crosstalk due to the high frequency parts of the very short clock pulses. I use now flat band wire, with each data (and clock) connection guarded by a ground connection. The acquisition data from the ADC seems now to be pretty clean and consistent.
 

Specifications   [Toc] [Top]

National Semiconductors ADC12130 A/D Converter
Resolution: 12 bit + sign
Max. conversion clock frequency: 5 MHz
Max. serial clock frequency: 5 MHz
Min. conversion time: 8.8 us
Min. throughput time: 14 us
Integral linearity error: ± 2 LSB max
Single supply: 3.3 - 5.0 V  ± 10 %

Recommendations   [Toc] [Top]

SSP

Do not try to connect the NSC ADC12130 to the PIC SSP interface of some more sophisticated PICs, eg. PIC 16C74. I've spent a complete weekend trying to do that until I finally found out that the PIC SSP is somehow not compatible with the one of the NSC ADC12130. The clock and the data specifications of the PIC does (in my opinion) not match with the ones of the ADC, there's an incompatible "skew" between them. All my attempts to configure the PIC according to the SSP specification of the NSC ADC12130 failed...
 

ADC Configuration

I finally managed to get some status data out of the ADC device. I had so much trouble, because the data sheet is not very convenient to read and so I made a few mistakes. Well, the NSC ADC12130/ADC12132/ADC12138 data sheet is a perfect example of an over-engineered data sheet: In order to save documentation efforts (or maybe paper?), they managed to generate a compact configuration table (tbl. 4, p. 26), which is - although perfectly correct - quite difficult to correctly understand for all kind of ADC devices. The special representation of the data in the table is confusing and you have to be very careful to get the appropriate commands for the NSC12130 device.

Hello, I'm Matias and I would like to ask you some questions.
I've been looking into your altimeter project because I'm trying to make an ADC12138 + PIC project.
I've seen you use constants, for example:

constant autocal  = b'00100000'
constant autozero = b'00100100'

But regarding the ADC12130/2/8 data sheet, autocal is 00001000 and autozero is 00001001 and so...
They are different. I wonder if you can give me some advice, please.
Because this data sheet isn't clear at all.

best wishes,
Matias

I agree. Although the contents of the data sheet is absolutely correct, the way to describe for instance the configuration commands is quite special. I also needed some hours and several attempts until I finally figured out the correct configuration commands out of the data sheet for the NSC ADC12130. It is so easy to overlook some peculiarities in this data sheet. Well, they have a special notion of concise documentation - they somehow managed to sacrifice clarity for compactness.

Serial Data Format

Regarding the NSC ADC12138:
Remember the lower figure on page 19 in the ADC1213x data sheet:
- DI0 is the first bit to transfer from PIC to ADC, DI7 the last.

ADC12130/ADC12132 Configuration Commands

table 4, page 26 in the ADC1213x data sheet:

DI0:DI5     (DI6:DI7)
L L H L L L (L L) Auto Cal
L L H L L H (L L) Auto Zero

Existing code:
;*** CONFIGURATION COMMANDS of NSC ADC12130 ***
CONSTANT AutoCal    = b'00100000'
CONSTANT AutoZero   = b'00100100'

ADC12138 Configuration Commands

table 4, page 26 in the ADC1213x data sheet:

DI0:DI7
L L L L H L L L Auto Cal
L L L L H L L H Auto Zero

New code:
;*** CONFIGURATION COMMANDS of NSC ADC12138 ***
CONSTANT AutoCal    = b'00001000'
CONSTANT AutoZero   = b'00001001' 

 

Project Resources   [Toc] [Top]

Available Microchip PIC Assembler Source Code   [Toc][Top]

Main File HEX Files
Download assembler source code:
nsc12130.asm
Download Hex File:
nsc12130.hex
The above program needs additional include files (modules) to get successfully assembled: m_bank.asm, m_wait.asm, m_lcd.asm

Schematics & Data Sheets   [Toc][Top]

 

Last updated: 2010/04/10

[Toc] [Top]
 

If you see only this page in your browser window,
click here
to get the entire site.