Electronic Components Datasheet Search
  English  ▼

X  

KMA310 Datasheet(PDF) 45 Page - NXP Semiconductors

Part # KMA310
Description  Programmable angle sensor IC
PDF  71 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  NXP [NXP Semiconductors]
Direct Link  http://www.nxp.com
Logo NXP - NXP Semiconductors

KMA310 Datasheet(HTML) 45 Page - NXP Semiconductors

Back Button KMA310 Datasheet HTML 41Page - NXP Semiconductors KMA310 Datasheet HTML 42Page - NXP Semiconductors KMA310 Datasheet HTML 43Page - NXP Semiconductors KMA310 Datasheet HTML 44Page - NXP Semiconductors KMA310 Datasheet HTML 45Page - NXP Semiconductors KMA310 Datasheet HTML 46Page - NXP Semiconductors KMA310 Datasheet HTML 47Page - NXP Semiconductors KMA310 Datasheet HTML 48Page - NXP Semiconductors KMA310 Datasheet HTML 49Page - NXP Semiconductors Next Button
Zoom Inzoom in Zoom Outzoom out
 45 / 71 page
background image
NXP Semiconductors
KMA310
Programmable angle sensor IC
KMA310
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2019. All rights reserved.
Product data sheet
Rev. 3 — 27 February 2019
45 / 71
16.4.1 Software example in C++
#include "stdafx.h"
#include "conio.h"
unsigned int calculate_crc(unsigned int crc, unsigned int
data_word)
{
const unsigned int gpoly = 0x107;
// generator polynomial
for (int i = 15; i >= 0; i--)
{
crc <<= 1;
crc |= (int) ((data_word & (1u<<i))>>i);
if (crc & 0x0100) crc ^= gpoly;
}
return crc;
}
int main(void)
{
unsigned int crc;
// data sequence of customer area 1
unsigned int data_word[] = {0x0000, 0x0100, 0x1300, 0x1000,
0x1FFE, 0xFFFF, 0x1200, 0x0000, 0x0099, 0x0F89, 0x80FA,
0x00BE};
// seed value
crc = 0xAA;
printf("Seed value\n0x%02X\n\n", crc);
// number of registers
unsigned int N = sizeof(data_word)/sizeof(unsigned int);
// 8 LSBs are reserved for checksum and must be filled with 0
data_word[N - 1] = data_word[N - 1] & 0xFF00;
// calculate checksum over all addresses
printf("Address\t\tValue\n");
for (unsigned int i = 0; i <= N - 1; i++)
{
printf("0x%02X\t\t0x%04X\n", i, data_word[i]);
crc = calculate_crc(crc, data_word[i]);
}
printf("\nChecksum for customer area 1\n0x%02X", crc);
_getch();
return 0;
}
The checksum of this data sequence is B3h.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com