Zedomax DIY 109 - costruisca un termometro digitale in un minuto!
[DIY 109]
Faccialo voi stessi!
Costruisca un termometro digitale in 1 minuto!

Qui è un video di costruzione del termometro digitale in 1 minuto:
Qui è un video del termometro digitale di Zedomax nell'azione:
Elenco delle parti:
1 corredo di inizio CB280
1 CLCD420B
1 DS1620 (disponibile a mouser.com o a digikey.com ugualmente)
disponibile a cubloc.com
Tempo valutato da montare: minuti 1
Tempo valutato al programma: zero (codice sorgente fornito)
Approvazione, sembra come l'unico codice categoria che realmente ho goduto in università ero il codice categoria incluso del calcolatore. Tutti i altri codici categoria dei codici categoria del circuito e di linguaggio di programmazione alesano l'inferno da me perché erano prodotto reale.
Con i calcolatori incastonati, ottenete realmente fisicamente vedere che il roba e quello è che cosa ho gradito a questo proposito.
I pozzi I iniziato con i microcontroller di serie di Motorola MC68 ed esso mi hanno occorr quasi una settimana per fare un termometro digitale. Ho dovuto fare tutto da zero. Ancora stava interessando perché ho reso qualche cosa di fisico ed ha funzionato!
In ogni modo, ora sono felice io posso fare la stessa cosa a meno che soltanto mi occorra 1 minuto!
Non perché ho ottenuto più astuto ma principalmente perché ora ho fatto questo mille volte, ma penso che chiunque dovrebbe potere compire questo in 1 minuto se seguite questi sensi.
Collegamenti
Segua appena esattamente la suddetta immagine in più meno di 1 minuto e voi hanno il seguente codice sorgente per trasferire e fare questo lavoro dal sistema centrale verso i satelliti di cosa!
Prendendolo più ulteriormente…
Approvazione, ora avete una 1 guida minuta a fare un termometro digitale. Va al vostro professore dell'università e che gli mostra che come potete fare uno in 1 minuto… forse gli darà un certo accreditamento supplementare…
Se state avendo de difficoltà con il suddetto app, prego E-mail max@zedomax.com
Se avete qualunque apps che freddi vorreste ripartire o desiderare un certo genere di DIY, prego E-mail a max@zedomax.com
Accettiamo i campioni liberi per DIYs, prego email max@zedomax.com
Fonte di programma…
‘ 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
Got a new hack, DIY, howto, or gadget? Tip us here.
Search for a Hack:
Bookmark It!
|del.icio.us |Digg it |SiteHoppin |Wagg It | TrackBack |
Email this to a Friend
Email This Page


[...] Full story via Link [...]
I’m making a Digital Thermometer with a DS1620 and a 8051. Do you need a lookup table for that? Could you tell me where i can find the code? Thanks in advance..
Hi there, you don’t need any tables for the DS1620, you just need to talk to it
using the SPI protocol. 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.
Hello Max, good job! I got a question how you convert the voltage into fahrenheit and celcius. thanks
can you maill me one please
Okay now I am getting a serious complex about being no good with electronics.