This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

1 wire eeprom / random number generator

looking to use the Hercules in an automotive safety app.

Wanted the device to be able to read/write to a 1 wire eeprom..(per customer spec)...as a key

So..

One Hercules (on a remote system) would generate a random number when the 1-wire is connected...write the number to the device...store that number

the device would then be moved to another Hercules (on other remote control system).  the Hercules would read the device then send that "key" ...the original Hercules then sees the key and knows they are legite and connected...

not sure if the device would have to be "bit banged", or maybe the spi module can handle it.  (haven't gone to deep into datasheets for Hercules).

(have used the TIVA before for other things...but not the Hercules)

doable?

thanks

  • Hi John,
    What method did you use on TIVA?

    I'm not an expert with the 1 wire eeprom. I think you will need to use the bit-bang method with the open-drained capability using the GIO module. You will bit bang the GIO pin to create the reset pulse, write-1 and write-0 pulses. The Hercules GIO pin can be configured for open drained mode.
  • I did not understand, your question!
    you want to use an external EEPROM memory and connect it to Hercules?
  • Yes,

    A one wire eeprom.

    A customer wants to use a 1 wire eeprom device as a "key" fob.

    So

    1) a user would install this device with the 1 wire eeprom in it.
    2)  The Hercules would see the device has been plugged in

    3) the Hercules would generate a random number (I believe this should be possible with the Hercules....simple code?)

    4) the Hercules would then program the 1 wire eeprom with this random number.

    so...the question is:

    is it a simple task to run the 1 wire eeprom on the Hercules?  (using a SPI module)...

    or

    would I have to bit bang the Hercules.

  • Hi John,
    As I mentioned I think you need to use bit-bang. SPI interface requires the CLK pin. Perhaps you are thinking leaving the SPICLK open and only connects the SPISIMO pin to the 1 wire eeprom. But we can guarantee the state of the SPISIMO pin when the clock is not active. A low SPISIMO would have created a reset to the 1 wire eeprom.
  • If you are referring to the Maxim 1-Wire Protocol, there is no built in support for this protocol on Hercules devices. The open-drain feature of the I/O pins on the Hercules devices allow for easy implementation of a bit-banged solution. Another solution would be to use an I2C to 1-Wire bridge from Maxim.