English
Language : 

IC-PMX Datasheet, PDF (20/27 Pages) IC-Haus GmbH – ENERGY HARVESTING MULTITURN COUNTER/ENCODER
iC-PMX
ENERGY HARVESTING MULTITURN COUNTER/ENCODER
FRAM ACCESS
Rev A3, Page 20/27
Read POS
iC-PMX reads the position data from the FRAM when-
ever the power supply voltage VCC is applied, and the
data is updated after each Wiegand pulse (if VCC is still
available). Opcode 0x30 is used to access iC-PMX’s
copy of the position data. The data is provided bytewise,
starting with address 0x0.
FRAM Access
iC-PMX has a feedthrough mode to allow direct access
to the FRAM. iC-PMX gives exclusive access to the
FRAM once the feedthrough mode is activated. FRAM
access is delayed if iC-PMX is using the FRAM when
the feedthrough mode is activated. Pin RDY signals
that the feedthrough mode was activated. It is pulled
low after iC-PMX finished the internal FRAM communi-
cation.
In feedthrough mode the data at NCS, SCK and MOSI
is used to drive NCSR, SCKR and MOSIR, the data at
MISOR is sampled with an internal clock and those val-
ues are used to drive MISO. The data is not interpreted
in iC-PMX.
iC-PMX reads the position data from the FRAM when
the feedthrough mode is deactivated. It is the cus-
tomer’s responsibility to ensure that the Wiegand pulse
processing is not disturbed.
The feedthrough mode is activated if TEST2 is pro-
grammed with 0x80 and pin SH is high. Pin SH must
be set to low to disable the feedthrough mode.
Calculation of the CRC-Values
The FRAM data in Gas Gauge Mode and in Period
Counter Mode with standard FRAM is secured with a
CRC:
• Start value 0x1
• CRCpolynom (CRC-4): x4 + x + 1
• The CRC value is saved inverted if a former CRC
error is detected
Example of CRC Calculation Routine
/ / Data i s an array of the i n p u t data
/ / Example :
/ / Data [ 0 ] = B i t 0 of Addr 0x0 ,
/ / Data [ 7 ] = B i t 7 of Addr 0x0 ,
/ / DATA [ 8 ] = B i t 0 o f ADR( 0 x01 ) , . . .
int iCRCPoly = 0x13 ;
int i = 0;
unsigned char ucCRC=1; / / s t a r t v a l u e ! ! !
f o r ( i =0; i <=ucIMAX ; i ++) {
i f ( ( ucCRC >> 3 ) ! = Data ( i ) )
ucCRC = ( ( ucCRC << 1 ) ^ iCRCPoly ) & 0 x 0 f ;
else
ucCRC = (ucCRC << 1 ) & 0 x 0 f ;
}
/ / Result :
/ / CRC[ 3 ] = ucCRC & 0x01 ;
/ / CRC[ 2 ] = (ucCRC >> 1 ) & 0x01 ;
/ / CRC[ 1 ] = (ucCRC >> 2 ) & 0x01 ;
/ / CRC[ 0 ] = (ucCRC >> 3 ) & 0x01 ;
Programming Sequence:
1. Set pin SH to ’0’
2. Send opcode 0x24 and parameter 0x80
(TEST2 := 0x80)
3. Set pin SH to ’1’
4. Wait for pin RDY=’0’
5. Wait for tpu(NCSR)
6. Do the data exchange with the FRAM.
(The MISO Pin of the FRAM is sampled with an
internal Clock of at least 7.5 MHz. Please take
the resulting added latency into account during
read accesses to the FRAM.)
7. Set pin SH to ’0’
8. Wait for pin RDY=’1’
9. Send opcode 0x24 and parameter 0x00
(TEST2 := 0x00)