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

code for DS2401

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



Joined: 07 Jan 2006
Posts: 38

View user's profile Send private message

code for DS2401
PostPosted: Mon Feb 21, 2011 5:10 am     Reply with quote

Hello there,
I'd like to help some pic users who search for ds2401 emulating code with some code written in ccs, but first of all I'd like you (users, admins) if it would be legal to post such a code (as far as i know in my country isn't specified if it is legal or strictly forbidden...)
...this is just because dfs2401 is a unique lasered 8byte serial number used in many apps for many years and it happens some time that people need to change a faulty ds but also rewrite/modify the code in the original application (on target platform), task which usually is impossible; yes I know that in such cases it would be more "politically correct" to ask dallas to send another DS ..yet...

Thank you
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Feb 21, 2011 5:39 am     Reply with quote

I don't understand what you are exactly asking for. You'll find e.g.

- drivers for several 1-wire chips shipped with CCS C. Reading the DS2401 serial number will be a subset of all existing 1-wire drivers. See e.g. DS2432.c DS1993.c in drivers directory

- many forum threads dedicated to 1-wire interfacing, including code examples. Simply search the board.

- In addition, you can post your own code as long as you don't copy copyright protected CCS examples or drivers.

P.S.: O.K. I see, I misunderstood your question, Your asking for 1-wire emulation. I'm not aware of an example, but it's pretty easy of course. I don't see, that there should be a restriction on emulating a simple digital device.

I know, that 8-pin devices, e.g. PIC12F683 have been used for a (partial) functional emulation of DS2432. It should be pretty sufficient for serial number only.
dorinm



Joined: 07 Jan 2006
Posts: 38

View user's profile Send private message

PostPosted: Mon Feb 21, 2011 5:53 am     Reply with quote

no, I'n not searching for any code Smile
... some time ago I was trying to find some emulation code for ds2401 ...as I didn't find one, I wrote it myself; in ds2401 datasheet (and dallas webpage) it is clearly stated that any emulation/copy of the original product is strictly prohibited , that's probably why I didn't find any piece of code; neverthless I would like to share my piece of code with others (I think it might help others too) but I asked if you ppl think it is ok. So , anyone any opinion?

Thank you
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Feb 21, 2011 6:50 am     Reply with quote

In my opinions emulating a DS2401 doesn't involve reverse engineering, because it's completely possible based on published data. Also the 2002 datasheet doesn't mention any restrictions or confidential ratings.

Emulation can be required for test purposes and doesn't necessarily imply illegal objectives.
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Mon Feb 21, 2011 7:19 am     Reply with quote

Maxim Dallas one wire devices rely heavily on a unique serial number.
In a sense they own this sequence of numbers when they guarantee uniqueness. Emulation also requires a serial number so the only way to guarantee uniqueness is to obtain one from a Dallas device and then retire or destroy that device. Statistically the odds that an emulated device ( with a randomly selected serial number) finds its way onto a one wire network with true one wire devices and that a serial number is duplicated is vanishingly small. However if it should happen the true one wire has the legal ownership of its serial number.
dorinm



Joined: 07 Jan 2006
Posts: 38

View user's profile Send private message

PostPosted: Mon Feb 21, 2011 7:43 am     Reply with quote

yes you are right; anyway, I've posted the code just because when I needed it in a big hurry thre was almost nothing about this subject and a lot of people asking for it (not all of us are geniuses Smile) )
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