1Wire serial EEPROM, DS28EC20 and similar, any experience?


+ Reply to Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Feb 2013
    Posts
    837

    Default 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    Hello.
    Unfortunately, I was not able to read or write any I2C or SPI eeproms with PBP, so as last chance, I'm now looking into 1wire devices.
    I have worked with DS18B20 and it poses no issues, but what about EEPROM? any code examples? can't find any....

  2. #2
    Join Date
    Dec 2010
    Posts
    401


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    Quote Originally Posted by CuriousOne View Post
    Hello.
    Unfortunately, I was not able to read or write any I2C or SPI eeproms with PBP, so as last chance, I'm now looking into 1wire devices.
    I have worked with DS18B20 and it poses no issues, but what about EEPROM? any code examples? can't find any....
    Why can't you use I2C? I have a couple designs that use 24LC512 family with PBP, and no issues. What part number is the 1-wire device you are looking at?

  3. #3
    Join Date
    Feb 2013
    Posts
    837


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    I tried all sample codes and circuits for eeproms posted here
    none seems to work for me.
    for 1 wire device, haven't bought any yet, just deciding
    For experiments i have DS2501-U chip at hands.

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


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    The I2C works just fine. Used many times the I2CREAD and I2CWRITE commands.

    When there was a problem, was always my mistake in address, wrong use of commands (variable vs constant).

    Complete diagram along with your misbehaving code would help.

    Ioannis

  5. #5
    Join Date
    Feb 2013
    Posts
    837


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    I have posted all that here already.
    And this topic is about 1wire eeprom

  6. #6
    Join Date
    Dec 2010
    Posts
    401


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    Quote Originally Posted by CuriousOne View Post
    I have posted all that here already.
    And this topic is about 1wire eeprom
    Perhaps you should provide a link to where you have posted it. Not everybody reads every thread posted everywhere. The 1-wire devices tend to be about the same level of complexity as I2C with a few extra limitations, but are only available in a couple sizes and from a single vendor. If you only need 1K or so to identify a board you should be able to get it going easily. We are trying to steer you towards I2C because they are far more popular and if your project needs change, you won't have a lot of options. Not to mention your next project. I2C is easy and works well in PBP, but hey it's your project. You are less likely to find a code example if you need one for 1-wire, that's all.

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,085


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    Perhaps you should provide a link to where you have posted it.
    here is one
    http://www.picbasic.co.uk/forum/showthread.php?t=587
    felt like i was like pulling teeth
    Warning I'm not a teacher , prose like a gushing embroilment is not my style

  8. #8
    Join Date
    Feb 2013
    Posts
    837


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    DS28EC20 has 20KB of EEPROM, and already available from Chinese vendors, for around $1 per IC
    I actually need 2KB for font and 256 bytes for each language text (have 8 languages so far) so even 4KB would be ok

  9. #9
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,408


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    I would:
    1) Use a PIC with enough FLASH to store what needs to be stored (if possible).
    2) Use a FLASH-chip with SPI-interface (easier and faster than I2C IMHO)
    3) Use a FLASH/EEPROM with I2C interface
    4) Wind my own core-memory.
    5) Write down the information on paper, have a RaspberryPi with a camera and OCR software and then interface that to the PIC via CAN-bus.
    6) Use a fake/clone 1-wire device from China costing less than 1/3 of the original, able to store just half of what I need*, only to find it doesn't work at all.

    But hey, that's me :-)

    * The DS28EC20 is 20kbit, not kbyte so your 4kbyte of data won't fit - in case you got that mixed up.

    /Henrik.

  10. #10
    Join Date
    Feb 2013
    Posts
    837


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    1) Are there any PIC chips with 4KB of EEPROM available?
    2) I tried, can't make it work.
    3) Also does not work.
    4) Running on PIC16F887, code is already tight
    5) No open source hardware/software in my projects ever
    6) Actually they do work fine.

    And regarding the DS28EC20, if you noted, topic reads "DS28EC20 and similar" This means, that in case of need, say, DS2505 can be used, which has 64k.

  11. #11
    Join Date
    May 2013
    Location
    australia
    Posts
    2,085


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    2) I tried, can't make it work.
    3) Also does not work.
    maybe one day you could post a complete compliable example of what you have tried along with a sketch, schematic or photograph
    of how everything is connected instead of useless and inaccurate snippets and zippo data on how anything is really wired
    did you even try anything from this thread or am i completely wasting effort on you
    Warning I'm not a teacher , prose like a gushing embroilment is not my style

  12. #12
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,408


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    1) Are there any PIC chips with 4KB of EEPROM available?
    I don't know, haven't checked but I did not say EEPROM, I said FLASH. You can store things in the program memory, after all that's how the program is held in there right.

    2) I tried, can't make it work.
    Allright, post your code and we might be able to help.

    3) Also does not work.
    Allright, post your code and we might be able to help.

    4) Running on PIC16F887, code is already tight
    Use something slightly more modern then. 18F46K42 has 64k of FLASH and 4k of RAM, 18F47K42 doubles that again and they are both cheaper than the old 16F887.

    5) No open source hardware/software in my projects ever
    OK, yet you're scouring the forum for code to use - strange.

    6) Actually they do work fine.
    Well, there you go - in that case use it.

    And regarding the DS28EC20, if you noted, topic reads "DS28EC20 and similar" This means, that in case of need, say, DS2505 can be used, which has 64k.
    As far as I can see the DS2505 is 16kbit, not 64kbit. It can talk to the uC at 16.3kbit / second - that's insanely slow even compared to I2C (if speed doesn't matter then fine, no problem). And it's an "add-only" memory meaning you can program it over the 1-wire bus but one time only, there's no way to erase it.

    /Henrik.
    Last edited by HenrikOlsson; - 9th January 2022 at 17:33.

  13. #13
    Join Date
    Feb 2013
    Posts
    837


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    I'm getting 16F887 for about 30 cents Ones you mentioned cost 10-20 times more

    For the I2C/SPI EEPROM I already had separate topics open with code posted, but nothing happened

    And 1 wire has it's own advantages - it needs 1 wire to work My current project uses TQFP-44 PIC16F887
    and there is LCD screen, DS3231, TM1639, keypad, USB PD trigger and whole bunch of various hardware
    attached to it, so in search for available pins, I have to do tricky things, like using piezo buzzer for alarm, and combining
    that pin with LCD enable pin

    Similarily, I have no issues with OTP ROM - all it has to do is contain static text strings and font data - no need to update
    it ever

    Oh by the way, I've implemented famous Casio VL-1 "Da da da" beeper rhythm playback with PBP, after I polish the code, will post it for public

  14. #14
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    485


    Did you find this post helpful? Yes | No

    Default Re: 1Wire serial EEPROM, DS28EC20 and similar, any experience?

    Similarily, I have no issues with OTP ROM - all it has to do is contain static text strings and font data - no need to update
    it ever
    If you create Constant (CON) strings, you can store them categorically within a CALL/GOSUB routine. Using a Line variable (Line VAR BYTE) just set that to the text line needed.
    Code:
    Line VAR BYTE
    Language VAR BYTE
    String VAR BYTE[16] 'String buffer to hold ASCII text
    
    Main:
    Line = 1 'Welcome
    IF Language = 1 THEN 'English
     GOSUB Get_English
    ELSEIF Language = 2 THEN 'Spanish
     GOSUB Get_Spanish
    ELSEIF Language = 3 THEN 'German
     GOSUB Get_German
    ENDIF
    
    Get_English:
     SELECT CASE Line
      CASE = 1 : String = "Welcome"
      CASE = 2 : String = "Select Language"
      CASE = 3 : String = ...etc
     END SELECT
    RETURN
    
    Get_Spanish:
     SELECT CASE Line
      CASE = 1 : String = "Bienvenidos"
      CASE = 2 : String = "sel idioma"
      CASE = 3 : String = ...etc
     END SELECT
    RETURN
    
    Get_German:
     SELECT CASE Line
      CASE = 1 : String = "Willkommen"
      CASE = 2 : String = "Sprache auswählen"
      CASE = 3 : String = ...etc
    This should give you the idea.

Similar Threads

  1. Serial EEPROM
    By William in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 10th July 2009, 18:09
  2. something similar to DEC command
    By mischl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st May 2009, 23:24
  3. Problems with CRC8 Calc in 1Wire
    By JohnB in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th March 2007, 22:01
  4. what's similar to the 16f84a?
    By kenpo in forum General
    Replies: 11
    Last Post: - 18th February 2005, 18:26
  5. enumerate 1wire bus
    By justDIY in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 30th June 2004, 19:19

Posting Permissions

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