Picproje Elektronik Sitesi

DERLEYİCİLER => CCS C => Konuyu başlatan: remzi - 17 Aralık 2007, 11:25:11

Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: remzi - 17 Aralık 2007, 11:25:11
DS1820 ile DS18B20 arasındaki fark nedir. Biri diğerinin yerine kullanılabilirmi? Ayrıca display ile termometre yapmaya çalışıyorum. Elinde hazır kodları olan varmı?

iyi çalışmalar...
Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: Göktuğ - 17 Aralık 2007, 12:02:48
DS18B20  
High-Precision 1-Wire Digital Thermometer

Temperature Resolution (Bits)
9
10
11
12


DS1820
1–WireTM Digital Thermometer
• Temperature is read as a 9–bit digital value.
Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: remzi - 17 Aralık 2007, 12:21:37
Elinizde CCS ile yazılmış örnek bir kod varmı? Lcd için forumda var ama display için bulamadım?

iyi çalışmalar...
Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: M_B - 17 Aralık 2007, 14:43:32
[code]
float ds1820_read()
{
int8 busy=0, temp1, temp2;
signed int16 temp3;
float result;

onewire_reset();
onewire_write(0xCC);
onewire_write(0x44);

while (busy == 0)
 busy = onewire_read();

onewire_reset();
onewire_write(0xCC);
onewire_write(0xBE);
temp1 = onewire_read();
temp2 = onewire_read();
temp3 = make16(temp2, temp1);

//result = (float) temp3 / 2.0;   //Calculation for DS18S20 with 0.5 deg C resolution
result = (float) temp3 / 16.0;  //Calculation for DS18B20 with 0.1 deg C resolution

delay_ms(1);
return(result);
}


[code]// (C) copyright 2003 j.d.sandoz / jds-pic !at! losdos.dyndns.org

// released under the GNU GENERAL PUBLIC LICENSE (GPL)
// refer to http://www.gnu.org/licenses/gpl.txt

// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

/***********************1Wire Class***********************/
/*Description: This class handles all communication */
/* between the processor and the 1wire */
/* sensors.
/*********************************************************/

/*-------1-wire definitions-------*/
#define ONE_WIRE_PIN PIN_B0

/*******************1-wire communication functions********************/

/************onewire_reset*************************************************/
/*This function initiates the 1wire bus */
/* */
/*PARAMETERS: */
/*RETURNS: */
/*********************************************************************/

void onewire_reset()  // OK if just using a single permanently connected device
{
output_low(ONE_WIRE_PIN);
delay_us( 500 ); // pull 1-wire low for reset pulse
output_float(ONE_WIRE_PIN); // float 1-wire high
delay_us( 500 ); // wait-out remaining initialisation window.
output_float(ONE_WIRE_PIN);
}

/*********************** onewire_write() ********************************/
/*This function writes a byte to the sensor.*/
/* */
/*Parameters: byte - the byte to be written to the 1-wire */
/*Returns: */
/*********************************************************************/

void onewire_write(int data)
{
int count;

for (count=0; count<8; ++count)
{
 output_low(ONE_WIRE_PIN);
 delay_us( 2 ); // pull 1-wire low to initiate write time-slot.
 output_bit(ONE_WIRE_PIN, shift_right(&data,1,0)); // set output bit on 1-wire
 delay_us( 60 ); // wait until end of write slot.
 output_float(ONE_WIRE_PIN); // set 1-wire high again,
 delay_us( 2 ); // for more than 1us minimum.
}
}

/*********************** read1wire() *********************************/
/*This function reads the 8 -bit data via the 1-wire sensor. */
/* */
/*Parameters: */
/*Returns: 8-bit (1-byte) data from sensor */
/*********************************************************************/

int onewire_read()
{
int count, data;

for (count=0; count<8; ++count)
{
 output_low(ONE_WIRE_PIN);
 delay_us( 2 ); // pull 1-wire low to initiate read time-slot.
 output_float(ONE_WIRE_PIN); // now let 1-wire float high,
 delay_us( 8 ); // let device state stabilise,
 shift_right(&data,1,input(ONE_WIRE_PIN)); // and load result.
 delay_us( 120 ); // wait until end of read slot.
}

return( data );
}
Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: zafzaf82 - 22 Aralık 2007, 09:47:14
@Remzi ya bende haızr çalışan kod var ama şuan durumu biliyon. Erzincan :) neyse görüşürüz. 17 mayıs ta
Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: emperor - 22 Aralık 2007, 12:34:33
DS1820 CCS Code + Proteus Files (http://rapidshare.com/files/78274320/DS1820.rar.html)
Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: amfi_46 - 25 Mayıs 2008, 16:49:21
göktuğ isimli arkadşım bana ds18b20 nin nasıl çalıştığı lazım sende varsa koyabilirmisin buraya şimdiden teşekkürler
Başlık: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: berkay_yalan - 09 Şubat 2009, 16:55:32
Alıntı yapılan: "emperor"DS1820 CCS Code + Proteus Files
buradakı ornekde dogru degerı vermıyor bu devre dogru calısıyormu ?
Başlık: Ynt: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: kartal0689 - 05 Ocak 2017, 11:26:55
arkadaşlar peki ds1820 ile ds18S20 arasında fark var mı?
yoksa ikisi aynı malzeme mi?
Başlık: Ynt: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: ete - 05 Ocak 2017, 16:03:50
Aynı kılıfta çok benzer ama iki farklı malzemedir bunlar. Her birinin haberleşme ve sıcaklık hesap şekli farklıdır.

Ete
Başlık: Ynt: DS1820 ile DS18B20 arasındaki fark nedir.?..
Gönderen: dursuncemal - 05 Ocak 2017, 19:01:43
https://www.maximintegrated.com/en/app-notes/index.mvp/id/4377
yardimci olur umarim