Using Eeprom; Reading Value From Eeprom; Writing Value To Eeprom - Diamond Systems ELEKTRA FD-64 User Manual

High integration cpu with ethernet and data acquisition
Table of Contents

Advertisement

16.2 Using EEPROM

There is an EEPROM used to store all TrimDAC adjustment values. These values are loaded on
reset or power-up, so it is critical that these values be correct in order to maintain accurate A/D
measurements. These settings are configured to defaults during manufacturing test – be sure
that you know what you are doing before changing these settings.
The EEPROM provides 256 bytes of non-volatile storage. The first 128 (addresses 00-0x7F)
bytes are reserved for Auto Calibration settings and should not be overwritten. The last 128 bytes
are available for user-accessible non-volatile storage.
Note that access to EEPROM data can be handled through the DSCUD software utilities.
Remember that bytes 0-127 are reserved for system use (TrimDAC autocal values); altering
those values will adversely affect system calibration.

16.2.1 READING VALUE FROM EEPROM

Example : read one byte from EEPROM location 128:
outp(base+3, 0x10);
outp(base+15, 0xA5); // unlock EEPROM
outp(base+13,0x80);
outp(base+14, 0xC0); // Initiate transfer, set to read
while (inp(base+14) & 0x20);
Data = inpb(base+12); // data returned from EEPROM access
outp(base+3, 0x0x00);
TrimDAC)
NOTE: This code does not take into consideration SCANEN and G0, G1 bits at base+3.

16.2.2 WRITING VALUE TO EEPROM

Example : write one byte (value = 0xaa) to EEPROM location 254, then verify the data:
outp(base+3, 0x10);
outp(base+15, 0xA5); // unlock EEPROM
outp(base+13,0xFE);
outp(base+12, 0xAA); // Set data to write to EEPROM
outp(base+14, 0x80); // Initiate transfer, set to write
while (inp(base+14) & 0x20);
outp(base+15, 0xA5); // unlock EEPROM
outp(base +13,0xFE); // set address location to 254 (0xFE)
outp(base+14, 0xC0); // Initiate transfer, set to read
while (inp(base+14) & 0x20);
Data = inpb(base+12); // data returned from EEPROM access; data should be 0xAA
outp(base+3, 0x00);
NOTE: This code does not take into consideration SCANEN and G0, G1 bits at base+3.
// set page to page 1
// set address location to 128 (0x80)
// Wait for EEPROM load to complete
// set page to page 0 (and re-enables lock on EEPROM /
// set page to page 1
// set address location to 254 (0xFE)
// Wait for EEPROM write to complete
// Wait for EEPROM load to complete
// set page to page 0 (and re-enables lock on EEPROM / TrimDAC)
Elektra CPU User Manual V1.00
Page 69

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ELEKTRA FD-64 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Elektra fd-32Elektra fd-128Elektra fd-96Elektra fd-256

Table of Contents