LTC2414 LINER [Linear Technology], LTC2414 Datasheet - Page 43

no-image

LTC2414

Manufacturer Part Number
LTC2414
Description
8-/16-Channel 24-Bit No Latency TM ADCs
Manufacturer
LINER [Linear Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LTC2414CGN
Manufacturer:
LTNEAR
Quantity:
20 000
Part Number:
LTC2414IGN#PBF
0
APPLICATIO S I FOR ATIO
// LTC2418 PIC16F84 Interface Example
// Written for CC5X Compiler
// Processor is PIC16F84 running at 10 MHz
#include <16f84.h>
#include <int16cxx.h>
#pragma origin = 0x4
#pragma config |= 0x3fff, WDTE=off,FOSC=HS
// global pin definitions:
#pragma bit rx_pin
#pragma bit tx_pin
#pragma bit sck
#pragma bit sdi
#pragma bit sdo
#pragma bit cs_bar
// Global Variables
uns8 result_3;
uns8 result_2;
uns8 result_1;
uns8 result_0;
void shiftbidir(char nextch);
void main( void)
{
/* channel bit fields are 7:6, 10 always; 5, EN; 4, SGL; 3, ODD/SIGN; 2:0, ADDR */
/* At this point global variables result 3,2,1 contain the 24 bit conversion result. Variable result3
contains the corresponding channel information in the following fields:
}
INTCON=0b00000000;
TRISA=0b00000000;
TRISB=0b00010001;
char channel;
while(1)
{
channel = 0b10101000;
cs_bar=0;
while(sdo==1)
{
}
shiftbidir(channel);
cs_bar = 1;
bits 7:6, 00 always, 5, EN; 4, SGL; 3, ODD/SIGN; 2:0, ADDR */
}
// end of main
// wait if conversion is not complete
// end of loop
U
U
@ PORTB.0
@ PORTB.1
@ PORTB.2
@ PORTB.3
@ PORTB.4
@ PORTB.5
W
Figure 50. Sample Program in CC5X for PIC16F84
U
//input
//output
//output
//output
//input
//output
// Conversion result MS byte
// ..
// ..
// Conversion result LS byte
// function prototype
// activate ADC
// deactivate ADC
// no interrupts
// all PORTA pins outputs
// according to definitions above
// next channel to send
// CH0,1 DIFF.
// test for end of conversion
// read ADC, send next channel
LTC2414/LTC2418
43
241418fa

Related parts for LTC2414