Extended MaximInterface

Dependents:   mbed_DS28EC20_GPIO

Embed: (wiki syntax)

« Back to documentation index

DS2431 Class Reference

DS2431 Class Reference

DS2431 1024-bit 1-Wire EEPROM. More...

#include <DS2431.hpp>

Public Member Functions

MaximInterface_EXPORT error_code readMemory (Address beginAddress, span< uint_least8_t > data) const
 Reads block of data from EEPROM memory.
MaximInterface_EXPORT error_code writeScratchpad (Address targetAddress, Scratchpad::const_span data)
 Writes 8 bytes to the scratchpad.
MaximInterface_EXPORT error_code readScratchpad (Scratchpad::span data, uint_least8_t &esByte)
 Reads contents of scratchpad.
MaximInterface_EXPORT error_code copyScratchpad (Address targetAddress, uint_least8_t esByte)
 Copies contents of scratchpad to EEPROM.

Detailed Description

DS2431 1024-bit 1-Wire EEPROM.

The DS2431 is a 1024-bit, 1-Wire® EEPROM chip organized as four memory pages of 256 bits each. Data is written to an 8-byte scratchpad, verified, and then copied to the EEPROM memory. As a special feature, the four memory pages can individually be write protected or put in EPROM-emulation mode, where bits can only be changed from a 1 to a 0 state. The DS2431 communicates over the single-conductor 1-Wire bus. The communication follows the standard 1-Wire protocol. Each device has its own unalterable and unique 64-bit ROM registration number that is factory lasered into the chip. The registration number is used to address the device in a multidrop, 1-Wire net environment.

Definition at line 55 of file DS2431.hpp.


Member Function Documentation

error_code copyScratchpad ( Address  targetAddress,
uint_least8_t  esByte 
)

Copies contents of scratchpad to EEPROM.

Parameters:
[in]targetAddressEEPROM memory address that scratchpad will be copied to. Must be on row boundary.
[in]esByteE/S byte from preceding Read Scratchpad command.

Definition at line 128 of file DS2431.cpp.

error_code readMemory ( Address  beginAddress,
span< uint_least8_t >  data 
) const

Reads block of data from EEPROM memory.

Parameters:
[in]beginAddressEEPROM memory address to start reading from.
[out]dataEEPROM data read from the device.

Definition at line 56 of file DS2431.cpp.

error_code readScratchpad ( Scratchpad::span  data,
uint_least8_t &  esByte 
)

Reads contents of scratchpad.

Parameters:
[out]dataData read from scratchpad.
[out]esByteE/S byte read before scratchpad data.

Definition at line 95 of file DS2431.cpp.

error_code writeScratchpad ( Address  targetAddress,
Scratchpad::const_span  data 
)

Writes 8 bytes to the scratchpad.

Parameters:
[in]targetAddressEEPROM memory address that this data will be copied to. Must be on row boundary.
[in]dataData to write to scratchpad.

Definition at line 71 of file DS2431.cpp.