Component: EEPROM (DS28E07) (Storage)

From Flowcode Help
Jump to navigationJump to search


Author MatrixTSL
Version 1.0 (Release)
Category Storage


Image EEPROM (DS28E07) component

A rugged EEPROM allowing one or more devices to be addressed and accessed. Requires a One Wire component to perform the bus operations.

Examples

No additional examples


Downloadable macro reference

SetString

Writes a string to the EE memory starting at the selected address.

All bytes from the string will be written including the null termination.

Parameters

UINT Address
Address of the value to write
<- STRING Value
Data string to write
This parameter may be returned back to the caller


Return value

This call does not return a value


GetString

Gets a string from the specified start address.

Parameters

UINT Address
Address of the first data byte
BYTE MaxLength
Maximum number of bytes in the string, also includes null termination byte


Return value

STRING


SetByteArray

Writes an array of bytes to the EE memory.

Parameters

UINT Address
Starting address of the first value to write
BYTE Data
BYTE Count
Number of bytes to write to the EE memory, Range: 1 to 128 bytes


Return value

This call does not return a value


SetInt

Writes a 16-bit value to the EE memory.

For consecutive 16-bit values the address must be incremented by 2.

Parameters

UINT Address
Address of the value to write
UINT Value
16-bit value to write
BOOL MSBFirst
0: LSB is the first byte, 1: MSB is the first byte


Return value

This call does not return a value


AddressSpecificDevice

Starts a temperature conversion on a specific device using a hex string identifier.

SerialNumber parameter should be 12 characters and contain the 48-bit Serial.

Parameters

<- STRING SerialNumber
48-bit Serial Number e.g. "32DF4A3C1901"
This parameter may be returned back to the caller


Return value

This call does not return a value


AddressNextDevice

Scans for the next connected device with a matching family code.

Goes through the device list generated by the ScanBus macro.

Parameters

This macro has no parameters


Return value

This call does not return a value


GetSerialString

Gets the Serial String for the current addressed device.

Parameters

This macro has no parameters


Return value

STRING


SetLong

Writes a 32-bit value to the EE memory.

For consecutive 32-bit values the address must be incremented by 4.

Parameters

UINT Address
Address of the value to write
ULONG Value
32-bit value to write
BOOL MSBFirst
0: LSB is the first byte, 1: MSB is the first byte


Return value

This call does not return a value


GetFloat

Reads a 32-bit floating point value starting from the specified byte address.

For consecutive float values the address must be incremented by 4.

Parameters

INT Address
The starting byte address
BOOL MSBFirst
0: LSB is the first byte, 1: MSB is the first byte


Return value

FLOAT


GetLong

Reads a 32-bit value starting from the specified byte address.

For consecutive 32-bit values the address must be incremented by 4.

Parameters

INT Address
The starting byte address
BOOL MSBFirst
0: LSB is the first byte, 1: MSB is the first byte


Return value

ULONG


GetInt

Reads a 16-bit value starting from the specified byte address.

For consecutive 16-bit values the address must be incremented by 2.

Parameters

INT Address
The starting byte address
BOOL MSBFirst
0: LSB is the first byte, 1: MSB is the first byte


Return value

UINT


GetByteArray

Reads an array of bytes starting from the selected address.

Parameters

UINT Address
Starting address of the first value to read
BYTE Data
Byte array to store incoming data
UINT Count
Number of bytes to read from the EE memory, Range: 1 to 128 bytes


Return value

This call does not return a value


SetByte

Writes a single byte to the EE memory.

Parameters

UINT Address
Address of the value to write
BYTE Data


Return value

This call does not return a value


GetByte

Reads a single byte from the selected address.

Parameters

UINT Address
Address of the value to read


Return value

BYTE


SetFloat

Writes a 32-bit floating point value to the EE memory.

For consecutive float values the address must be incremented by 4.

Parameters

UINT Address
Address of the value to write
FLOAT Value
Floating point value to write
BOOL MSBFirst
0: LSB is the first byte, 1: MSB is the first byte


Return value

This call does not return a value


Initialise

Configures each matching sensor on the bus with the specified conversion bits.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

One Wire Component

This property is of type Fixed list of ints and can be referenced with the variable name OneWireComp.

Link to the one wire component to host the bus.

EEPROM Size (Bytes)

This property is of type Unsigned integer and can be referenced with the variable name EESize.

The number of bytes of memory available on the device.

Simulate Comms

This property is of type True or false and can be referenced with the variable name SimComms.

No - We use the panel GUI to perform the simulation.

Yes - We use OneWire comms via an API to communicate with real hardware.

Number EE Devices

This property is of type Fixed list of ints and can be referenced with the variable name NumSensors.

Sens the number of sensors we can communicate with during simulation

Serial 0

This property is of type Line of text and can be referenced with the variable name Serial0.

Serial number for simulated one wire device