CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ds1621 driver

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
atai21



Joined: 30 Dec 2010
Posts: 31

View user's profile Send private message

ds1621 driver
PostPosted: Sat Mar 05, 2011 7:52 am     Reply with quote

hai,
may i know whether this code work for ds1621 or not.TQ

Dallas DS18B20, 1 wire bus, +/-, multi device, Light codes.
http://www.ccsinfo.com/forum/viewtopic.php?t=41878
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Mar 05, 2011 1:50 pm     Reply with quote

quick answer , as written no..

however..it an be rewritten to work.

please read the datasheets of these devices.

compare the timing and structure of the communications required.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Mar 05, 2011 2:52 pm     Reply with quote

CCS has a driver for the ds1621, and it can handle multiple ds1621's.
It's in this directory:
Quote:

c:\program files\picc\drivers\ds1621m.c

It has these functions:
Quote:

void init_temp(int address)
BYTE read_high_temp(int address) // Returns degrees F (0-255)
signed int read_low_temp(int address) // Returns degrees F (-67 to 127)
signed long read_full_temp(int address) // Returns degrees F (-67 to 257)

The 'address' parameter is a number from 0 to 7, which corresponds to
the address pins A0, A1, A2 on each ds1621. For example, if you connect
A0,A1,A2 to ground, the address will be 0. If you connect A0 to +5v and
A1, A2 to ground, the address will be 1. Etc.
atai21



Joined: 30 Dec 2010
Posts: 31

View user's profile Send private message

PostPosted: Sun Mar 06, 2011 6:57 pm     Reply with quote

TQ for your fast reply
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group