Wednesday, January 2, 2013

1-Wire EEPROM devices

     Last time we introduced you to 1-wire devices and showed you how I made a generic device reader. In this post we are going to use my adapter to read some 1-wire chips and get into another of my hobbies, Motorola radios. Remember that unique ID on each 1-wire device I told you about? We will see that as well.

Here is are first target, a >$200 usb cable for a Motorola Astro25 series portable. Nothing in this cable is worth >$200, not even close. Here's whats inside





First thing we need to do is download and install a program called OneWireViewer if you don't already have it. OneWireViewer
Install this and connect you onewire reader, start it up and if needed set your adapter as the default 1-wire device.







You should have something like this
The first device under the device list is the unique ID of the adapter you are using.








 I pulled up the detailed service manual for one of the radio's that uses this cable and found the pinout of the mating side connecter. I then found the 1-wire data pin and ground and connected up mode homebrew adapter.


Almost immediately I now see an additional device in the device list. This is the unique ID of the 1-wire chip in my cable.



This view shows some data about our device and clicking on the memory tab shows us the memory contents. Selecting main memory will show us what we need, the scratchpad is used for moving data to the device before committing it to memory.


 Looks like only page 0 is used in this chip, if I highlight the contents of each line and use Ctrl-C to copy them to the clipboard I can paste them into Hex Workshop (HW from now on) to see what we have. After opening HW, create a new blank file and use paste special to paste the data into the new file, making sure "interpret as a hexadecimal string" is checked.


 and we have


This makes a little more sense, USB1.... is the data we are looking for, this is what tells the radio we have this expensive cable attached to it. Some further reading into the service manual reveals that when the cable is attached and connected to the PC the +5v from the USB port is connected to a transistor that is then turned on to ground the CTS pin which tells the radio micro-controller to read the 1-wire pin. If it see's this data then it configures the pins for USB operation and your pc see's the radio as a USB device. Here is a basic schematic, I'm not going into exact details, but there is more than enough data here to make your own cable. If any one uses this to make cables and sell them I only ask that you donate a percent to the p25.ca server fund to help pay the bills.


4 comments:

  1. cordial saludos srs
    como es la interface de programacion o si sepuede fabricar

    ReplyDelete
  2. Sorry I'm not sure what your asking.

    ReplyDelete
  3. Hi this is really cool, thanks for sharing. Found your blog via communications.support forum.

    ReplyDelete
  4. Hi Magnus,
    I understand that the CTS pin must be grounded for activating the USB bus, but I didn’t understand very well what is the 1-wire bus used for?

    Thanks,
    Vlad

    ReplyDelete