OM13013,598 NXP Semiconductors, OM13013,598 Datasheet - Page 353

no-image

OM13013,598

Manufacturer Part Number
OM13013,598
Description
BOARD DEMO IAR LPC1227 JLINKLITE
Manufacturer
NXP Semiconductors
Series
-r
Datasheets

Specifications of OM13013,598

Design Resources
LPC122x-SK Brd Schematic
Processor To Be Evaluated
LPC1227
Processor Series
LPC122x
Data Bus Width
32 bit
Interface Type
UART, SSP, SPI, I2C
Cpu Core
ARM Cortex-M0
Maximum Operating Temperature
+ 85 C
Minimum Operating Temperature
- 40 C
Operating Supply Voltage
3 V to 3.6 V
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
568-6885
NXP Semiconductors
23.4 Examples
UM10441
User manual
23.4.1 Initialization
23.4.2 Signed division
23.4.3 Unsigned division with remainder
The example C-code listing below shows how to initialize the API’s ROM table pointer.
/* Declare table pointer */
LPC_ROM_DIV_STRUCT const* pDivROM;
/* Assign pointer to table */
pDivROM = *((LPC_ROM_DIV_STRUCT**)LPC_122x_DIVROM_LOC);
The example C-code listing below shows how to perform a signed integer division via the
ROM API.
/* Divide (-99) by (+6) */
int32_t result;
result = pDivROM->sidiv(-99, 6);
/* result now containts (-16) */
The example C-code listing below shows how to perform an unsigned integer division with
remainder via the ROM API.
/* Modulus Divide (+99) by (+4) */
uidiv_return result;
result = pDivROM-> uidivmod (-99, 6);
/* result.quot containts (+24) */
/* result.rem containts (+3) */
All information provided in this document is subject to legal disclaimers.
Rev. 1 — 15 February 2011
Chapter 23: LPC122x Integer division routines
UM10441
© NXP B.V. 2011. All rights reserved.
353 of 442

Related parts for OM13013,598