Scratchpad Memory Quick Start Guide

Store and Retrieve Non-Volatile Memory

Introduction

Scratchpad Memory allows you to store and retrieve up to 8 bytes of data in a non-volatile EEPROM memory within the NCD device.  Scratchpad Memory may be used for anything.  The memory contents have no effect of the controller.  You can use scratchpad memory to store important variables or use this memory to test for the existence of a particular controller.

NCD Base Station Software

Use NCD Base Station Software to store and retrieve non-volatile EEPROM memory within your device.

After connecting your device to the computer, run Base Station software.  Choose the COM or IP address of your favorite interface technology and click OK.

Select ‘Scratchpad Memory Command Set’ from the dialog box as shown below.

NOTE: Scratchpad Memory is not a feature of all NCD devices.  Scratchpad Memory will only be shown if your controller supports the Scratchpad memory command set.

Device Memory Features

  1. Numeric Byte Values from 0 to 255 may be stored in each green box below.
  2. Reads Scratchpad memory from the controller.
  3. Communication details.  This section is shown when MORE option is selected in section 6 of diagram.
  4. Use this button to put the device in Configuration Mode BEFORE Storing Data in memory.  Device must be in configuration mode before storing your parameters.
  5. Use this button to store data in non-volatile memory while the device is in configuration mode.  The controller may be powered down for extended periods of time, you byte values will retain in memory.  Storing in excess of 100,000 times will damage the EEPROM memory.  Memory storage should be periodic for longest possible life.
  6. MORE or LESS. MORE option expands the window to include section C in diagram.  LESS option shrinks the window to exclude section 3.

Configuration Mode:

You receive the dialog box shown below when clicking button ‘C’ on previous page.

  1. Displays the current operating mode of the controller.  Device must be in Configuration Mode for proper storage. Device may be in Configuration or Run Mode during a EEPROM memory read function.
  2. Click this button to put the controller in Configuration Mode prior to storing data in EEPROM memory.
  3. Communications Details. Shown when the MORE option is section D in the diagram is selected.
  4. MORE or LESS. MORE option expands the window to include Section C of diagram.  LESS option shrinks the window to exclude section C.
  5. Click this button to return the controller to Run Mode.

Scratchpad Memory allows you to store and retrieve up to 8 bytes of data in a non-volatile EEPROM memory within the NCD device.  Scratchpad Memory may be used for anything.  The memory contents have no effect on the controller.  You can use scratchpad memory to store important variable or use this memory to test for the existence of a particular controller.

Storing data in EEPROM Memory requires the device to be in configuration mode.  However, this may be changed if you disable EEPROM Write protection using Device Configuration.  Go to Device Configuration, EEPROM Write Protection, and use the pull down menu to select the first or second option in the list.  This will allow EEPROM to be stored in RUN mode.  Please note, write commands will appear to work properly even if the device is write protected; however, data will not actually be stored.

EEPROM Commands

Read a Single Byte from EEPROM

This command reads a single data byte from non-volatile EEPROM Memory and reports the contents as a value from 0 to 255.

Send Bytes: Byte 1, Byte 2, Byte 3

Function: Header, Command, Location

Decimal Values: 254, 51, 1-8

Hex Values: 0xFE, 0x33, 0x01-0x08

Receive Byte:

Decimal: 0-255

Hex: 0x00-0xFF

Write a Single Byte in EEPROM

This command stores a single byte of data in non-volatile EEPROM Memory.  This command requires two parameters.  The first parameter is the memory location, and has a valid range of 1 to 8.  The second parameter contains the data byte to be stored in memory, and has a valid range of 0-255.   Do NOT Exceed 100,000 Write operations or the EEPROM memory will be damaged.

Send Bytes: Byte 1, Byte 2, Byte 3, Byte 4

Function: Header, Command, Location, Data

Decimal Values: 254, 51, 1-8, 0-255

Hex Values: 0xFE, 0x33, 0x01-0x08, 0x00-0xFF

Receive Byte:

Decimal: 85

Hex: 0x55