| Electronic Components Datasheet Search |
|
LTC2414IGN Datasheet(PDF) 43 Page - Linear Technology |
|
|
|||||||||||||||||||||||||||||
LTC2414IGN Datasheet(HTML) 43 Page - Linear Technology |
|
43 / 48 page ![]() LTC2414/LTC2418 43 241418fa // 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 @ PORTB.0 //input #pragma bit tx_pin @ PORTB.1 //output #pragma bit sck @ PORTB.2 //output #pragma bit sdi @ PORTB.3 //output #pragma bit sdo @ PORTB.4 //input #pragma bit cs_bar @ PORTB.5 //output // Global Variables uns8 result_3; // Conversion result MS byte uns8 result_2; // .. uns8 result_1; // .. uns8 result_0; // Conversion result LS byte void shiftbidir(char nextch); // function prototype void main( void) { INTCON=0b00000000; // no interrupts TRISA=0b00000000; // all PORTA pins outputs TRISB=0b00010001; // according to definitions above char channel; // next channel to send while(1) { /* channel bit fields are 7:6, 10 always; 5, EN; 4, SGL; 3, ODD/SIGN; 2:0, ADDR */ channel = 0b10101000; // CH0,1 DIFF. cs_bar=0; // activate ADC while(sdo==1) // test for end of conversion { // wait if conversion is not complete } shiftbidir(channel); // read ADC, send next channel cs_bar = 1; // deactivate ADC /* 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: bits 7:6, 00 always, 5, EN; 4, SGL; 3, ODD/SIGN; 2:0, ADDR */ } // end of loop } // end of main Figure 50. Sample Program in CC5X for PIC16F84 APPLICATIO S I FOR ATIO |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |