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

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

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

開發(fā)工具

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

技術(shù)支持

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

新品推廣

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

新聞中心

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

溫度LTC1392 with PIC16C84單片機

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

單片機方案開發(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成人精品国语自产拍| 婷婷激情五月天四房| 女同舔我下面直流水| 深插巴西美女的逼| 娇嫩的被两根粗大的np| 一区二区三区av精品| 插我舔内射18免费视频| 被春药女高潮抽搐喷水视频| 日本一区二区三区高潮喷吹| 胸大裸体美女视频| 日本中文字幕无人区一区二区| 国产精品538一区二区在线| 精品区在线导航视频观看| 麻豆91精品96久久久| avtt天堂网先锋伦理| 啊啊啊好疼视频进来| 中文字幕一高清免费视频| 骚穴 操我 视频| 二次元男生操女生屁眼爽| 嗯嗯好硬好大啊老公| 欧美精品国产一区二区在线观看 | 国产成人亚洲精品在线看| 最新的亚洲欧美中文字幕| 亚洲日韩不卡一区二区三区| 午夜精品福利一区二区三区蜜桃p| 精品少妇一区二区三区中文字幕| 插BB流水水视频| 大黑屌爆操日本女人| 国产色哟哟精选在线播放| 国产成人精品免费视频全| 欧洲老妇人操大逼| 日本高清不卡一区二区三区| aaa啊啊啊黄片| 一区二区三区av精品| 高清最新操逼吃鸡巴视频| 骚片视频在线观看| 97超级免费视频在线观看| 欧美日韩亚洲人人夜夜澡| 91啪国线自产2019| 操老骚逼三级黄视频|