| 数据搜索系统,热门电子元器件搜索 |
|
LTC2400CS8 数据表(PDF) 30 Page - Linear Technology |
|
|
|||||||||||||||||||||||||||||
LTC2400CS8 数据表(HTML) 30 Page - Linear Technology |
|
30 / 40 page ![]() 30 LTC2400 TYPICAL APPLICATIONS Sample Driver for LTC2400 SPI Interface The LTC2400 has a very simple serial interface that makes interfacing to microprocessors and microcontrollers very easy. Shown in Figures 32 and 34 are listings of sample source codes that can be used to initiate conversions and retrieve data from the LTC2400. The listing in Figure 32 was created by Parallax, Inc. (916- 624-8333), for the BASIC Stamp. This code uses indi- vidual port lines to control the LTC2400’s conversion and 'LTC2400 Sample Driver '03/17/99 This program is an example showing how to access the ' LTC2400 using the Basic Stamp2 from Parallax. Since ' the BS2 is based on a 16-bit architecture, only the ' upper 16 bits of the 24-bit result are displayed, ' although all 24 bits are retrieved. ADlo var word 'A/D result - lower 16 bits ADhi var word 'A/D result - upper 8 bits Ctr var byte 'loop counter Temp var bit 'temporary bit used for shift SDO con 0 'Serial data connected to P0 SCK con 1 'Serial clock connected to P1 CS con 2 'Chip Select connected to P2 Pwr con 3 'Stamp supplies power connected to P3 '(Uses only 0.3mA!) Init dira = $E 'Set up data direction 'Pwr, CS, and SCK are outputs 'SDO is an input outa = $0 'Initialize outputs 'Pwr, CS, and SCK are low pause 100 'Wait 100mS for I/O to settle high Pwr 'Power up the LTC2400 pause 1 'Wait 1mS for power-on sequence high CS 'Disable the device until we Start 'wish to read it. pause 125 'Eight times second low CS 'Enable the LTC2400 for Ctr = 0 to 31 high SCK 'Cycle clock 32 times gosub ShiftL retrieve the 32-bit result. A fourth port line is used to power the LTC2400, a vivid example of the converter’s micropower operation. The program’s main sequence activates the LTC2400’s serial interface, uses a loop to retrieve the 32 conversion bits, and then places the converter’s interface in a high impedance state and start- ing the next conversion. All bits are retained in variables ADlo and ADhi. The code can be found on their web site, www.parallaxinc.com. |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |