User Tools

Site Tools


workshop:onewire

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
workshop:onewire [2012/08/13 22:30] – created dongheeworkshop:onewire [2018/07/18 14:10] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +One-Wire라는 이름 처럼 1개의 라인을 이용해서 양방향 통신을 한다.
  
-http://www.arduino.cc/playground/Learning/OneWire/+One-Wire는 Dallas Semiconductor 에서 만들었다.  
 + 
 +구조 
 + 하나의 마스터라 여러개의 슬레이브 IC로 구성이 된다. 마스터가 명령을 내린다. 
 +회로 
 + 특징: 통신선에 4.7k ohm 풀업 저항을 사용한다. 
 + 
 +참고  
 + * http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf 
 + * http://www.pjrc.com/teensy/td_libs_OneWire.html 
 + http://www.arduino.cc/playground/Learning/OneWire/
  
-data sheet 
-: http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf 
  
 ===== DS18B20 연결하기 ===== ===== DS18B20 연결하기 =====
  
 {{http://i.imgur.com/6BoiQ.png}} {{http://i.imgur.com/6BoiQ.png}}
 +
 +{{http://tushev.org/images/stories/arduino/ds18x20/ds18b20_bb.png}}
  
 {{{ {{{
  
 #include <OneWire.h> #include <OneWire.h>
-OneWire ds(pin_number); 
  
 #define DS18S20_ID 0x10 #define DS18S20_ID 0x10
 #define DS18B20_ID 0x28 #define DS18B20_ID 0x28
 +
 +int pin_number = 3;
 float temp; float temp;
 +
 +OneWire ds(pin_number);
  
 boolean getTemperature(){ boolean getTemperature(){
workshop/onewire.1344897026.txt.gz · Last modified: 2018/07/18 14:09 (external edit)