View previous topic :: View next topic |
Author |
Message |
jeremy57350
Joined: 11 Jan 2012 Posts: 14
|
2 ds18s20 |
Posted: Thu Feb 02, 2012 8:38 am |
|
|
hello,
I have just acquired a DS18S20 sensor via one wire bus, now I am interested in the acquistion of two sensors and read their ROM code
for this I thought to read a code Roma and me on a afiche aficheur
I can not but if anyone can help me
I thought this:
Code: |
float ds18s20_read1()
{
long int toto;
onewire_reset();
onewire_write(0x33);
toto=onewire_read();
return (toto);
}
|
and
Code: |
while (1)
{
lcd_gotoxy(2,2);
temperature = ds18s20_read();
printf(lcd_putc,"\f%3.1f%cC", temperature, 223);
}
}
|
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Thu Feb 02, 2012 9:16 am |
|
|
There are drivers for this chip in the examples folder as well as the code library here in this forum. |
|
|
jeremy57350
Joined: 11 Jan 2012 Posts: 14
|
|
Posted: Thu Feb 02, 2012 4:02 pm |
|
|
thank you, I'll get this. would you have the links please? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Thu Feb 02, 2012 5:01 pm |
|
|
The CCS examples folder is on your hard drive in PICC\Examples
For the Code Library click on CCS Forum Index at the top left
(right above the blue line) then select Code Library. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
|