大香蕉大香蕉在线播放-日韩av在线一区中文字幕-日韩熟女熟妇久久精品综合-精品免费视频一区二区三区

技術(shù)熱線: 4007-888-234
設計開發(fā)

專注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命

開發(fā)工具

提供開發(fā)工具、應用測試 完善的開發(fā)代碼案例庫分享

技術(shù)支持

從全面的產(chǎn)品導入到強大技術(shù)支援服務 全程貼心伴隨服務,創(chuàng)造無限潛能!

新品推廣

提供新的芯片及解決方案,提升客戶產(chǎn)品競爭力

新聞中心

提供最新的單片機資訊,行業(yè)消息以及公司新聞動態(tài)

溫度LTC1392 with PIC16C84單片機

更新時間: 2019-03-22
閱讀量:2980

單片機方案開發(fā)商深圳英銳恩分享溫度LTC1392 with PIC16C84單片機。

Use of an LTC1392 10-bit Temperature, Vcc and Differential Voltage Monitor - Basic Stamp 2 and PIC16C84

Introduction.

The Linear Technology LTC1392 is an inexpensive 10-bit A/D converter with the added capability of measuring the temperature of the IC and the value of the nominal +5 V supply. This makes it ideal in monitoring the health of the environment in any electronic equipment.

The low power dissipation also makes it an ideal IC for remote data logging using battery power. The quiescent current when idle is typically 0.2 uA. While performing a conversion the current drain rises to nominally 350 uA.

The device is available from DigiKey (LTC1392CN8-ND) for $7.50 in single unit quantities. A data sheet in .pdf format may be obtained from Linear Technologies.

In the following discussion, interfacing a Basic Stamp 2 with a single LTC1392 is illustrated. Interfacing the LTC1392 with a PIC is also discussed.

Sequence.

A measurement sequence is started by bringing /CS low which resets the device. Note that as it is the high to low transition, CS must first be at logic one. After bringing /CS low, a minimum delay of 80 usecs is required for a temperature measurement and 10 usecs for all other measurements.

Four configuration bits are then serially transmitted by the processor using the TX_DATA and CLK leads. In transmitting toward the device, the data is first set up on the on the TX_DATA lead and the CLK is then brought momentarily low. The actual capture of the data by the LTC1392 is on the rising edge of the clock.

Note that when the device is not selected (/CS high) and during the time this four bits is being sent by the processor, the devices D_out lead (RX_DATA) is in a high impedance mode.

Upon sending the four configuration bits, the 1392's D_out lead (RX_DATA) comes out of tri-state and the result is serially shifted toward the processor, beginning with a logic zero and then the most significant bit or a 10-bit result. Each data bit is transmitted by the LTC1392 on the falling edge of the clock.

Upon receipt of the 10 bits, the /CS is brought high, ending the measurement sequence.

Actually, I left a little out. The device may be configured such that after receipt of the 10 bit result in most significant bit format, continued clocking will cause the result to again be output in least significant bit format. I do not deal with this capability in this discussion. Actually, I am uncertain I grasp why anyone would want it.

The Command Bits.

After bringing /CS low, a four bit conguration word is sent to the device. Bit b_3, (the most significant bit) is always a logic one and is termed the "start" bit. Bits b_2 and b_1 determine the measurement mode as shown;

Mode b_2 b_1 Measurment

0 0 0 Temperature
1 0 1 V_cc
2 1 0 V_differential (1.0 V Full Scale)
3 1 1 V_differential (0.5 V Full Scale)

Bit b_0 is used to specify whether the least significant bit first sequence is to follow the most significant bit first sequence and mentioned above. Let's just cut through the confusion and set it to a logic 1.

Thus, the configuration word is;

mode = 0x09 | (mode << 1);

where the mode is either 0, 1, 2 or 3 as noted in the above table.

Conversions.

Upon receiving the 10 bits of data, the temperature, V_cc or other voltage is calculated.

Temperature.

The range between -130 degrees C and 125.75 degrees C is broken into 1024 discrete bands. Thus,

T_c = (125.75 - (-130)) * band / 1024 - 130.0

or T_c = 256/1024 * band - 130
= band / 4.0 - 130.0

For the Stamp;

T_100 = 100 * T_c = 25 * band - 13000

V_cc.

The range between 2.42 and three times 2.42 is broken into 1024 bands. Thus,

V_cc = (3*2.42 - 2.42) * band / 1024 + 2.42
= (2*2.42) * band / 1024 + 2.42
= 4.84 * band / 1024 + 2.42

For the Stamp;

V_CC_100 = 100 * V_cc = (60 * band)/128+242

Other.
When measuring the differential voltage between +V_in and -V_in using the 1.0 full scale reference;

V_diff = band / 1024 * 1.0

For the Stamp;

DIFF_VOL_100_1 = 100 * V_diff = (100 * band)/1024

When using the 0.5 V full scale;

V_diff = band / 1024 * 0.5

For the Stamp;

DIFF_VOL_100_2 = 100 * V_diff = (50 * band)/1024

Basic Stamp 2 - Program LTC1392.BS2.

In program LTC1392.BS2 a Basic Stamp 2 is used to fetch the values of temperature, V_cc and V_diff using both of the references. Note that it is assummed there is an applied voltage of less than 0.5 Volts between +V_in and -V_in.

The four-measurement sequence is repeated ten times.


' LTC1392.BS2
'
' Measures Temperature in degrees C, V_cc, V_diff (1.0 V Ref) and V_diff
' (0.5 V Ref). Ten such measurment sequences performed.
'
' Basic Stamp 2 LTC1392
'
'
' PIN11 (term 15) <----RX_DATA --------- (term 2) D_out
'
' PIN10 (term 14) ---- TX_DATA --------- (term 1) D_in
' PIN9 (term 13) ----- CLK ------------- (term 3) CLK
' PIN8 (term 12) ----- /CS ------------- (term 4) /CS

' ------- (term 6) +V_in
' ------- (term 7) -V_in
'
'
' +5 ---- (term 8) V_cc
' GRD --- (term 5) GRD
'
' copyright, Towanda Malone, Morgan State University, May 22, '97
'

get_10 var word ' 10 bits fetched from LTC1392
out_4 var byte ' 4 bits sent to 1392

m var byte ' index used in main
n var byte ' index used in subroutines
mode var byte ' 0 - Temperature measurment

' 1 - V_CC meas
' 2 - V_diff (1.0 V Reference)
' 3 - V_diff (0.5 V Reference)

T_100 var word ' 100 * T in degrees C
VCC_100 var word ' 100 * V_CC (Volts)
DIFF_VOL_100_1 var word ' 100 * V_diff (1.0 V Reference)
DIFF_VOL_100_2 var word ' 100 * V_diff (0.5 V Reference)

rx_data var in11
tx_data con 10
clk_pin con 9
cs_pin con 8

dirs = $07ff ' 8, 9, 10 Outputs, 11 Input

main:
for m = 1 to 10 ' make ten measurment sequences

mode =

为什么搜索不到裸体| 为什么搜索不到裸体| 男人和女人干污污| 91成人精品国语自产拍| 综合欧美日韩一区二区三区| 欧美猛男一区二区三区快播| 人妻熟女av一区二区三区| 欧美一级特黄大片在线看| 久久精品欧美精品免费观看| 日韩视频无码日韩视频又2020 | 波多野结衣福利视频| 91性潮久久久久久久久| 操我好舒服用力视频| 精品福利一区二区三区在线观看| 日本人妻与家公的伦理片| 国产日韩一区二区三区在线播放| 大鸡巴射在穴穴里的视频| 国产精品不只是精品| 男人摸女人下面视频| 国产 欧美 日韩 黄片| a一级毛片免费高清在线| 亚洲一区亚洲二区在线观看| 男人几把操女人嫩穴| 中文字幕欧美人妻在线| 久久久精品日韩一区二区三区| 把美女日到高潮喷水视频| 亚洲国产日韩欧美高清片| 无码毛片一区二区本码视频| 日本欧美中文字幕| 多男用舌头伺候一女| 有关日本黄色录像的视频| 在线无码一区二区三区不卡| 啊啊啊别操了视频| 大胸瑟瑟黑丝午夜| 黄色免费老人操逼| 日本 日韩 欧美| 色偷偷影音先锋男人av| 两人爽爽爽无码免费视频| 麻豆国产欧美一区二区三区r| 青青河边草直播免费观看| 日韩精品一区二区天堂|