FM6124 Ramtron Corporation, FM6124 Datasheet - Page 38

no-image

FM6124

Manufacturer Part Number
FM6124
Description
Event Data Recorder With F-ram
Manufacturer
Ramtron Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
FM6124
Manufacturer:
FM/富满电子
Quantity:
20 000
Part Number:
FM6124-QG
Manufacturer:
ABOV
Quantity:
3 000
FM6124 Interface Code Example
The following C code provides an example of basic interface to the FM6124 using Ramtron’s High Performance
VRS51L2070 (8051-based) MCU.
////////////////////////////////////////////////////////////////////////////////
//
// $Date: 2008-03-10 13:04:43 -0400 (Mon, 10 Mar 2008) $
// $Rev: 250 $
// $Author: smalo $
// $fm6124_basic_example_vrs2070.c $
//
////////////////////////////////////////////////////////////////////////////////
//
// Description: This file contains code examples for a
//
//
//
//
//
// Remarks:
//
//
//
// Copyright (C) 2008 Ramtron International Corporation
//
////////////////////////////////////////////////////////////////////////////////
#include <malloc.h>
#include "VRS51L2070_SDCC.h"
#include "fm6124.h"
////////////////////////////////////////////////////////////////////////////////
// Function Prototypes
////////////////////////////////////////////////////////////////////////////////
// I2C Init functions
void
rbool
// FM6124 Access functions
ruint8
rbool
rbool
ruint8
rbool
rbool
rbool
// Utility functions
void
rbool
////////////////////////////////////////////////////////////////////////////////
// Global variables
////////////////////////////////////////////////////////////////////////////////
// Fix device selection bits (A0 and A1) to 1.
// These are bits 2:1 of the first byte of an I2C transaction.
const ruint8 g_uiI2CDevSelect = 0x03 << 1;
Rev. 4.0 (EOL)
July 2010
InitI2C();
IsI2CSlaveReady(ruint8 a_uiSlaveId);
FM6124ReadReg(ruint8 a_uiRegAddr);
FM6124WriteReg(ruint8 a_uiRegAddr, ruint8 a_uiRegValue);
FM6124WriteRTC(struct SBCDDate *a_poDate);
FM6124ReadFRAM(ruint16 a_uiFramAddr);
FM6124WriteFRAM(ruint16 a_uiFramAddr, ruint8 a_uiValue);
FM6124ReadEventAtRP(struct SEvent *a_poEvent);
FM6124StreamEventsAtRP(ruint8* a_puiEvents, ruint8 a_uiNbEvents);
Delay(ruint16 a_uiDelayMs);
CreateEventsP5(ruint16 a_uiNbEvents);
Host MCU (Ramtron VRS51L2070) communicating with an
Event Data Recorder (Ramtron FM6124 EDR).
The host MCU is connected to the FM6124 with an I2C interface.
The compiler used for this example is SDCC 2.7.0
For the purpose of this example, the device selection bits
of the FM6124 (A0 and A1) are fixed to 1.
See global variable "g_uiI2CDevSelect".
// VRS51L2070 registers definitions
// FM6124 registers definitions
Page 38 of 53

Related parts for FM6124