Home arrow Support arrow Forums

Luminary Micro Forums

<< Start < Prev 1 2 Next > End >>

antera

Fresh Boarder
Click here to see the profile of this user

2008/09/02 07:05

1 Wire Bus support

For every ethernet device one needs a unique and legal MAC address. These are only available in blocks of 4096, hence for small production runs or for prototypes, it is not necessarily that easy to assign proper legal MAC addresses. Maxim Semiconductors manufactures a 1-Wire device which addresses this problem. The DS2502-E48+ provides a unique and legal MAC address which can be read via a 1-Wire bus. This solves the legal and logistics problem of getting and assigning a correct MAC address for each PCB. Software can read the DS2502 and setup the ethernet MAC using this address. It is however non trivial to communicate using the Dallas 1-Wire bus if one do not want to disable interrupts while doing this. An app note that provides good quality library code to communicate via the Dallas 1-Wire bus without having to disable interrupts would be very useful. It would also demonstrate the flexibility of the Luminary MCUs. In projects where I have seen the 1-wire devices used, the comms are always bit-banged, and interrupts has to be disabled during each transaction. Having a good quality 1-wire bus library would make a host of possibilities available using Luminary MCUs in conjunction with 1-wire and i-Button devices.

login or register to reply

cb1

Platinum Boarder
Click here to see the profile of this user

2008/09/02 08:09

Re:1 Wire Bus support

Antera-

Beautifully written - suspect that this will enter LMI's "future" list.

The merits of the 1-Wire do not include speed. Not only must we accept/handle interrupts - we must track where we are in our 1-Wire process AND the specific timed sequence.

Your suggestion reinforces our need to write short, fast interrupt handlers. Our ability to write these in C becomes a mixed blessing - these likely will execute more slowly. Different interrupts may occur and we may encounter nested ones as well. (this is starting to get complicated)

It's becoming clearer "why" other aps have "shut down" the IRQs. And the merits of clocked (SPI, I2C) become apparent...

login or register to reply

awneil

Expert Boarder
Click here to see the profile of this user

2008/09/02 15:05

Re:1 Wire Bus support

... interrupts has to be disabled during each transaction.
That depends on what you mean by "transaction"...

The timing within a bit on the 1-Wire bus is critical, but the timing between bits is entirely unrestricted.

login or register to reply

cb1

Platinum Boarder
Click here to see the profile of this user

2008/09/02 19:01

Re:1 Wire Bus support

Good point - however disabling interrupts IS disabling interrupts.

What does Antera think about your suggestion?

login or register to reply

tomlah

Fresh Boarder
Click here to see the profile of this user

2008/09/16 03:08

Re:1 Wire Bus support

Until then, you can use I2C to 1Wire converter DS2482-100. At additional cost...

login or register to reply

antera

Fresh Boarder
Click here to see the profile of this user

2008/09/26 06:13

Re:1 Wire Bus support

cb1 wrote:
Good point - however disabling interrupts IS disabling interrupts.

What does Antera think about your suggestion?


Only having to keep the bit reads and writes atomic helps, but in some applications switching interrupts off for even 50 micro seconds is problematic. One can use the UART to generate 1 wire signals, but that wastes 2 pins plus the UART. I have looked a bit at using the SPI hardware to generate the one wire bit transactions. This looks feasable as well, but one has to use 2 pins again. It would be nice to have enough hardware support to do the bit read and writes using only one I/O pin.

Regards
Anton

login or register to reply
<< Start < Prev 1 2 Next > End >>