​ ​ ​ ​ DS2501/DS2502/DS2505/DS2506 1-Wire PROM?
Results 1 to 8 of 8

Thread: DS2501/DS2502/DS2505/DS2506 1-Wire PROM?

  1. #1

    Default DS2501/DS2502/DS2505/DS2506 1-Wire PROM?

    Hi all,

    Has anybody used PICAXE to program one of these devices? Any tales of success or failure or any top tips please?

    They are (allegedly) the device one can use to fool a Dell laptop into thinking it's plugged in to a Dell charger.

  2. #2
    Senior Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    4,482

    Default

    The only work I've done with 1-wire protocols was with the DS18B20 temperature sensor, so I'm not going to be of much help to you.

    Can you post a link to the technical datasheet for the DS250x devices to help forum members to help you?

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    London
    Posts
    2,896

    Default

    Hi,

    Quote Originally Posted by nekomatic View Post
    They are (allegedly) the device one can use to fool a Dell laptop into thinking it's plugged in to a Dell charger.
    If it's a Programmable Read Only Memory, presumably you do know what data needs to be written into it, or being able to program it won't help?

    Cheers, Alan.

  4. #4
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,438

    Default

    Datasheet for the DS2502 can be found here -

    https://datasheets.maximintegrated.com/en/ds/DS2502.pdf

    I have not used one and programming may not be simple, not as easy as just connecting it to a PICAXE and sending OWIN/OWOUT commands. From page 2 -

    During programming, 1-Wire communication occurs at normal voltage levels and then is pulsed momentarily to the programming voltage to cause the selected EPROM bits to be programmed. The 1-Wire line must be able to provide 12 volts and 10 milliamperes to adequately program the EPROM portions of the part.
    Dallas used to have App Note 177 which describes how to program similar 1-wire EPROM devices from a PC -

    http://www.laptop-junction.com/toast...l-app177-c.pdf

    It may be easier to just follow that method, using their circuit and software, rather than do it from a PICAXE.

  5. #5
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,438

    Default

    One option instead of programming a DS250x and having to figure out how to do that might be to craft something which can emulate a DS250x and insert that in the signal path.

    Pure bit-banging would be too fast for a PICAXE but it may be possible to clock out data after every high, low or read bit sent using SPI or synchronised UART which allows data buffering and pre-loading of data. A fast PICAXE should be able to keep the buffer filled during the time it takes to clock out the previous 8 bits.

    So long as the read sequence is always consistent one doesn't need to know what that is or means; one only has to set the responses correctly at the right time. So the output for each high, low or read bit can be pre-determined.

    The hardest part may be creating an electrical interface which allows the responses to be sent and seen but which don't interfere with the signal which is also used for clocking. That could be achievable.

    It would probably be best to start with something which can return a faked serial number in response to a READOWSN command before going on to something more complicated, responding to READTEMP12, etc.

  6. #6

    Default

    Thanks for the replies so far. Yes, I do know what data I want to write, as that's described in this blog post which is how I got to the link I posted. The author of this post did indeed spoof the 1-wire signals using a microcontroller, but I'd prefer to use the PROM itself if possible for minimal component count. Apologies for not including a datasheet link and thanks hippy for posting that.

    Following the application note hippy also posted sounds sensible in principle but I can only find the DS2480B as a surface-mount part... I guess I could solder it on to a DIP adapter for breadboard use. The DS9097U-E25 interface itself costs nearly 100!

    I reckon interface circuit A in figure 8 of the datasheet should work with a PICAXE electrically speaking, but I'm not familiar enough with 1-wire to tell without experimenting whether a PICAXE can do all the required data writes and reads using owout and owin commands (plus a pulse on another pin to apply the programming voltage).

    In the meantime I've discovered by cunning choice of search terms on eBay that one can buy an "Adaptor with Chip Inside for Dell" for pennies from China, so I'm going to try that first and if that doesn't work I'll try getting hold of a DS2502 or two and playing around. Or of course find an unwanted Dell charger to break open and try to salvage the chip from there...
    Last edited by nekomatic; 26-07-2018 at 11:21. Reason: corrections

  7. #7
    Moderator
    Join Date
    Mar 2008
    Location
    Western Australia
    Posts
    12,273

    Default

    To program a 1-Wire EPROM device you will also need to construct a "special circuit that applied the 12 Vdc pulses via the data line at the required time.

    At a quick glance, the DS250x series is not greatly different to the EPROM element in the DS2406 (EPROM + 2 I/O pins) that I have programmed in the past.
    Programmed with a 12 Vdc pulse, 256 bit (=32 byte) pages, etc.

    Note that more correctly the DS250x series are EPROM's and NOT PROMS.

    Post 41 in my 1-Wire Network thread offers a stating point: http://www.picaxeforum.co.uk/showthr...Networks/page5
    Post 43 on the same page has a tutorial that I have prepared covering a number of devices.
    Post 61 has a photos of the modules associated with the DS2406 EPROM programmer
    Post 85 has a schematic which includes the programmer for the EPROM. Note the 4 pole switch to disconnect any other 1-wire devices when programming (they do not like the 12 Vdc pulses! )


    The webpage on defeating the laptop check has its own errors.
    QUOTE "The DS2501 seems to be 512 byte memory. "
    It is actually 512 bits (=64 bytes)

    I did not spot the file with the data for the replacement 1-wire EPROM but it is certainly not a large file (<= 64 bytes). Quite likely just 1 or 2 bytes.
    westaust55

    Hey Hamlet, 2B OR NOT 2B = $FF

  8. #8

    Default

    Thanks Westaust, that's extremely helpful!

    I think it's post 84 from the thread you linked, not 85, that has the EPROM programmer schematic (yes you're right they call it an EPROM for "electrically" programmable ROM, I took it off because to me EPROMs will always be 28-pin ceramic DIPs with a window in the top for UV erasing :-)

    For reference the description of the data that would need to be programmed is here - it sounds as if only the first 9 bytes starting from address 0x0A are likely to be critical. HOWEVER since I went back to that link to check which page it was, I read the comments there more carefully and found

    Small hint: you can use DS2431+ (1kbit eeprom).
    It doesn’t require 12V pulse like DS2502, so programming can be easily done with just plain Bus Pirate with external 2kohm pullup.

    Although DS2431 doesn’t send CRC byte after address bytes during Memory Read Command (0xF0) – it goes straight to memory array bytes. This can be fixed by programming right CRC value directly at address 0x08.
    So I guess the DS2433 should also work, and I can program that using the code from post 30 of your thread - or I expect I can slightly modify your code to work with a DS2431. Result!

    As I said my first stop will be to see if the adapter I've ordered will do the trick, but if not then it sounds as if I'll be able to get it up and running with the info you've provided (which I will bookmark for future reference re anything 1-Wire, thanks again.)

Bookmarks

Posting Permissions

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