Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 10th May 2008, 04:20 PM   (permalink)
Experienced Member
Pommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to behold
Default

Quote:
Originally Posted by SPDCHK
I'm now "playing" with the DS1820 1-wire temperature sensor chip, modifying the example code for the 18F1320, and not USART but LCD.
You may find this interesting.

Mike.
Pommie is online now   Reply With Quote
Old 10th May 2008, 04:58 PM   (permalink)
Experienced Member
SPDCHK has a spectacular aura about
Default

I have noticed that there are two different libraries. The chip I got is the DS1820. NO S or B in the name. What I did find is that the DS18S20 lib worked in Swordfish. I modified it for the 18F1320 chip and read the input on PortA<0>. I tested the circuit with melting and boiling water. in the ice it came down to about 0.5°C, but the boiling water only got to 87°C. Up here in Johannesburg (being about 1650m above sea level) it's normal for water to start boiling in a kitchen kettle at 90°C

Code:
Device = 18F1320
Clock = 8

// import modules...
Include "IntOSC_1320.bas"
Include "convert.bas"
Include "LCD.bas" 
Include "DS18S20.bas"
Include "utils.bas"

Dim 
   TempA As ShortInt,
   TempB As Byte    // for the DS18S20.bas lib this is a WORD
SetPin(PORTA.0)

// Find() will search the bus for a single DS1820 device
// and load its ROM ID into the DS1820 public variable RomID - you
// could do this manually. For example, RomID = MyRomID...

SetAllDigital
If Not Find Then
LCD.Cls                                 // Clear the LCD screen
LCD.WriteAt(1,1,"No device found")          // Send some text to the LCD
Else
   While true
      ConvertAll
      GetTemp(TempA, TempB)
      LCD.WriteAt(1,1,Convert.DecToStr(TempA),".",DecToStr(TempB)," C")   //
      LCD.WriteAt(2,1,GetTempAsStr, " C")                                       // The same as the line above
      DelayMS(500)
   Wend
EndIf
SPDCHK is offline   Reply With Quote
Old 10th May 2008, 11:08 PM   (permalink)
Experienced Member
 
Blog Entries: 2
gramo is just really nicegramo is just really nicegramo is just really nicegramo is just really nice
Default

The DS18S20 uses a bandgap temperature sensing rather than the dual-oscillator architecture used by the DS1820, this difference is invisible to the user

The main difference between the two parts is the temperature conversion time: DS1820 = 500ms (max) and DS18S20 = 750ms (max)

In most applications, DS18S20 is software compatible with the DS1820
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline   Reply With Quote
Old 10th May 2008, 11:11 PM   (permalink)
Experienced Member
 
Blog Entries: 2
gramo is just really nicegramo is just really nicegramo is just really nicegramo is just really nice
Default

Quote:
Originally Posted by SPDCHK
Gramo,

I suppose that's why they pay you the BIG BUCKS hey?
I wish... the only donation I've ever recieved from my site was from my mother


I wasn't trying to ninja pommies post, just providing a different solution that didn't involve system libraries
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline   Reply With Quote
Old 11th May 2008, 01:12 AM   (permalink)
Experienced Member
Pommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to behold
Default

Quote:
Originally Posted by gramo
just providing a different solution that didn't involve system libraries
I provided that solution as well.

Mike.
Pommie is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Brown-out reset on LF PIC bananasiong Micro Controllers 10 17th May 2007 12:33 AM
74LS90 power-on auto reset Torben Electronic Projects Design/Ideas/Reviews 17 20th December 2006 04:18 AM
vx-5r reset problem tom muleady General Electronics Chat 2 5th July 2006 06:01 PM
uC 'network' reset circuitry rockin_rick Electronic Projects Design/Ideas/Reviews 8 30th May 2006 01:03 AM
How to reset SCR used for triggering camera flash shootfirst Electronic Projects Design/Ideas/Reviews 20 28th September 2005 08:40 PM



All times are GMT. The time now is 05:57 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.