Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problems with 18b20
22-05-2014, 06:59 AM,
#11
RE: problems with 18b20
The file to fix the wrong temperatures is working, but I'm having an other issue, I can't use other sensors when using a 18B20

(imagine pin 13 for an LDR and pin 14 for 18B20)
for example:

#define ONEWIREBUS 14
int val1;
void setup() {
}

void loop() {
TEMPERATURE t;

if (DS18B20.read(ONEWIREBUS, SKIPROM, RES12BIT, &t))
{
if (t.sign) CDC.printf("-");
CDC.printf("%d.%d°C \r", t.integer, t.fraction);
}
delay(1000);

val1 = analogRead(13);
CDC.printf("%d", val1);
delay(1000);

}

Compiling is working but seems that DS18B20.read is blocking the PIC nothing is happening Sad . Is there any other method to use this sensor, like val2 = analogRead(14) ... and then do some conversions ?

Any help or suggestion, I'm missing something ?

Thanks

Additional info:

Bootloader: v4.14_18f4550_X20MHz
IDE: x4-easy-rev999
18b20.c (fixed)
Reply


Messages In This Thread
problems with 18b20 - by el_ric - 01-11-2013, 03:40 AM
RE: problems with 18b20 - by pingotg - 01-11-2013, 11:13 AM
RE: problems with 18b20 - by brikker - 16-03-2014, 10:48 PM
RE: problems with 18b20 - by regis - 17-03-2014, 07:29 PM
RE: problems with 18b20 - by fcapozzi - 19-03-2014, 06:28 PM
RE: problems with 18b20 - by brikker - 20-03-2014, 12:15 AM
RE: problems with 18b20 - by regis - 20-03-2014, 10:27 AM
RE: problems with 18b20 - by brikker - 28-03-2014, 12:50 AM
RE: problems with 18b20 - by regis - 30-03-2014, 04:36 PM
RE: problems with 18b20 - by darby59 - 18-09-2014, 08:19 AM
RE: problems with 18b20 - by gtcbreizh - 18-09-2014, 08:29 AM
RE: problems with 18b20 - by darby59 - 18-09-2014, 06:03 PM
RE: problems with 18b20 - by gtcbreizh - 18-09-2014, 06:32 PM
RE: problems with 18b20 - by joel - 30-05-2014, 09:24 AM
RE: problems with 18b20 - by el_ric - 18-04-2014, 11:34 PM
RE: problems with 18b20 - by insurg3nt3 - 22-05-2014, 06:59 AM
RE: problems with 18b20 - by gtcbreizh - 22-05-2014, 03:57 PM
RE: problems with 18b20 - by insurg3nt3 - 22-05-2014, 08:00 PM
RE: problems with 18b20 - by joel - 08-03-2015, 11:20 PM
RE: problems with 18b20 - by brikker - 11-10-2015, 08:49 PM
RE: problems with 18b20 - by regis - 12-10-2015, 11:05 AM
RE: problems with 18b20 - by brikker - 19-10-2015, 03:52 PM
RE: problems with 18b20 - by B4lfiz4r - 22-10-2015, 08:33 PM
RE: problems with 18b20 - by brikker - 23-10-2015, 07:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)