FM6124-QG Ramtron, FM6124-QG Datasheet - Page 39

FRAM, 24KB, EVENT DATA REC, QFP44

FM6124-QG

Manufacturer Part Number
FM6124-QG
Description
FRAM, 24KB, EVENT DATA REC, QFP44
Manufacturer
Ramtron
Datasheet

Specifications of FM6124-QG

Memory Size
24KB
Nvram Features
RTC
Supply Voltage Range
3V To 3.6V
Memory Case Style
QFP
No. Of Pins
44
Operating Temperature Range
-40°C To +85°C
Package / Case
QFP
Interface
I2C
Memory
RoHS Compliant
Interface Type
I2C, Serial, 2-Wire
Rohs Compliant
Yes
Access Time
100 KBPs
Operating Supply Voltage
3 V to 3.6 V
Mounting Style
SMD/SMT
Lead Free Status / Rohs Status
 Details

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
FM6124-QG
Manufacturer:
ABOV
Quantity:
3 000
////////////////////////////////////////////////////////////////////////////////
// Function:
// Description:
// Parameters:
// Return value:
// Remarks:
//
//
//
////////////////////////////////////////////////////////////////////////////////
int
main()
{
Rev. 4.0 (EOL)
July 2010
__idata ruint8
__idata ruint16
__xdata struct SBCDDate l_oRTCValue;
__xdata struct SEvent
__xdata ruint8*
/////////////
// INIT Phase
// Initialize I2C interface, making sure FM6124 is responding.
InitI2C();
// Reset RTC to a defined value
l_oRTCValue.uiSeconds
l_oRTCValue.uiMinutes
l_oRTCValue.uiHours
l_oRTCValue.uiDay
l_oRTCValue.uiDate
l_oRTCValue.uiMonth
l_oRTCValue.uiYear
FM6124WriteRTC(&l_oRTCValue);
// Configure Event Buffer to 1000 Events
FM6124WriteReg(EDR_REG_BUFFER_CTRL, EDR_BC_CMD_EB_SIZE | EDR_BC_VAR_3000_EVENTS);
Delay(1);
FM6124WriteReg(EDR_REG_BUFFER_CTRL, EDR_BC_CMD_EB_SIZE | EDR_BC_VAR_1000_EVENTS);
// Make sure FM6124 has enough time to setup the new Event Buffer (100us required)
Delay(1);
///////////////////
// F-RAM Write/Read
// Write a Byte into the F-RAM at address 0x0000
FM6124WriteFRAM(0x0000, 0xBD);
// Read a Byte of Data in the F-RAM at address 0x0000
l_uiDataByte = FM6124ReadFRAM(0x0000);
////////////////
// Create Events
// Enable Event Recording of Digital Input 4-11 (Rising Edges)
FM6124WriteReg(EDR_REG_PIN_RF_B, 0xFF);
FM6124WriteReg(EDR_REG_PIN_EE_B, 0xFF);
// Make sure FM6124 has enough time to enable Event Recording (100us required)
Delay(1);
// Disable Event Recording
FM6124WriteReg(EDR_REG_PIN_EE_B, 0x00);
//////////////
// Read Events
// Read Number of Events (Number of Events between RP and WP)
FM6124WriteReg(EDR_REG_PIN_SNAP, 0x02);
l_uiNbEvents = FM6124ReadReg(EDR_REG_EVENT_COUNT_MSB);
l_uiNbEvents <<= 8;
l_uiNbEvents |= FM6124ReadReg(EDR_REG_EVENT_COUNT_LSB);
// Read newest event:
// 1- Move RP to the last event
FM6124WriteReg(EDR_REG_BUFFER_CTRL, EDR_BC_CMD_LAST);
// 2- Read Event
FM6124ReadEventAtRP(&l_oEvent);
main
main function of the program
None
int: Error Code
For the purpose of this example, the return values
of functions are not verified. In a real application,
return values should be verified in order to make sure that
any all operations have completed successfully.
l_uiDataByte
l_uiNbEvents
l_oEvent;
l_puiEvents
= 0x00;
= 0x01;
= 0x02;
= 0x03;
= 0x10;
= 0x09;
= 0x07;
= 0x00;
= 0x0000;
= NULL;
Page 39 of 53

Related parts for FM6124-QG