the osc is correct dont know why it did not show caps
tried going with 4 still read low
? what changes in math
TEMP = ((TEMP*9/5)+32 ) is what i am using
thanks for the inputs
have not found any samples using owin with this chip
the osc is correct dont know why it did not show caps
tried going with 4 still read low
? what changes in math
TEMP = ((TEMP*9/5)+32 ) is what i am using
thanks for the inputs
have not found any samples using owin with this chip
Hi,
Did you ever try SEARCH with the 1820 Keyword ???
Surely NO !!!
I remember having posted a while ago for the DS1820 ...
Gives ... 22 Hits !
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Ok, try this:
Code:@ DEVICE pic16F877A, HS_OSC @ DEVICE pic16F877A, WDT_ON @ DEVICE pic16F877A, PWRT_ON @ DEVICE pic16F877A, BOD_ON @ DEVICE pic16F877A, MCLR_on @ DEVICE pic16F877A, LVP_OFF @ DEVICE pic16F877A, CPD_OFF @ DEVICE pic16F877A, PROTECT_OFF define osc 20 define loader_used 1 define lcd_dreg portd define lcd_dbit 4 define lcd_rsreg portd define lcd_rsbit 2 define lcd_ereg portd define lcd_ebit 3 define lcd_lines 2 define lcd_bits 4 define lcd_commandus 2000 define lcd_dataus 50 command var byte:i var byte:temp var word:dq var porta.5:dq_dir var trisa.5 adcon1=255:porta=255:portb=0:trisa=255:trisb=0:cmcon=7 Lcdout $fe,1,"Temp in degrees C" mainloop: Gosub init1820:command=$cc:Gosub write1820:command=$44 Gosub write1820:Pause 2000:Gosub init1820:command=$cc:Gosub write1820 Pause 2000:command=$be:Gosub write1820:Gosub read1820:TEMP=((TEMP*9/5)+32) Lcdout $fe,1,dec(temp>>1),".",dec(temp.0*5)," degrees C":Goto mainloop init1820: Low DQ:Pauseus 500:DQ_DIR=1:Pauseus 100 If DQ=1 Then Lcdout $fe,1,"DS1820 not present":Pause 500:Goto mainloop Pauseus 400:Return write1820: For i=0 to 7:low dq If command.0[temp] = 0 Then Pauseus 60:DQ_DIR = 1 Else @ nop DQ_DIR = 1:Pauseus 60 Endif Next i:Return read1820: For i=0 to 15:low dq @ nop dq_dir=1:temp.0[i]=1:if dq=0 then temp.0[i]=0 pauseus60:next i:return End
Tried This And Get Better Reading Only 6 Deg Low
However It Does Not Respond To Any Temperature Changes
Thanks
Read 65.xxxx
Does Not Update Hold Sensor And Nothing Changes
Reloaded Several Programs And They Work However Still Get Low Tmp Reading
Dont Think Its A Hardware Problem Because It Works Perfectly In Mikroe
Guess I Could That But Have Better Luck With Pbp As For As Adding My Stuff
65.xxx
Hmmm....maybe 65.535? 65.535 F? 65.535 C ?
Ever think that maybe your input was all 1's? And that it might've just been coincidence that your temp's are about 30 degrees low depending on the temp of the room?
Try this, might help...
http://www.picbasic.co.uk/forum/showthread.php?t=561
AND:
Last edited by skimask; - 23rd July 2008 at 20:05.
Hi, Cleaver
I suppose you work on an easyPic 4 or 5 ...
try this with sensor connected to PORTE2 and Pullup on porta.0 and 1.
After power on, type of sensor and ID is displayed.
press RA0 Button ( active low ! ) and you turn to thermo mode ( thermostat, in fact , see RA0 and RA.1 use ... )
Alain
PS : Fully PbP Written Program...
Last edited by Acetronics2; - 23rd July 2008 at 21:03.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks