mrb(http://img151.imageshack.us/img151/9500/dilimdilim2ge7ak5.jpg) (http://imageshack.us) , bana proton ile yapılmıs glcd de gösterilmiş termometre devresi lazım. Yada buna benzer devre elinde olan varsa bana gerçekten çok yardım etmiş olur. :?:
yanlış birşey dedidysem özür dilerim şuan bu devreyi yapacak kapasitem yok.
http://wiki.picbasic.org/index.php?n=Main.ExampleCode
@AKP
bu konuda çok güzel örnekler var ,
forumumuzda arama sayfasına girip orada ,
LM35
18B20
GLCD
KS0108
yazarak bir çok örneğe ulaşabilir ve önce onları inceleyebilirsin ,
zaten daha öncede söylemiştim ,grafik ekranlar normal lcd ler gibi değildir,
glcd örneği istemişsin ama hangi grafik lcd ? gidip onumu satın alacaksın ? bunların ayak bağlantıları dışında kullanım komutlarıda çok benzer olmayabiliyor .
eğer çok hassas bir ölçüm yapılmayacaksa, picin analog girişinden faydalanarak LM35 ısı sensörünü rahatlıkla kullanabilirsin ,lm35 10mV/derece çıkış verir ,yani 50 derecede çıkış 0.5 volt .
glcd ekranı aldınmı ?
onu kurup çalıştırdınmı ?
hangi pici kullanacaksın ?
ekrana yazı yazdınmı ?
nasıl bir ısı ölçeceksin ? 0-100 derecemi ? 0-1000 derecemi ?
ne yapmak istiyorsun ?
ne yapmak istiyorsan ona ait 1 tane topic aç ,oradan devam et ,
böyle parça parça gidersen biryere varamazsın ,
benim sana tavsiyem .
tabi bunlar belli bir proje için uğraşıyorum diyorsan geçerli ,
yoksa genel olarak farklı farklı şeyleri öğrenmek - uğraşmak istiyorum diyorsan o başka
bir örnek (alıntıdır)
MCP9700, Low-Power Linear Active Thermistor ICs
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en022289
Device = 18F4220
XTAL = 4
LCD_DTPORT = PORTD
LCD_RSPIN = PORTC.1
LCD_ENPIN = PORTE.0
LCD_RWPIN = PORTC.0
LCD_CS1PIN = PORTE.1
LCD_CS2PIN = PORTE.2
LCD_TYPE = GRAPHIC
INTERNAL_FONT = On
FONT_ADDR = 0
ALL_DIGITAL = TRUE ' NEED THIS!
Symbol LSBscale = 4.8828125
Dim temperature As Float
Declare ADIN_RES 10
'Declare ADIN_TAD 2 'CLK options are 0, 1, 2, 3 (0-2 are based on internal cycles)
Declare ADIN_STIME 100
TRISA.0 = 1
ADCON1 = %00001110 ' Set up the ADCON1 register, AN1 / RA1 is now analog
ADCON0 = %00000011
ADCON2 = %10001010
DelayMS 1000
Cls
Main:
Cls
Dim ADVAL As Word
ADVAL = ADIn 0 ' Read channel 0 to adval (0-1023)
temperature = ADVAL * LSBscale
'Print At 1,1," ADC Reaging is ", Dec ADVAL ' Display the decimal value
'Print At 2,1, Dec ADRESH
'Print At 3,1, Dec ADRESL
'PRINT at 4,5, DEC2 temperature
Print At 1,0, "Temperature is"
Print At 2,13, DEC2 (temperature - 500)/10 'Needed for MCP9700
'500mV @ 0 Centigrade
'Temperature (C) = (Vin-500)/10
'all in mV to keep things simple
Print At 4,6, "Centigrade!"
DelayMS 500 ' Wait 0.2 of a second
GoTo Main
Stop
Include "FONT.INC"
hocalarım şimdi 240*128 toshiba glcd kullanacağım
sanırım buradaki (http://www.dorukanstore.com/index.php?do=catalog/product&pid=3136) oluyor daha almadım dediğiniz gibi projem garanti değil. İnanın uğraşmıyorum değil çok uğraşıyorum sonuçta bu proje karşılığında çıkarım yok.
Protonun driverlerine baktım DS1820 buldum uğraştım aşağıdakini çıkardım. DS18B20 yoktu bulamadım. Ve bunu 240*128'e uyduracağım.
(http://img197.imageshack.us/img197/6483/jhgb.png) (http://img197.imageshack.us/i/jhgb.png/)
proteus desing file dosyası 7.5sp3 indir:
http://www.dosya.tc/tempature.rar.html
şimdi yapmak istediğim glcd de yazı küçük dereceyi biraz daha büyük göstereceğim ne yapayım bana bir yol göösterin lütfen.
Include "PROTON18_G4.INT"
Cls
Dim command As Byte ' Storage for command
Dim i As Byte ' Storage for loop counter
Dim temp As Word ' Storage for temperature
Symbol DQ = PORTB.0 ' Alias DS1820 data pin
Symbol DQ_DIR = TRISB.0 ' Alias DS1820 data direction pin
mainloop:
GoSub init1820 ' Init the DS1820
command = $cc ' Issue Skip ROM command
GoSub write1820
command = $44 ' Start temperature conversion
GoSub write1820
DelayMS 2000 ' Wait 2 seconds for conversion to complete
GoSub init1820 ' Do another init
command = $cc ' Issue Skip ROM command
GoSub write1820
command = $be ' Read the temperature
GoSub write1820
GoSub read1820
' Display the decimal temperature
Print At 4,8, Dec (temp >> 1), ".", Dec (temp.0 * 5), " C"
GoTo mainloop ' Do it forever
' Initialize DS1820 and check for presence
init1820:
Low DQ ' Set the data pin low to init
DelayUS 500 ' Wait > 480us
DQ_DIR = 1 ' Release data pin (set to input for high)
DelayUS 100 ' Wait > 60us
If DQ = 1 Then
Print At 4,6, "DS1820 yok!"
DelayMS 500
GoTo mainloop ' Try again
EndIf
DelayUS 400 ' Wait for end of presence pulse
Return
' Write "command" byte to the DS1820
write1820:
For i = 1 To 8 ' 8 bits to a byte
If command.0 = 0 Then
GoSub write0 ' Write a 0 bit
Else
GoSub write1 ' Write a 1 bit
EndIf
command = command >> 1 ' Shift to next bit
Next i
Return
' Write a 0 bit to the DS1820
write0:
Low DQ
DelayUS 60 ' Low for > 60us for 0
DQ_DIR = 1 ' Release data pin (set to input for high)
Return
' Write a 1 bit to the DS1820
write1:
Low DQ ' Low for < 15us for 1
@ nop ' Delay 1us at 4MHz
DQ_DIR = 1 ' Release data pin (set to input for high)
DelayUS 60 ' Use up rest of time slot
Return
' Read temperature from the DS1820
read1820:
For i = 1 To 16 ' 16 bits to a word
temp = temp >> 1 ' Shift down bits
GoSub readbit ' Get the bit to the top of temp
Next i
Return
' Read a bit from the DS1820
readbit:
temp.15 = 1 ' Preset read bit to 1
Low DQ ' Start the time slot
@ nop ' Delay 1us at 4MHz
DQ_DIR = 1 ' Release data pin (set to input for high)
If DQ = 0 Then
temp.15 = 0 ' Set bit to 0
EndIf
DelayUS 60 ' Wait out rest of time slot
Return
End
Include "FONT.INC"
zaman daralıyor onun için telaşlıyım telaştan hızlı ilerleyemiyorum :cry: