dallas ibutton to pics


Closed Thread
Results 1 to 7 of 7
  1. #1
    CBUK's Avatar
    CBUK Guest

    Default dallas ibutton to pics

    i have recently delved into the world of dallas semiconductors and have come across the ibuttons (a keyring form of data storage/ ID requiring a simple 1 wire touch to a pod to be read) i have adopted the commands in the proton compiler as the same as that of the 1wire dallas command for example reading the temperature from the 1 wire thermo semiconductor. i have had reasonable success with reading the serial numbers of these devices however the current code patten is just looping on owrites and oreads and if the button is placed on the pad at the right moment (im assuming ) then it will read the 64 bit code which is great as i am developing a security access panel involving a RTC for time stamping but just need a reliable basic code to read these things 1st time round. is it possible to put the program into a trap until it detects the presence of the buttons? has any body had any experiences of these in other suitations?

  2. #2
    CBUK's Avatar
    CBUK Guest


    Did you find this post helpful? Yes | No

    Default

    ah ha, ive sorted a sloution that seems to be working very well, posted below:

    symbol but =portc.6
    owrite but,1,[$33h]
    delayms 20
    oread but,0,[ {values of serial numbers} ]

    ' the $33h is the address for the button to spew its serial number. there are other commands that you shoud reference to the data sheet for the required memory read/ write/ scratchpad... etc

    i have developed the iButtons to form part of a security access scheme with a master key that allows the user to add, delete or change level access for various pin outs on the pic.

    if anybody has a spare few hours id strongly recomend you look at the power if these devices! and even the general application of 1-wire communication!

    chris

  3. #3
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default iButton Access

    Quote Originally Posted by CBUK
    ah ha, ive sorted a sloution that seems to be working very well, posted below:

    symbol but =portc.6
    owrite but,1,[$33h]
    delayms 20
    oread but,0,[ {values of serial numbers} ]

    ' the $33h is the address for the button to spew its serial number. there are other commands that you shoud reference to the data sheet for the required memory read/ write/ scratchpad... etc

    i have developed the iButtons to form part of a security access scheme with a master key that allows the user to add, delete or change level access for various pin outs on the pic.

    if anybody has a spare few hours id strongly recomend you look at the power if these devices! and even the general application of 1-wire communication!

    chris
    Hi Chris,

    I'm very interested in your project, becurse I also tries to do an Access Control system with DS1990A. Have no problem to communicate with the iButton, but wants to connect a RTC for logging date (YYMMDDHHMM) in EEPROM (24LC65). One of my problem is that I store the iButton in a simular EEPROM, and if it is to many (over 50) it takes to long time to react on the iButtons in EEPROM. How can I find away to quick check if an iButton is authorized (stored in EEPROM).

    Greatful for help

    Bosse

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,796


    Did you find this post helpful? Yes | No

    Default

    Well, the search function you are using I suppose is linear. So if the entry to search is the last one then you have to read all the previous ones. If you are lucky only the first byte should be tested.

    I think the best method is to use Binary Search. How this works? Have a google on this and you will see. It has nothing to do with hex/bin/dec!

    I don't have right now a running code about this but may be get it to finish in a couple of months.

    Ioannis

  5. #5
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default iButton Access

    Quote Originally Posted by Ioannis
    Well, the search function you are using I suppose is linear. So if the entry to search is the last one then you have to read all the previous ones. If you are lucky only the first byte should be tested.

    I think the best method is to use Binary Search. How this works? Have a google on this and you will see. It has nothing to do with hex/bin/dec!

    I don't have right now a running code about this but may be get it to finish in a couple of months.

    Ioannis
    Thank you for your answer, I have only the problem to read the 24LC65 fast enough and find out if the iButton is in the EEPROM fastest possible for Authorization of the iButton in the Reader. Going to try
    Binary Search.

    Bosse

  6. #6
    Join Date
    Sep 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Unhappy Ds1990a

    Still problems with searching and get the right speed to see if an DS1990A is authorized (stored in EEPROM - 24LC65) Hope to could check about 50 iButton in EEPROM fastest possible. Tried to do a binary search, but have not succed to find a code that works, I'm quit new to program microcontrollers. Write my programs in PICBASIC PRO. Using a PIC16F628, 20 Mhz, going to change to a PIC16F876 with more RAM. Very greatful for all help I can get.
    Bosse

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,796


    Did you find this post helpful? Yes | No

    Default

    Can you post the code you have now for the searching?

    Also the part that stores the keys in EEPROM.

    Have sort them upon storing new key or deleting one?

    Ioannis

    P.S. Thanks for the wishes.

Similar Threads

  1. Dallas CRC8 Routines
    By Tom Estes in forum Code Examples
    Replies: 23
    Last Post: - 8th May 2018, 19:07
  2. Dallas IButton 1990 Presence pulse
    By enigma in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th August 2008, 23:04
  3. Retrieving infos from multiple PICs on a bus/chain
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th October 2007, 05:42
  4. ibutton ds1990 dallas
    By davleo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 18th May 2005, 19:51
  5. Dallas DS1994 iButton CLOCK
    By NavMicroSystems in forum Code Examples
    Replies: 0
    Last Post: - 29th September 2004, 23:19

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts