Bookmark, share, and hop your favorite sites with SiteHoppin Toolbar for Firefox!書籤,分享與合您最喜愛的網站與sitehoppin用於Firefox的工具欄!



Zedomax DIY 109 - Build a digital thermometer in one minute! zedomax diy 109 -建立一個數字式溫度計在一分鐘!

Posted in張貼在 DoItYourself! doityourself ! by max on the September 15th, 2006 at 8:54 pm由Max於2006年9月15日在下午8時54分

[DIY 109] [ diy 109 ]

Do it yourself !這樣做你自己!


Zedomax Digital Thermometer zedomax數字式溫度計
Build a digital thermometer in 1 minute! 建立一個數字式溫度計在1分鐘!

Here’sa video of building a digital Thermometer in 1 min:下面的錄像,建立一個數字式溫度計在1分鐘:

Here’sa video of Zedomax digital Thermometer in Action:下面的錄像, zedomax數字式溫度計在行動:

Parts List: 部分名單:

1 CB280 Start Kit 1 cb280啟動套件

1 CLCD420B 1 clcd420b

1 DS1620 (available at mouser.com or digikey.com too) 1 ds1620 (可在mouser.com或digikey.com太)

available at cubloc.com可在cubloc.com

Estimated Time to Assemble: 1 minutes時間估計組裝: 1分鐘

Estimated Time to Program: zero (source code provided)估計時間來計劃:零(源代碼提供)

Okay, it seems like the only class I really enjoyed in college was the embedded computer class.好了,好像只有一流的,我真的喜歡在高校是嵌入式計算機課。 All the other circuit classes and computer language classes bore the hell out of me because they was no actual product.所有其他電路班和計算機語言課程負有地獄出我,因為他們沒有實際的產品。

With embedded computers, you actually physically get to see stuff and that’s what I liked about it.與嵌入式計算機,你其實是身體要想看到的東西,這就是我喜歡它。

Well I started w/ the Motorola MC68 series microcontrollers and it took me almost a week to make a digital thermometer.以及我開始瓦特/摩托羅拉mc68系列微控制器和我花了將近一個星期作出的數字溫度計。 I had to make everything from scratch.我不得不作出一切從頭開始。 It was still interesting because I made something physical and it worked!這仍是有趣的,因為我所作的一些物理和它的工作!

Anyways, now I am glad I can do the same thing except it only takes me 1 minute! anyways ,現在我很高興我可以做同樣的事情,除了只需要我1分鐘!

Not because I got smarter but mostly because I’ve done this thousand times now, but I think anyone should be able to accomplish this in 1 minute if you follow these directions.並不是因為我聰明,但主要是因為我已經這樣做了一千遍,現在,但我認為任何人都應該能夠做到這一點,在1分鐘,如果您按照這些方向。 : )

Connections連接

Just follow the above picture exactly in less than 1 minute and you have the following source code to download and make this thing work!只要按照上述圖片,正是在不到1分鐘,你有以下的源代碼,下載並作出這件事的工作!

diy109.zip

Taking it Further…同時它進一步…

Okay, now you have a 1 minute guide to making a digital thermometer.好吧,現在你有1分鐘的指南作出了數字式溫度計。 Go to your college professor and show him how you can make one in 1 minute… maybe he will give you some extra credit…轉到您的大學教授,而且顯示他如何可以使一個在1分鐘…也許他會給你一些額外的信用…

If you are having any trouble with above app, please e-mail如果您有任何問題與上述亞洲漿紙,請E - mail max@zedomax.com

If you have any cool apps you’d like to share or want some kind of DIY, please e-mail to如果您有任何的勁酷程序您想分享,或想要一些種diy ,請E - mail至 max@zedomax.com

We do accept free samples for DIYs, please email我們接受免費樣品為diys ,請發送電子郵件 max@zedomax.com : )

Program Source…節目來源…

‘ DS1620 Temperature Sensor App v.0.0.1

‘ v0.0.1 - Displays upto 2 decimals

‘ by using DS1620’s precise mode

Const Device=cb280

‘ Set Pin numbers!

‘ Set DQ,CLK,RST pins

‘Connect P24 to RST of DS1620

‘Connect P25 to CLK of DS1620

‘Connect P26 to DQ of DS1620

#define RST 24

#define CLK 25

#define DQ 26

Set Ladder Off

Dim ReturnedTemp As Single, TempF As Single, TempC As Single ‘Floating Point variables for storing temperature

Dim COUNT_REMAIN As Single, COUNT_PER_C As Single ‘Floating Point variables for calculations

Dim tmp As Single ‘Temporary variable for Floating Point

Dim TempString As String *6

Dim TempFString As String * 6

Dim TempCString As String * 6

Set Display 2,0,0,128

‘Erase screen

Cls

Delay 100

Csroff

Locate 2,0

Print “Zedomax Digital”

Locate 5,1

Print “Thermometer”

Locate 0,2

Print “Fahrenheit: “

Locate 0,3

Print “Celcius: “

DS1620Init

‘On timer(5) Gosub MAINPROCESS ‘Timer Interrupt every 500msec!

Do

DS1620

Loop

‘MAINPROCESS:

‘Return

End

Sub DS1620Init()

Output RST

Output CLK

Output DQ

‘Send Initialization to DS1620

Out RST, 1

Shiftout CLK,DQ,0,0×0C,8

Shiftout CLK,DQ,0,0×02,8

Out RST, 0

‘Start DS1620 Temperature Conversion!

Out RST, 1

Shiftout CLK,DQ,0,0xEE,8

Out RST, 0

End Sub

Sub DS1620()

‘——Read Temp——————————

Out RST,1

Shiftout CLK,DQ,0,0xAA,8

ReturnedTemp=Shiftin(CLK,DQ,0,9)

ReturnedTemp=ReturnedTemp/2

Out RST,0

Out RST,1

Shiftout CLK,DQ,0,0xA0,8

COUNT_REMAIN=Shiftin(CLK,DQ,0,9)

Out RST,0

Out RST,1

Shiftout CLK,DQ,0,0xA9,8

COUNT_PER_C=Shiftin(CLK,DQ,0,9)

Out RST,0

‘——Precision Formula (According to DS1620 Data Sheet)

tmp=(COUNT_PER_C-COUNT_REMAIN)

tmp=tmp/COUNT_PER_C

If tmp>0 Then

TempC=ReturnedTemp-0.25

TempC=TempC+tmp

Else

TempC=ReturnedTemp

End If

‘Change from Celcius to Fahrenheit!

TempF=TempC*1.8

TempF=TempF+32

‘Convert floating point value to string and set the number of decimals

TempString=Float ReturnedTemp

TempFString=Float TempF

TempCString=Float TempC

TempString=Left(TempString,4)

TempFString=Left(TempFString,5)

TempCString=Left(TempCString,5)

‘Output to LCD!

Locate 12,2

Print TempFString

Locate 12,3

Print TempCString

‘ Locate 0,2

‘ Print TempString, ” Deg C (w/o precision)”, Cr

‘Print to debug screen!

‘Debug “Current Temperature in is “, Cr,TempFString, ” Deg F “, Cr

‘Debug TempCString, ” Deg C”, Cr

‘Debug TempString, ” Deg C (without precision)”, Cr

End Sub

, ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet) (尚無評)
Loading ... Loading ...載入中...


RSS feed RSS饋送 | Trackback URI Trackback跟踪的URI

5 Comments 5評論 »

2006-09-15 21:10:51 2006年9月15日21時10分51秒

[...] Full story via Link [...] [ … … ]充分的故事,通過鏈接[ … … ]

myavatars 0.2
2006-11-29 05:51:12 2006年11月29日5時51分12秒

I’m making a Digital Thermometer with a DS1620 and a 8051.我作出的數字溫度計與ds1620和8051 。 Do you need a lookup table for that?你需要一個查找表是什麼? Could you tell me where i can find the code?你能告訴我,我可以找到代碼? Thanks in advance..感謝在推進..

myavatars 0.2
Comment by 評論 max 最高
2006-11-29 07:36:57 2006年11月29日7時36分57秒

Hi there, you don’t need any tables for the DS1620, you just need to talk to it喜在那裡,您不需要任何表為ds1620 ,你只需要談它的
using the SPI protocol.使用SPI協議。 If you have any Basic programming experience, you can refer to the above Program Source, which you probably easily convert to 8051’s C language.如果您有任何基本的編程經驗,您可以參考上述程序的來源,你可能很容易轉換為8051的C語言。

myavatars 0.2
Comment by Joe 評論由Joe
2007-02-08 20:39:11 2007年2月8日20時39分11秒

Hello Max, good job!您好最高,做好! I got a question how you convert the voltage into fahrenheit and celcius.我得到一個問題,您如何轉換為電壓到華氏和celcius 。 thanks謝謝

myavatars 0.2
Comment by sai 評論由西 訂閱評論通過電子郵件
2008-05-02 04:07:13 2008年5月2日4時07分13秒

can you maill me one please你能maill我一請

myavatars 0.2
Name (required) 姓名(必填)
E-mail (required - never shown publicly) 電子郵件(必填-從來沒有公開表明)
URI 開放的我們

Subscribe to comments via email 訂閱評論通過電子郵件
Your Comment ( 您的評論( smaller size 面積較小 | | larger size 面積較大 )
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment. 你可以使用<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <刪除日期時間= “ ” >的<em>的<i> <q cite=""> <strike>的<strong>在您的評論。