Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

1-wire gang programming

Status
Not open for further replies.

drkidd22

Member
Hello,

I want to make a 1-wire gang programmer which is capable of programming 20 1-wire devices (DS2502) at once. I would also like to have user feedback via an led to let user know when each device has been successfully programmed which means I will need to know the location of each device to be programmed. Anyone done anything like this before or has any ideas how it would be possible?
 
Here's some thoughts, maybe you will find them helpful in getting started...

The devices can't all be programmed at once per se, it is a serial bus and bit stream. They can however, be quickly programmed sequentially if your programming software is set up with each memory page ready to go, all devices then being programmed in one session, which shouldn't take more than a couple of seconds. You don't actually need to know each exact device location for verification, as each device has a unique 48bit serial number, so each device will respond only when it sees it's own address on the 1-wire bus. Verification of the programming cycle is straightforward. To determine exactly which socket on the programmer each device resides in, you would need 20 individual 1-wire data lines, or you could use three DS2408's to provide your ground return, for example, to each individual socket coupled with a bit of clever programming on a small micro to map each device to a particular socket. You could add another three DS2408's to control your Verification LED's also using the 1-wire bus if you wished :)
 
Thanks, this does help. So basically the DS2408 will be switching the grounds of each programmed device so that the 1-wire bus sees only one device at a time in the verification cycle. I'll see if I can do this, thanks for your help.
 
I would probably switch each individual ground using a DS2408 and map which device is sitting in which socket, initially. This also gives something in the way of an immediate indication if any are not making good contact or not responding to their initial call before programming begins. After that, I would know several key pieces of information, things like device socket position, unique serial numbers of each device and device identifiers etc needed for addressing. Armed with that information, I could now do something with the LED's using their DS2408's, like make them green for "ready" etc. I would then switch all the grounds on the programming sockets, read the device numbers again one last time and leave the sockets grounded until I had both programmed and verified each device. All the devices are bus powered, so you don't want to be interrupting them constantly. I may even add some more DS2408's to the mix so I could switch the LED's to red for "active" and only turn each of them green again after verification. That way, should any fail to program as expected, it would be immediately obvious. Either way, just do the switching of the grounds/ device socket identification once, then run the programming cycle.

The entire programmer, of course, could also be implemented using just a microcontroller and some buffers or programmable logic etc to achieve your 20 sockets, but I think it would be adding complication and cost to the circuitry that would be far easier to overcome/ implement in firmware. Also, if done in firmware, you only need to write code initially for 1 device to test out your theories, scaling it up later would be very easy to do. An added advantage is that you would also be using off the shelf, tried and tested devices with known characteristics perhaps avoiding timing issues etc.

If you make some progress with it, I'm sure the folks here would be interested in both seeing it and helping you further with it :)
 
Why do you want to gang program? To program one of these devices will take less than one second. In the time it takes to connect/disconnect 20 devices you could connect, program, verify and disconnect all 20 devices individually. Basically, connect, press button, wait for LED, disconnect.

Mike.
 
Why do you want to gang program? To program one of these devices will take less than one second. In the time it takes to connect/disconnect 20 devices you could connect, program, verify and disconnect all 20 devices individually. Basically, connect, press button, wait for LED, disconnect.

Mike.
As you disconnect/connect hundreds or thousands of parts the contact point of gang programmer may become less reliable and may need maintenance more frequently, plus who wants to do all that user interaction. But I understand your point, thanks.
 
This is a very quickly put together schematic for programming 8 devices and giving user feedback though LEDs. Some feedback on this will be great and I'll keep going with the rest. Also I will be using C# to program the devices
 

Attachments

  • 1WIRE GANG.pdf
    31.8 KB · Views: 240
Given the large number of devices envisioned, you will need to keep your pcb traces as short as possible and stout and do all you can to minimise parasitic capacitance on the bus. Also given the bus loading when the programmer is fully loaded with devices, you may run into trouble with simply providing sufficient power. To help get round that, have a look into using an active pullup arrangement at the master end. Last thing I can think of off hand, is poor impedance matching at your bus nodes, watch out for stray reflections on the bus causing timing errors. There are rules of thumb used by Dallas & Maxim as I remember, to help design a suitable bus driver, it might be worth having a good read through their app notes etc :)
 
The master I'll be using is the ds9097u so it already has an active pullup. One question I have is since I'm going to be switching the grounds of the EPROMs, using U2, should I add pull ups to the DEV1-DEV8 lines?
 
No, I wouldn't think it would be necessary, the active pull-up is designed to provide a stout supply to the bus in order to maintain power during periods where the data is majorly all zero's. You may need bus termination resistors fitted at the programming sockets however, to dampen any reflections, but this is pretty dependant on your board layout, wire length, device weights etc etc. There are some good application notes on the Dallas/ Maxim websites that can help take a lot of the guesswork out of it :)
 
I don't see the need for it, that's what the active pullup is for. Unless, of course, you are also planning on having a socket hanging on your programmer's existing bus to extend it out to a remote device using a long cable, in which case you will also need to think about a suitable driver for that cable and whatever is on the end of it, if you want to keep your timing within spec and keep control of the other factors involved such as reflections, power supply etc :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top