Searching \ for 'DS1620 code, anyone?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'DS1620 code, anyone?'.

Truncated match.
PICList Thread
'DS1620 code, anyone?'
2000\04\04@025744 by Dale Botkin

OK, I know this sounds absurdly simple, but it's got me tugging tufts of
hair out.  I've got my 16F84 talking to my LCD in 4-bit mode -- finally --
but can't seem to get an intelligible answer from the DS1620 temperature
sensor.  I'm getting *something*, I think, but it's not usable.

Does anyone have code to talk to a DS1620 (preferably C, but I'm not too
picky when accepting free help)?  I think the stuff I wrote is close, but
I've obviously missed something somewhere along the line.

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

2000\04\04@035634 by hlemoal

you can find information in C about the 16F84 and the DS1620 ( and the
DS1820) at this adress:, it is a very good site

Dale Botkin a *crit :

{Quote hidden}

2000\04\04@154139 by Steve Smith

picon face
Check out the archive I seem to rember this on list about 2 years ago.

Cheers Steve.....

2000\04\04@161751 by Dale Botkin

On Tue, 4 Apr 2000, Steve Smith wrote:

> Check out the archive I seem to rember this on list about 2 years ago.
> Cheers Steve.....

I did, and looked several other places.  The Circuit Cellar article
someone mentioned was assembler, and Parallax mnemonics at that.
Andersen's site has some 1820 1-wire code, but no 1620 3-wire.
Everything I could find was just going to be too ugly a job to convert, so
I'm doing it over in C again.  The code was fine, I'm sure, but just a lot
of work to adjust it to my hardware and translate it for my tools.

I think I found the problem, though -- I was dropping RST between sending
the command and sending/reading the data, and I think this is wrong.
According to the timing diagram from Dallas, it looks like I need to leave
RST high from start to finish, otherwise I kill the transfer.

Now all I ave left is to figure out how to manipulate individual TRIS
register bits in C.  I'd like to make a header file I can use just by
changing some defines to tell it which pins are which, rather than having
to do extensive editing if I use different port pins in the future.

Thanks to all who responded.  Once I have some good code, I'll post it so
others don't have so much work to do inthe future.

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
               -- Isaac Asimov

2000\04\05@034757 by Graeme Zimmer

Subject: Re: DS1620 code, anyone?

Goto Peter Crowcroft's DIY Electronics pages and download the source for
K75 PIC Trainer

It uses a DS1620

.......................... Zim

2000\04\06@011404 by Peter Crowcroft

Date:    Tue, 4 Apr 2000 09:41:44 +0100
From:    henri <spam_OUThlemoalTakeThisOuTspamWANADOO.FR>
Subject: Re: DS1620 code, anyone?

I am about to release an Introduction to LCD kit. Kit 134. It shows how to
connect a 16x2 LCD to a PC and also how to use a DS1620, set HI/LO
breakpoints, program it, change deg C/F at the push of a key. It also shows
just how to echo keystokes from the keyboard to the LCD.

All C source code is provided, annotated. I am not using a PIC, just a PC.

Get it at the top of

Kit 134.


Peter Crowcroft
                   DIY Electronics (HK) Ltd
               PO Box 88458, Sham Shui Po, Hong Kong
Voice: 852-2720 0255   Fax: 852-2725 0610    Web:
  Email:           Email:


2000\04\06@020224 by Dale Botkin

Thanks Peter, and everyone else who responded.

I have the PIC talking to the DS1620 now, and am able to set hi & low temp
limits, set config and read status, start conversion, and read the
temperature.  A couple of little things, like rotating the data read from
the 1620 at the wrong end of the read routine and an apparent error in the
Dallas data sheet, had me frustrated, but it's looking much better now.

The DS1620 data sheet says & shows CLK being high when RST is raised.  I
found I had to have CLK low when RST was raised or everything went pretty
much to hell.  Go figure.  Maybe it's just me, I don't know, but it works
now.  All I have left to do is write one last routine to translate the 9-bit
temperature value to an ASCII string (+-nnn.n) for display, and I'll be done
with this part.

I found a lot of assembler code for 1620 interfacing, most of it requiring
major surgery to adapt to my environment.  Some was 8051 assembler, in which
I am rapidly losing fluency.  There was some C code, but again none that
would really work for me.  In all cases, though, I was able to glean more
bits of information from someone else's code to either fix mine, or prove to
myself that I was doing that particular part right, so the problem must be
elsewhere.  And I saw one or two bits that I'm pretty sure WON'T work, no
matter what.

The Dallas people were very helpful in answering questions and digging for
code.  What finally provided the most help was some code from
for driving a DS1602 -- different function, same interface.  Microchip
tried, but didn't find anything.

I will be making the results public -- I tried hard to write my code so it
can be very easily modified to work with any hardware configuration, since I
know I'll be using it a lot myself.

Again, thanks to all who helped!


{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...