Title of Invention

A COMPUTER SYSTEM AND AN APPARATUS FOR USE IN A COMPUTER SYSTEM

Abstract \»7 ABSTRACT A computer system and an apparatus for use in a computer system A computer system for identifying a specific individual relative to said system using a biometric characteristic of said specific individual, comprising at least one apparatus. The apparatus includes a housing, a biometric sensor means for generating a first code and being mounted in said housing, and a controller means including a memory for storing the first code and a dynamic binary code conversion algorithm. The computer system includes a first database containing the dynamic binary code conversion algorithm. The controller means performs, when receiving a code from the biometric sensor means a comparison of the code with the first code stored in the memory and provided the comparison verifies the identity between the code and the first code, a generation of a first binary code by means of the dynamic binary code conversion algorithm and outputting the first binary code from said apparatus to the computer system, and the computer system generates, when receiving the first binary code, a second binary code by means of the dynamic binary code conversion algorithm and verifies the identity of the specific individual provided the second binary code matches the first binary code.
Full Text

The present invention relates to an apparatus for providing safe identification of an individual using biometric data. The apparatus may be used for secure and anonymous finandahransacHons^and may also function as digital signatures or password for secure IT systems.
High security data cards are known in the art and have been described in publications, such as WO 02/41236, US 6,592,044, while authentication of users using an electronic transaction system has been described in a publication such as US 6,594,759.
Within the technical field of the present invention, systems combining finger print and passwords for accessing or logging into IT systems are known. However, these systems are in some way dependant on external installations for performing its operation. For example storing a finger print on a smart card and inserting the smart card into a smart card reader connected to a computer further connected to a finger print sensor for verifying that the finger print stored on the smart card matches the finger print sensed by the finger print sensor.
Systems wherein the smart card has been replaced by a device such as a USB key or memory unit whereon a statistical code and a finger print is stored are known. By inserting the USB device into a computer further connected to a finger print sensor, a match between the finger print stored on the USB device and finger print registered by the finger print sensor enables the stored code to be displayed in a display included on the USB device.
Both of the above-mentioned examples includes splitting the authentication process Into two systems depending on each other in able to function, i.e. the smart card and the USB key are partly dependent on current from the external source and identical finger print recognition algorithms on the devices and the external computers. Disadvantages of these methods are that they are not mobile and accessible as the application is limited to rely on external installations having built-in

sensors and that the finger print recognition algorithm or at least the finger print algorithm used while digitising the fingerprints included in the smart card and the USB key is the same as the finger print recognition algorithm included in the external system. Furthermore, the code is stored on the device enabling hackers or thieves to obtain access to the code stored on the device, thereby exposing the user to theft or misuse of the identity of the individual owning the card.
Devices for identifying individuals using biometric input devices have been described in publications such as WO 2004/010372 and US 2003/0046228. All of the above-mentioned patent publications are hereby incorporated in the present specification by reference in their entirety and for all purposes.
An object of the present invention is to provide a safe and reliable verification of an individual by means of biometric data of said individual and in doing so to any substantial extent eliminating the disadvantages of the prior art techniques and methods.
The above object together with numerous advantages and features and further objects which will be evident from the beiow detailed description of the present invention are in accordance with a first aspect of the present invention obtained by means of a computer description for identifying a specific individual relative to said system using a biometric characteristic of said specific individual, comprising: i) at least one apparatus including:
- a housing defining an outer surface,
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual, said biometric sensor being mounted in said housing and being exposed at said outer surface,
- a controller means mounted in said housing and including a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,
- a first communication means mounted in said housing and electrically connected to and controlled by said controller means for establishing communication between said apparatus and said computer system,

- a power supply means electrically connected to said biometric sensor
means, said controller means, and said first communication means for the supply of
electric power thereto,
ii) said computer system including a first database containing said dynamic binary code conversion algorithm, and a second communication means for establishing communication between said computer system and said apparatus, iii) said controller means performing, when receiving a code from said biometric sensor means a comparison of said code with said first code stored in said memory and provided said comparison verifies the identity between said code and said first code a generation of a first binary code by means of said dynamic binary code conversion algorithm and outputting said first binary code from said apparatus by means of said first communication means to said computer system, and said computer system generating, when receiving said first binary code from said apparatus by means of said second communication means, a second binary code by means of said dynamic binary code conversion algorithm and verifying the identity of said specific individual provided said second binary code matches said first binary code.
Alternatively, the above object together with numerous advantages and features and
further objects which will be evident from the below detailed description of the
present invention are in accordance with a second aspect of the present invention is
obtained by means of a computer system for identifying a specific individual relative
to said system using a biometric characteristic of said specific individual,
comprising:
i) at least one apparatus including:
- a housing defining an outer surface,
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual, said biometric sensor being mounted in said housing and being exposed at said outer surface,
- a controller means mounted in said housing and including a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,

- a display means mounted in said housing and being exposed at said outer surface, said display means being electrically connected to and being controlled by said controller means,
- a power supply means electrically connected to said biometric sensor means, said controller means, and said display means for the supply of electric power thereto,
said computer system including a first database containing said dynamic binary code conversion algorithm, and a code input means,
said controller means performing, when receiving a code from said biometric sensor means a comparison of said code with said first code stored in said memory and provided said comparison verifies the identity between said code and said first code a generation of a first binary code by means of said dynamic binary code conversion algorithm and displaying said first binary code converted into an alphanumeric number, preferably a decimal number constituting a Pin code on said display means, and
said computer system generating, when receiving said Pin code input by means of said code input means, a second binary code by means of said dynamic binary code conversion algorithm and verifying the identity of said specific individual provided said second binary code matches said first binary code reconverted from said Pin code.
According to the basic teachings of the present invention, it has been realised that a safe and reliable recognition or identification of an individual based on a biometric characteristic of the individual is obtained provided the verification apparatus which may constitute a portable device such as a smart card or any other mobile or stationary apparatus and the computer system relative to which the identity of the individual is to be verified for verifying the authenticity of the individual in question, utilise one and the same dynamic binary code conversion algorithm for generating a code in the apparatus for transmission or input to the computer system and within the computer system for verifying the correct code and in doing so, verifying the identity or authenticity of the individual in question.

In the present context, the expression dynamic binary code conversion algorithm is a term defining any conversion algorithm which in the conversion of an input code into an output code provides a reproducible and unique conversion, which conversion, however, is altered each and every time the algorithm is used, however altered in a predictable manner as the algorithm itself includes the predictable and reproducible determination of the dynamic alteration or change. Below, examples of dynamic binary code conversion algorithms are described, however, the below examples are by no means to be considered complete and therefore, any conversion algorithm fulfilling the above requirements and definition is to be considered in the present context a dynamic binary code conversion algorithm.
In accordance with a first aspect of the present invention, the communication between the apparatus and the computer system may be established in accordance with any hardwire or wireless communication technique well known in the art per se, such a conventional parallel or serial unit and/or in a radio link, an infrared link, a capacitive coupling link, an induction loop link or any other contactless or wireless communication technique.
Similar to the communication means which may be implemented in accordance with any hardwire or wireless communication technique known in the art per se, the code input means may be constituted by any manually operated or automatized code input means such as a keyboard for the input of an alphanumeric number, a voice recognition based code input means aliowing the individual to input the alphanumeric number into which the first binary code has been converted by simply spelling the alphanumeric number to a microphone. A video detector for the detection of the digits presented on the display in visible presentation or in e.g. IR displaying may alternatively be used as the code input means.
In accordance with the presently preferred embodiment of the computer system according to a first aspect of the present invention, the apparatus further comprises a display means mounted in said housing and being exposed at said outer surface, said display means being electrically connected to said power supply means and said controller means and being controlled by said controller means, and being

powered by said power supply means, said display means displaying said first binary code converted into an alphanumeric number, preferably a decimal number constituting a Pin code after verification of identity between said code and said first code. Equivalent^, In accordance with the presently preferred embodiment of the computer system according to the second aspect of the present invention, the apparatus further includes a first communication means mounted in said housing and electrically connected to and controlled by said controller means for establishing communication between said apparatus and said computer system, and said computer system including a second communication means for establishing communication between said computer system and said apparatus.
As will be understood, the above described preferred embodiments of the computer system according to the first and the second aspect of the present invention are literally one and the same.
It is to be understood that the computer system according to the first and the second aspect of the present invention may be implemented for performing additional functions such as the transfer of information for the transfer of amounts from one bank account to another for the allowance of access to a specific area for allowing access to a particular computer database etc.
A particular application of the present invention relates to the unique and reproducible, yet dynamic generation of a verification Pin code or any other alphanumeric number, which number or Pin code is verifiable in the computer system.
The apparatus constituting an essential part of the invention, preferably in a plurality as the computer system serves to verify the identity of more than one individual such as the employees of an organisation or the customers of a bank, a credit organisation etc. may, as mentioned above, be implemented as a stand alone apparatus, preferably implemented as a credit card, having the dimensions of a credit card conforming to the ISO standards (International Organisation of Standardisation).

It is, however, to be understood that apart from a full size credit card conforming to the ISO standard, a double size or a half size or quarter size credit card may further be implemented or according to a specific requirement of the relevant, organisation such as the company issuing the card and running the computer system, the apparatus basically constituting a credit card or any other configurated apparatus may be shaped as a box, a shallow plate having a basically circular, rectangular, square, triangular or any other geometrical configuration.
Alternatively, the apparatus may be implemented as a terminal of a bank organisation, a personal computer connected to a biometric sensor module or any other stationary or portable apparatus. Provided the apparatus is implemented as a credit card, the credit card is advantageously, as will be described below, implemented having a total height of no more 1 mm as the technique verified by the production of the prototype embodiment described below as the presently preferred embodiment verifies the ability of miniaturising the apparatus into a bendable plastics body having the outer dimensions and the thickness of a conventional ISO standard credit card.
In the ISO standard card embodiment of the apparatus according to the present invention, power supply means may be implemented as a battery power supply unit, alternatively a solar cell, a mechanical or piezo cheramic based power generator. The biometric sensor means may be positioned at the same outer surface as the display means, which may be constituted as a plastics foil based multi-digit display or on the opposite side or surface of the credit card embodiment of the apparatus.
It is to be understood that the technique according to the present invention as defined in the above-described first and second aspects of the present invention is by no means based to a single biometric characteristic detection as more than one biometric characteristic may be detected and evaluated. In this contexts, it is to be understood that the term biometric characteristic is to be construed a generic term including and comprising any individual specific characterisitic based on the individuality of the individual such as a characteristic originally created by the unique

DNA of the individual. Examples of biometric sensor means are an iris scanner, a blood scanner, a DNA scanner, a voice identification scanner, a face recognition scanner and an array scanner for scanning the palm of the individual or according to the presently preferred embodiment of the computer system according to the first and the second aspect of the present invention implemented as an array scanner for scanning one whole finger or preferably a finger print of the individual.
The utilisation of the dynamic binary code conversion algorithm necessitates that the apparatus and the computer system are synchronised in the verification, else, the first binary code generated by the apparatus and transmitted or input by means of a code input means may not be verified by the computer system. An example of lack of synchronism between the apparatus and the computer system may occur in case the individual Intentionally or unintentionally causes the biometrical sensor means to generate said first code inevitably causing the controller means of the apparatus to generate the first binary code and in case no transmission or input of the first binary code to the computer system is established, the apparatus and the computer system are no longer in synchronism, as next time the apparatus performs a verification of the identity of the individual by the generation of the first binary code by means of the dynamic binary code conversion algorithm, the computer system at its end generates the second binary code conforming to and matching the first binary code previously generated by the apparatus as the individual intentionally or unintentionally caused the biometric sensor means to generate the first code.
In order to ensure that the apparatus and the computer system are always operated in synchronism, the computer system further includes, according to the presently preferred embodiment of the computer system according to the first and the second aspect of the present invention, a second database including a sequence of binary codes generated sequentially by means of said dynamic binary code conversion algorithm, and said computer system comparing said first binary code with said sequence of binary codes contained in said second database for verifying the identity of said specific individual provided said first binary code Is not matching said second binary code.

The transmission between the apparatus and the computer system may, due to the inherent tamper proof and copying safe verification due to the dynamic binary code conversion algorithm, be carried out without using any encryption and decryption. Furthermore, provided e.g. a wireless link, such as a GSM or satellite based communication link be used, the multiplicity of the information transmitted through the system inherently ensures safety and security. However, according to one embodiment of the computer system according to the first and the second aspect of the present invention, the system further comprises encryption and decryption means controlled by said controller means for performing said communication from said controller means to and from said external computer system in encrypted state according to e.g. DES encryption or other public or non-public encryption keys.
As mentioned above, the communication between the apparatus and the computer system may be carried out in accordance with any communication protocol and consequently, the first and the second communication means of the apparatus and the computer system, respectively, may be implemented as a parallel communication interface, a serial communication interface, an SPI, an I2C, an USB, a wireless communication interface such as blue tooth, an infra red or RF communication.
The above object together with together with numerous advantages and features and further objects which will be evident from the below detailed description of the present invention are in accordance with a third aspect of the present invention obtained by means of an apparatus for use in a computer system for identifying a specific individual relative to said system using a biometric characteristic of said specific individual, comprising:
- a housing defining an outer surface,
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual, said biometric sensor being mounted in said housing and being exposed at said outer surface,
- a controller means mounted in said housing and including a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,

- a first communication means mounted in said housing and electrically connected to and controlled by said controller means for establishing communication between said apparatus and said computer system,
- a power supply means electrically connected to said biometric sensor means, said controller means, and said first communication means for the supply of electric power thereto, and
- said controller means performing, when receiving a code from said biometric sensor means a comparison of said code with said first code stored in said memory and provided said comparison verifies the Identity between said code and said first code a generation of said first code into a first binary code by means of said dynamic binary code conversion algorithm and outputting said first binary code from said apparatus by means of said first communication means to said computer system.
Equivalent^, the above object together with together with numerous advantages and features and further objects which will be evident from the below detailed description of the present invention are in accordance with a fourth aspect of the present invention obtained by means of an apparatus for use in a computer system for identifying a specific individual relative to said system using a biometric characteristic of said specific individual, comprising:
- a housing defining an outer surface,
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual, said biometric sensor being mounted in said housing and being exposed at said outer surface,
- a controller means mounted in said housing and including a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,
- a display means mounted in said housing and being exposed at said outer surface, said display means being electrically connected to and being controlled by said controller means,
- a power supply means electrically connected to said biometric sensor means, said controller means, and said display means for the supply of electric power thereto, and

- said controller means performing, when receiving a code from said biometric sensor means a comparison of said code with said first code stored in said memory and provided said comparison verifies the identity between said code and said first code a generating a first binary code by means of said dynamic binary code conversion algorithm and displaying said first binary code converted into an alphanumeric number, preferably a decimal number constituting a Pin code on said display means.
The apparatuses according to the third and the fourth aspects of the present invention basically constitute a portable or stationary apparatus as discussed above constituting an element of the above described computer system according to the first and the second aspect of the present invention and therefore, no further discussion of the apparatuses according to the third and fourth aspects of the present invention are given.
The above object together with numerous advantages and features and further objects which will be evident from the below detailed description of the present invention are in accordance with a fifth aspect of the present invention obtained by a method of identifying a specific individual relative to a system using a biometric characteristic of said specific individual, comprising1, i) providing at least one apparatus including:
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual,
- a controller means including a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,
- a first communication means and electrically connected to and controlled by said controller means for establishing communication between said apparatus and said computer system,
- a power supply means electrically connected to said biometric sensor means, said controller means, and said first communication means for the supply of electric power thereto,

ii) said computer system including a first database containing said dynamic binary code conversion algorithm, and a second communication means for establishing communication between said computer system and said apparatus, iii) the method comprising:
- when receiving a code from said biometric sensor means performing a comparison of said code with said first code stored in said memory and provided said comparison verifies the identity between said code and said first code generating a first binary code by means of said dynamic binary code conversion algorithm and outputting said first binary code from said apparatus by means of said first communication means to said computer system, and
- said computer system, when receiving said first binary code from said apparatus by means of said second communication means, generating a second binary code by means of said dynamic binary code conversion algorithm and verifying the identity of said specific individual provided said second binary code matches said first binary code.
The above object together with numerous advantages and features and further objects which will be evident from the below detailed description of the present invention are in accordance with a sixth aspect of the present invention obtained by a method of identifying a specific individual relative to said system using a biometric characteristic of said specific individual, comprising: i) providing at least one apparatus including:
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual,
- a controller means and including a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,
- a display means being electrically connected to and being controlled by said controller means,
- a power supply means electrically connected to said biometric sensor means, said controller means, and said first communication means for the supply of electric power thereto,

ii) said computer system including a first database containing said dynamic binary code conversion algorithm, and a code input means, iii) the method comprising'.
- when receiving a code from said biometric sensor means performing a comparison of said code with said first code stored in said memory and provided said comparison verifies the identity between said code and said first code generating a first binary code by means of said dynamic binary code conversion algorithm and displaying said first binary code converted into an alphanumeric number, preferably a decimal number constituting a Pin code on said display means, and
- when receiving said first Pin code input by means of said code input means, generating a second binary code by means of said binary code conversion algorithm and verifying the identity of said specific individual provided said second binary code matches said first binary code reconverted from said Pin code.
The present invention is now to be described in greater detail with reference to the
drawings, in which:
Fig. 1 illustrates a smart card according to the present invention,
Fig. 2 is a schematic view of the components on the smart card in Fig. 1,
Fig. 3 - 6 is schematic views of the four layers of the printed circuits on the smart
card in Fig. 1,
Fig. 7 is an illustration of the communication between the card, the authentication
server and the application server,
Fig. 8 illustrates the initialisation and synchronisation process,
Fig. 9 illustrates a lay out of a card, and
Fig. 10 illustrates the card in block diagrammatic form.
Fig. 1 illustrates a smart card constituting the presently preferred embodiment of the apparatus according to the invention and embodied as a prototype embodiment. The smart card is designated the reference numeral 10. The smart card is based on IEC7810, card type 10-1 and IEC 10 436-1 defining the physical dimensions of the card. (ISO 7810:75(e)). In the presently preferred embodiment of the present invention, the card has a thickness of approximately 5mm. The overall dimensions

of the card is 85mm x 55mm x 4mm and is, as shown in Fig. 1 the card has a rectangular configuration.
However, embodiments, wherein the overall geometrical configuration being circular, elliptical, square, triangular, hexagonal, pentagonal or spherical, may be envisioned.
The card 10 includes a fingerprint sensor 12 for registering an individual's identity by means of fingerprint information. However, the sensor 12 may be replaced by any sensor for sensing biometric data for the verification of an individual's identity. Sensors of this type have been described in publications such as WO 02/074168 and WO 01/150660, both publications hereby incorporated in the present specification by reference in their entirety.
Also included in the card is a display designated the reference numeral 14. The display 14 is used for inputting information to the user, such as status information or Pin codes as will be described later.
The card 10 further includes a smart card interface 16 for interfacing to other systems.
When the card is first used, the card must be initialised, i.e. the card must be supplied with the reference fingerprint or other biometric data for correct identification of the card holder.
The initialisation process comprises the following steps:
1) Turning on the card.
2) The display 14 displays the message 'ready1.
3) The user moves a specific finger across the biometric sensor 12,
4) Depending on the success of the sensing of the fingerprint, the display 14 displays either 'good' or 'error'.

5) The user again moves the same specific finger across the biometric sensor 12 to verify the finger print.
6) The display 14 then displays either the message 'good-1' or 'error1, provided the message is 'error", the user must repeat the steps 3-5.
7) The user again verifies the fingerprint by moving the specific finger across the finger print sensor 12.
8) Provided the fingerprint is verified, the display 14 displays the message 'good-2'.
9) An 8-figure number is now shown in the display, which number is transferred via the internet function to the security system of Pi-Card.
Fig. 2 is a schematic view of the components comprised within the card 10 and Figs. 3-6 illustrates the four-layer print for the establishment of the electrical connections between the components illustrated in Fig. 2.
Example
The prototype embodiment of the apparatus described above with reference to Figs. 1-6 was made from the following components:
Component dev. art. description

C1 0805 100nF capacitor
C2 1206 1uF capacitor
C3 0805 470nF capacitor
C4 0805 470nF capacitor
C5 0805 470nF capacitor
06 0805 470nF capacitor
C7 0805 470nF capacitor
C8 0805 470nF capacitor
C9 0805 470nF capacitor
C10 0805 470nF capacitor
C11 0805 470nF capacitor
C12 0805 470nF capacitor
C13 0805 470nF capacitor

o o o o o o o O o o o
■*-* o o o o o o o O O o o
CO to CD CD CD CD CO co CO CO CD
Q. a. Q. a. a. £2. CL a. n. a. Q.
to o s CO O CO
o CO
o CO
o CD
o CO
o s CD
o CD O
LL. u. U- U- u_ Li. u_
c c c rz c c u_ u_ Li. c LL
o o o o o o 3 =1 C o 3
r- r- r*- I"- t"-. r- O o o o O
^=r ■ to in m m ID 10 CO CO lO in CD
o o o o o o o o o o O
to CO CO oo 00 CO CN CM ao CO CN
o o o o o o o o


O n o n
4-1 -i-» -*-» *J
UJ f/> tn to
(/> r/> w to
m CI) ai fli
OH OH o: a:
^ V V
O) o CO CD
id N- CM co
CO -* m
lO lO in LO
O C3 o o
CO CO CO GO
o o o o


o o o o o o o o o O 3 o o
-4~f «•—1 •*—» 4-> 4—1 ■4-1 J-* co "en co CO co CO CO CO to co "to co to
'to 'ca "« tn ~«J ta "to 'to to "to 'ca "« "to
CD CD CD CD CD CD CD CD CD CD CD CD 0)
ca OH a: CH D: OH OH ce cc a: a OH a:
it: i£ :*;
cO i^ it; ^ o o ;*:
CO o o o DC o OH a: OH CE o ^ o
CO T— T— T— o *~ o o o o ,— T_ ,—
lO lO lO lO lO lO lO lO m lO lO LO to
o o o o o o o o CD o o o o
CO CO CO CO CO CO CO CO CO CO CO CO CO
o o o o o o o o O o o o o

c? 1
> a> co
CO CD V
co a: x



TTlOCOr-OOOlOT-CNCO'a-
ooooooooooo

■*- CN oo -*r
OH OH OH OH

oi-CMco-tj-mcor-mcor--cocnT-T-T-T-T-T-T-T-DHOHOHDHOHOHOHOHOHOHOHCHCH

CO

ca
Q. J
X
CM CO

ke 74LVC1G32
B1 Display
FDN306P
FPC2010
HMS39C70
92
LTC1998
LTC4054L4.
2
LTC4412
Mem S1
S2
S3
SW1
ZHCS750 IC1

2-Input or gate
terminals for the battery
display 7 segment, 8
cifre
Mosfet
Finger print controller
CPU ARM7
core
battery monitor
battery charger
power
controller
RAM
connector to program the
CPU
connector to connect an external
power
connector to connect the swipe sensor,
is not present on the diagram
contact to turn on the
card
Schottky diode
display driver

A memory chip module 18 is included in the circuit for storing the data related to the finger print as recorded by the finger print sensor 12. In the presently preferred embodiment of the present invention, a controller 20, specifically FPC 2010 for controlling the finger print sensor 12, in the presently preferred embodiment of the present invention constituted by a sensor from the company named finger print cards. The controller 20 is the only unit or module connected to the sensor 12.

A processor 22 is also located on the card 10 for communicating with the controller 20. In the presently preferred embodiment of the present invention, the processor 22 is a processor including an ARM7 processor core supplied from the company HYNIX, with the part named HMS39C7092. The processor includes 92-kb flash memory.
An algorithm for calculating a secure and anonymous Pin code has been implemented and delivered to the processor 22. In the present context, the processor is construed to be a generic term covering everything from the smallest micro controller and up,
The finger print sensor 12 is of the swipe sensor type chosen due to its compactness, low cost and power down ability, the sensor has a resolution of 152 X 32 pixels defining an active area of 10,64 X 2,24 mm with a resolution of 363 DPI. Each pixel having a resolution of 8 bits. The power consumption of the swipe sensor in the active state is approximately 45 mA and in the non-active state approximately 5uA.
The display 14 includes an indication area for indicating the remaining battery capacity, as known from e.g. cellular or mobile phones. The display 14 may display a warning when the battery voltage drops below a specific level indicating that the battery needs to be recharged. In case the battery is not recharged within a specific time limit and the card 10 is not turned off, the card 10 will be powered down by the processor 22. The card is placed in an adapter for recharging the battery. The adapter may be constructed so as to be able to plug in to AC mains in any country, i.e. the adapter may be plugged into a 110 V AC 60 Hz or 230 V AC 50 Hz AC mains. The battery may be recharged by the mains supply. Alternatively the battery may be recharged by kinetic energy, for instance when the individual carrying the smart card 10 walks, kinetic energy may be converted to electrical energy used for recharging the battery. Further alternatively the smart card 10 may include solar cells for converting solar energy to electrical energy for recharging the battery.

The battery may be of a lithium iron polymer for enabling recharging of the battery while minimising the memory effect of the battery. In the presently preferred embodiment of the present invention, the battery has a capacity of approximately 80-100 mAH.
An individual using the smart card 10 according to the present invention may use the PIN-code generated on the smart card 10 for gaining access to secure systems, such as financial transactions or secure areas, provided of cause the individual is properly authorised.
A software implementation of an algorithm for calculating a code comprising numbers is included in the internal memory of the processor 22 in accordance with the present invention. The algorithm calculates a valid code based on three number series, one provided by a random number generator in the processor 22 on the smart card, one generated by an external computer and one chosen by the company insuring the card or determined by e.g. an account number, a social security number, or any other specific individual identifying integer or number. Generally, the algorithm is based on at least two constants and one variable.
The aigorithm calculates a PIN-code based on the two constant and one variable for the external system to correctly identify the individual and grant access.
In use, the individual owning the card 10, and having initialised the card with his or her fingerprint, powers up the card, either by activating a switch or simply by touching the fingerprint sensor 12. The smart card then requires the individual to provide a fingerprint to the fingerprint sensor 12. The controller 20 then compares the newly sensed fingerprint with the fingerprint stored in the memory 18.
Provided the comparison results in a match, a valid PIN-code is calculated and
provided to the individual, preferably by displaying the PIN-code on or in the display 14.

Provided the comparison does not result in a match, an error message is displayed in the display 14. The software provided in the smart card may include a limitation of how many times an individual may attempt to obtain a valid PIN-code without providing a valid fingerprint.
The smart card 10 according to the present invention is no limited to being able to generate PIN-codes for a single system. Each smart card 10 may be used for granting access to any number of systems. An individual may use the smart card 10 for gaining access to e.g. a private online banking system and an IT-system at work. A selection may be possible, e.g. via at least one key, for selecting a specific system to generate a PIN-code for.
In the presently preferred embodiment of the present invention the display 14 may display up to 8 characters in one row and may include background light for enabling the smart card 10 to be used in low-light conditions.
Embodiments wherein PIN-codes having a variable length or a length different from 8 characters may be envisioned, and is considered a part of the present invention.
As the fingerprint is not transmitted from the card, or read in a device separate from the card, the actual identity of the individual is therefor not compromised.
The card 10 may include a module for transmitting the generated PIN-code. The module may be constituted by a wireless module, alternatively a module for wire
connection to an external system.
The algorithm comprises a number of mathematical functions combined with bit manipulation, e.g. number reflection, for combining specific sequences of codes used individually and in a specific order. The smart card according to the present invention may be used with two types of bit manipulation, the first being time dependent and the other being constant, both methods having a high security.

The software application implemented according to the present invention is built up around three independent databases.
The first database designated A comprises information relating to persons to each of the smart cards operated by the vendor or company. The records in the database A are designated accounts.
The second database designated B comprises data relating to the individual cards such as the last used code as well as the two constants determined at the initialisation process. The database further comprises codes for security level, e.g. how many codes to accept before the card is perceived as out of synchronisation. The database is refreshed at each approved access by the user.
The third database designated C comprises the sequence of codes to be approved at plug-in. The sequence of codes reduces in case of failing to authenticate the user. In case the number of available codes are reduced to zero, the card and the server is brought out of synchronisation meaning that the smart card will be blocked and a resynchronisation process is required.
Dividing this information into three databases provides a high level of security at the administration, enabling more than one individual to administrate the system, each individual having different rights for the individual databases. Also, the personal information may be excluded thereby providing anonymous access to systems where it is appropriate that the individual may not be identified, e.g. medical journals for research.
There is no need for the card and the authentication system to be in physical contact since the card includes a power source constituted by a battery, and comprises the same algorithm as the server for calculating the sequence of codes provided that the card and the server does not loose synchronisation due to e.g. too many erroneous log ins. Currently, credit cards and debit cards only allow three erroneous Pin codes before the card is blocked, however, in case the biometric smart card according to the present invention, the number of erroneous codes

supplied by the user may be higher due to the added security of the biometric sensor included in the card.
In Annex 1, the software used for operating the prototype embodiment described above with reference to Figs. 1-6 and described in the above example is listed.
Fig. 7 illustrates the communication between a smart card and an authentication server 100 and an application server 102. Before the card is used for the first time, the card must be initialised by a sequence as described previously. The authentication server 100 sends a first random number and one constant to the card 10 illustrated by the error 104, The transfer of the first random number and the one constant may be performed using a smart card interface, a USB interface, a wireless interface, such as blue tooth, IR or RF, the mentioned communication methods may be substituted by other methods of communication as is obvious to a person skilled in the art.
Fig. 8 illustrates the initialisation and synchronisation of a card 10 with the authentication server 100. The illustration is divided in two fields, one grey and one white. The lower white field illustrates the initialisation that may only be performed once for each card. The upper grey field illustrates the synchronisation performed repeatedly with each card.
When initialising the authentication server 100 indicated by the error A, at least one constant is provided to the authentication server, e.g. an account number, area number or other identification number. The information is supplied by the application server that may be the propriety of a bank, passport control or other public authority.
The initialisation process is started and information regarding a specific card is established in the authentication server at the point B in Fig. 8.
The card is placed in a smart card reader and using the smart card interface receives the constant from the application server along with a randomised number from the authentication server. The card generates the third number required for

calculating the codes or tokens. In the presently preferred embodiment, the third number is a randomised number, however, the number may also be extracted from the finger print sensor. Having the three required numbers, where at least one may be a variable, the sequence of tokens or codes may be calculated. The sequence of tokens or codes will be specific for each card, After the initialisation process, the card will be locked meaning that it will no longer be possible to perform right operations to the internal memory.
The authentication server must be provided with a token or code from the card for calculating the sequence of tokens or codes that the card will supply. It is possible to pre-initialise a larger number of cards without randomisation, preferably used in situations where a lower level of security is sufficient.
In the box designated D during the initialisation, the finger print sensor must recognise the fingerprint three times, whereafter the software will load the fingerprint into the internal memory. This will lock the internal memory as described above. Due to security considerations, the authentication server may not activate the account relating to the card before the card has been synchronised, This process is ensured as the third number that may be a variable is transferred from the card to the authentication server at the initial synchronisation.
When the finger print sensor is activated and the authenticity of the finger print supplied to the finger print sensor has been approved, the algorithm generates the next token in the sequence based on the previous token or code stored in the cards memory.
The card may be provided with a variety of output media for outputting the tokens or codes. In the presently preferred embodiment a display Is used for displaying the Pin codes or tokens to the user, however, embodiments involving sound, radio signals or light may be included on the card. Whatever the output means may be, none of the information outputted from the card relates directly to the biometric characteristics but to a code or token, which is further altered dynamically thereby providing anonymity to the user owning the card.

For the card to access the application server, the card needs to be synchronised with the authentication server. This is performed in each instance after a procedure adapted for the card suppliers security needs. The server algorithm is identical to the algorithm implemented on the card. The server is provided with a token or code from the card, which is then used as the first step in the calculation of the sequence of codes or tokens produced also by the card.
Provided the token or code supplied from the card is validated by the authentication server, a hand shake is supplied from the authentication server to the application server and the card owner or the card is then logged in.
If the card and the authentication server is brought out of synchronisation, e.g. by supplying more than ten erroneous codes or tokens, the procedure of transferring the next token from the card to the authentication is repeated. Since both the card and the authentication server have the same sequence of codes or tokens, the authentication server may be supplied with a token from the card and then be able to calculate where in the sequence the card is. Subsequently, the authentication server will be in synchronisation with the card.
In the presently preferred embodiment of the present invention, the preferred method of using the card is to hold a respective thumb and index finger on each side of the card where the thumb is placed over a marked side, then pulling the card with the opposite hand so that the pressure and placement of the finger onto the sensor is substantially identical each time, also the speed of the finger being moved across the swipe sensor is substantially identical each time. Provided an array sensor is used, a marking or guidelines will be sufficient.
The algorithm for calculating the Pin codes or tokens is as follows:
1: for (my $i=0;$i 2: $g=0;$v=100000000000; $d=0;
3: $x=($a*$x)+$c;
4: while($x>=1000){$d=$x-(10*floor($x/10));

5: if($x 6: $g=(10*$g)+$d;$v=$v/10;
7: }$x=($x-$d)/10;
8: }$x=$g;
9: }
The algorithm is also included in the annex 1, vide page 46 of the annex 1,
The variable $ sekvens designates the number of tokens calculated by the server. The variable $a designates a constant, such as a bank account or birthday. $b designates a randomly chosen constant. The algorithm implemented on the card is similar to the one implemented on the server, however, the variable $sekvens is limited to the value 1, meaning that only one Pin code is calculated one at a time.
For improving the security of the sequence of the algorithm, permutation on the variable $d may be applied, meaning the after calculating a sequence of codes, a random or psedo-random choosing of a new order of codes may be performed. If a third person then obtains knowlegde of the sequence of codes this knowledge is still useless unless the permutation of the variable $d is also known,
At each use of the card 10, a code is supplied to the authentication server 100 Illustrated by the arrow 106. The authentication server and the application server 102 are constantly in communication illustrated by the double arrow 108.
The card 10 may be used in a variety of situations, not only in situations requiring high level of security. The procedure of synchronisation is a part of the security of the card and also provides flexibility in the level of security. If a high level of security is required, the resynchronisation may be monitored, e.g. by requiring the user to personally appear before a security administrator and use the card for supplying a new code manually entered by a third person to the authentication server, in cases where a lower fevel of security is accepted, the resynchronisation may be performed using a telephone or the Internet.

In the presently preferred embodiment of the present invention, the smart card 10 includes an ARM 7TDMI32 bit RISC processor for performing the calculations according to the algorithm as described earlier. Also memory is included on the card, either of flash type or EEPROM, RAM or ROM type memory. The display included on the card 10 is 7 segment, 8 digits display having the dimension 35mm x 15mm.
The finger print sensor is a capacitive swipe sensor having ESD protection of > 15 kV. The battery is a lithium iron polymer rechargeable battery with a capacity of 10-100 mAH also including a battery recharging circuit.
The card must, in the presently preferred embodiment of the present invention comply with the International Standard Organisation's standard ISO 7810/7816/10536/14443.
The card may include RF communication means for communicating with an external system.
The micro controller may include an operating system COS, which may be LINUX or JAVA based. Having an operating system allows for software applications to be developed independent of the hardware platform. New software applications may be developed and downloaded to the card's memory using the smart card reader/writer or other data transferring medium.
The card may include an on/off function for being connected with the swipe sensor such that activating the sensor by applying e.g. a finger to the sensor activates the processor. The sensor may measure heat or electrical conductance from the finger. The second time a finger touches the sensor, the finger print sensor will sense the finger print from the individual. This will ensure that the card is not activated when stored in e.g. a wallet. Also, anybody can activate the card, but only the rightful owner may have his or her finger print recognised and thereby accessing the Pin codes on the card.

The card may power down after a specific period of time such as 30 seconds after the last active operation.
The display may display other than numerals, e.g. the display may be of a type capable of displaying images, such as black and white images or colour images enabling the user to display photographs, such as those found in passports. The display may further be pressure sensitive enabling the user to interact with e.g. a menu system for configurating the card. In the presently preferred embodiment of the present invention, the display uses 3.3 V and is turned off 30 seconds after the last operation.
In the presently preferred embodiment of the present invention, two batteries from the company Worliy Energy Cells, each having a capacity of 45 mAmpH giving a total capacity of 90 mAmpH. These batteries are rechargeable and have a dimension of 43mm x 40mm x 1 mm. Studies have shown that several hundred Pin codes or tokens may be generated on a single charging of the batteries. In order to supply the components with a current of 3.3 V, a voltage regulator for regulating the battery current of 3.7 V down to 3.3 V with a maximum current capacity of 500 mAmp.
A sliding switch for powering up or turning off the card may be included on the card. The switch may substitute the finger print sensor sensing a contact with a finger for powering up the card.
A central server authenticates the Pin code as provided by the smart card and inputted by a user or individual owning the smart card. The server and the smart card both comprise an algorithm for generating a sequence of random numbers based on the two constants for calculating these sequences. When the card is initialised the two constants and the one variable are loaded or read into the memory on the smart card and also stored on the server. The issuer of the card may choose one of the two constants, e.g. the constant may be an account number or other personal identification, while the other constant and the one variable are generated by randomisers present in the server and the smart card, respectively.

Obviously, the number of constants and variables used in the dynamic binary code conversion algorithm may be altered for providing a unique dynamic binary code conversion algorithm. Examples of alternative dynamic binary code conversion algorithms are listed below.
One constant is formed by the server and the other is formed by the smart card. The constants are read into the respective other device for allowing each of the systems to obtain the two constants. The step of exchanging the random numbers generated in the smart card and server, respectively, is a way of the server to initialise the smart card and for the smart card to initialise the server.
The server may accept only a limited number of Pin codes, such as 10 meaning that the next 10 codes generated in the smart card may be used as Pin codes for logging in or validating the identity of the user in the system. When the smart card is activated and the identity of the user has been established by using the built in biometric sensor, a Pin code is generated and displayed on the display 14. The number of available Pin codes is decremented one meaning that nine remaining codes may be used for logging in. When using a Pin code for logging in, the server resets and accepts the next 10 Pin codes in the sequence.
However, if 10 Pin codes are generated without using any for logging into the system, the smart card and the server will loose the synchronisation and the eleventh generated Pin code will be refused by the server.
For re-establishing the synchronisation, the owner of the smart card may contact a system administrator or other authority and provide the next generated Pin code for bringing the server up to the point in the sequence of Pin codes. This establishes a synchronisation between the server and the smart card. Since only the rightful owner of the smart card may generate a valid Pin code, the synchronisation will only be possible by the owner himself or herself. As the smart card comprises a processor and internal memory, the smart card may include severs! constants and/or algorithms for different and independent systems, e.g. the card may be used

by an employee in a company for gaining access to the company or the company's internal IT system as well as the employee's personal bank account. The employee or owner of the card may be able to choose which system to generate a valid Pin code for either via the display or other selection means such as buttons included on the surface of the smart card.
The card in a further preferred embodiment has a thickness of approximately 1 mm and may be bent requiring the biometric sensor to be placed as close to the edge of the card as possible in order to avoid braking the sensor. The stiffness of the card near the edge provides stability to the sensor.
All biometric sensors require a certain amount of sensitivity and the signals to be similar to the previously supplied signals. By supplying the card with a graphical indication of where the finger should be placed on the finger print sensor ensures that the user may perform a movement of the finger substantially identical each time the card is used.
The above described presently preferred embodiment of the apparatus according to the present invention was implemented as a prototype having the outer dimensions of an ISO standard credit card, however, having a total thickness of approximately 4mm - 5mm. It is contemplated that the thickness of the prototype embodiment may be reduced to no more than 1mm as will be described below and at the same time, the credit card be configurated as a flexible and bendable credit card which is not subjected to being deteriorated by e.g. bending in a wallet or the pocket of the individual carrying the credit card or smart card apparatus.
Since the card is suppose to be in a wallet, the next generation of the Pin code generator card is going to include 2 major demands.
• The card must not be a stiff card, it must be able to be bent, so much that the user is not going to break the card, when it is in the users wallet.
• Secondly the card must not exceed the thickness of 1 mm.

To fulfil those demands, the technique that was used in the prototype can not be used.
In the prototype Pin code card standard components were used, such as a common glass display, standard battery, and other common standard electrical components.
Display
The display is to be a rather large component on the card, and will probably, be over the middle of the card, which means that when the card is being bended the display is also being bended.
The Display could have any size, and any number of digits.
There a several technologies, that is using what is known as, flex and plastic display. The essence of those displays is, that they are looking like a piece of thin plastic, and are very thin, down to 0.3mm, and are very flexible, meaning that they can be bent, without being broken.
Electronic
The problems using standard components on the card are:
• The components can not be bent.
• They are very thick, since they are in a house of black plastic.
• The security is very low, since the fingerprint controller and microcontroller is in 2 different components. It is possible to strip the card, and hacked it.
• Many components - high cost
The way to eliminate these problems is to make an ASIC (Application Specific
Integrated Circuit).
An ASIC is a user specific component that can be digital, analog or a mix.
The biometric sensor (fingerprint sensor) generates an analog signal, when the user swipes his/her finger. Preferably, the ASIC includes as a front end and ND connector.

Furthermore, the ASIC showed include the Controller, the micro processor, the Memory and the display driver.
The advantage of an ASIC is that the security level is very high since its. it is not possible to break into the circuit.
Furthermore the physical size of such an ASIC is about 4*4 mm as a naked die. Since it is made out of silicium it can not be bent, so the ASIC will be placed in one of the sides of the card. The power use of an ASIC instead of the 4 standard components is also an important factor. The ASIC, depending on what process it is madein{e.g HYNIX0.18u), uses much less power.
The power supply circuit can be made as an analog chip, or together with the ASIC.
The thickness of the ASIC is very small and below 1 mm (as a naked die), however, it is the wafer that decides the thickness of the ASIC, but if that is too thick, it is possible to back grind the ASIC, since the functionality of the ASIC is made with some mask, that is only a few micron thick.
Other electrically components
On the card there will be an X-tall and perhaps also addition components such as capacitors and/or resistors.
Fingerprint sensor
It is made out of silicium that can not be bent, so the sensor must also be placed at the one side of the card and preferably at the edge thereof. Like the ASIC it is also possible to back grind the sensor, if it's to thick.
Battery
The thickness may be from 0.2mm but of course the capacity of the battery depends on the size and thickness of the battery.
Flexprint

In order to connect the different parts electrically a flexprint technology is preferably used.
Alternatively, wire bonding may be used for connecting teh pad on the ASIC to
another pad.
Encapsulate
To make the card nice and protect the electronic parts it needs to be encapsulated.
Sensor Types
Relevant sensor types are:
■ Swipe sensor - The user must swipe a finger over the sensor
that scans the user's fingerprint.
■ Area sensor - The user plants the finger in the sensor array area,
which then scans the fingerprint or entire finger.
■ Iris sensor - The user looks in an eye sensor that then scans the
user's iris.
■ Blood sensor-The characteristics of the user's blood is
scanned.
■ DNA scanner - The DNA of the user is scanned.
■ Microphone - The characteristics of the user's voice is scanned.
■ Air - The characteristics of the user's breath is scanned or a
certain smell Is detected..
■ Keyboard - The user types in the password on the card.
Types of Power Sources
Relevant power sources are:

■ Battery
■ Capacity
Types of Charger
For recharging the power source in order to make the card work for a longer period. The following types of rechargers may be used:
■ Charger - Connect the charger to the connectors on the card (e.g.
Smart Card connectors); the implication of this is that the user of the Sensor Card must have a charger as well
■ Solar Cell - A Solar Cell could be on the card to recharge the power
source or may be the power source itself.
■ Wireless - E.g. capacity or induction coupling.
■ Kinetic energy - When the user walks with the card, those vibrations
will recharge the power device.
Types of Storing Devices
Relevant storing devices are:
■ Flash - The program is burned into flash memory.
■ EEPROM - is another technology that can contain storing data.
■ OTP - One Time Programmable memory. » ROM - Read Only Memory.
In the future other types of memories might be used:
■ Blologicaf memory.
■ Chemical memory.
> Optical memory.

Types of Application
■ Key generator - provides the user with a unique password to e.g. a
database or a restricted area. The output key is e.g. listed on a
display.
■ Health care - The sensor card measures the user's health, and if there
is a problem, it shows e.g. the telephone number of the doctor.
■ Personal data - all personal data e.g. date of birth, social security
number etc. could be viewed on the display.
Types of Outputs
■ Wire plug in. - Plug in a wire, to receive the output data.
■ Wireless using radio frequencies (e.g. Blue Tooth) - The card can communicate wireless with e.g. an external computer.
■ Loudspeaker (sound) - The card sends out an audio signal (e.g.
human speech), that the third part user may receive (hear).
■ Light (infrared, Higher-lower freq.) - E.g. communication via a Iaseror
IrDA.
■ Holographic - The card makes a hologram.
■ Smart Card connectors - A Smart Card reader receives the output
data.
■ Display - the data is shown.on a display.
Thickness of the sensor card
Multiple sensors
It is possible to have more then one sensor on the card, it could for example be 3 sensors, 2 finger sensor and a voice sensor, that verify the identity of the person.

A second sensor could also be a sensor to detect the sunlight, air pollution, rain, temperature and so on.
The sensor card could also be used as a combination of the Pin code generator and
a sensor card.

ANNEX 1
UTILITY.H
I* Miscellaneous library functions */
#ifndef_UTILITY_H #define_UTILITY_H
extern void delay{int);
extern void message(char * s);
extern unsigned int battery_check(void);
#endif
UART.H
I** ******** ****lrtr********* *************************************************** **
** **
** Copyright (c) 2000 ARM Limited
** All rights reserved **
•* **
******************************************************************** **********/
/**** i*************************************************************************
* *
* The following are for the Integrator UART system. These are bits to enable *
* the functions in the Command Registers 'and the individual masks for the *
* returned Status registers *
* Register Bits - these require to be set to enable the defined functions *
******************************************************************************

#ifndef_UARTDEF #define __UARTDEF
^******************************************** ***** *************** ************* /
I* UART Structure maps to register offsets 7
!* Structure is instantiated in UART.c and placed by scatter file V
/*** *********************************************************************** tt*i
struct uart
{volatile unsigned dr; // @0x0
volatile unsigned ecr; // @0x4
volatile unsigned Icrh; // @0x8
volatile unsigned Icmv, // @0xOc
volatile unsigned Icrl; // @0x10
volatile unsigned cr; // @0x14
volatile unsigned fr; //@0x18
volatile unsigned iir; //@0x1C
};
;*** ***************** ************************************************* *********/
r Received Status Register - RSR V
i************* ***************************•*****#********************** ********/
#define RSR_Overrun_Error 0x08 #deffne RSR_Break_Error 0x04 #define RSR_Parity_Error 0x02
#define RSR_Framing_Error 0x01
i**« ************************************************************ **************/
/* Line Control High Byte Register - LCRH */
J*****************************************************************************/
#define LCRHJVord_Length_6 0x60
#define LCRH_Word J.ength_7 0x40 #define LCRH_Word_Length_6 0x20

#define LCRH_Word_Length_5 0x00 #define LCRH_Fifo_Enabled 0x10 #defme LCRH_2_Stop_B'rts 0x08 #define LCRH_Even_Parity 0x04 #define LCRHJ>arity_Enable 0x02 #define LCRH_Send_Break 0x01
;******************** ********* **************************************** ******** i
/* Line Control Medium Byte Register - LCRM *}
I* This register specifies the high byte of the Baud rate divisor V
If ************************************ t ******************************* t******* ;
tfdeftne LCRM_Baud_460&00 0x00 #define LCRM__Baud_230400 0x00 #define LCRM__Baud_115200 0x00 #deftne LCRM_Baud_76800 0x00 #define LCRM_Baud_57600 0x00 #define LCRM_Baud_38400 0x00 #defineLCRM__Baud_19200 0x00 define LCRM_Baud_14400 0x00 #define LCRM__Baud_9600 0x00 #define LCRM__Baud_2400 0x01 #define LCRM__Baud_1200 0x02
;****** *********************************************************************** /
/* Line Control Low Byte Register - LCRL 7
/* This register specifies the low byte of the Baud rate divisor */
/*****************************************************************************/
#defineLCRL__Baud_460800 OxOT ■ - - -■
#define LCRL_Baud_230400 0x03
#defina LCRL_BaudJ15200 0x07
#define LCRL_Baud_76800 OxOB
#define LCRL_Baud_57600 OxOF
#defme LCRL_Baud_38400 0x17

#deflr»LCRL_Baud_1B200 Ox2F #defineLCRL_Baud_14400 0x3F #define LCRL_Baud_9600 0x5F #define LCRL_Baud_2400 0x7F #define LCRL_BaucM200 OxFF
J******************************************************************* *********•/
/* Control Register - CR V
it******************* ************************************************* ********!
#define CR_Loop_Back_En 0x80 #define CR_TimeoutJnt_En 0x40 #define CR_TXJnt_Enable 0x20 #define CR_RX_lnt_,Enable 0x10 #define CR_ModStatJnt_En 0x08 #define CR_UART_Enable 0x01
>******************** ***** ************************************************** **1
r Flag Register -FR 7
J*****************************************************************************/
#define FR_TX_Fifo_Empty 0x80
#define FR_RXJ=ifoJ=ull 0x40
#define FR_TX_Fifo_Fu!l 0x20
#define FR_RX_Fifo_Empty 0x10
#define FR_Busy 0x08
#define FR_Carrier_Detect 0x04 #define FR_Set_Ready 0x02 #define FR_Clear_To_Send 0x01
J*************************************************************************/
/'Interrupt Identification Register - HR */
i************************************************************************ */
#define IIR_RX_Time_Out 0x08
#definellRTX 0x04

#define IIR_RX 0x02
#defins IlRJtodem 0x01
#endif
TYPEDEFS.H
#ifndef_DELTATYPEDEFS_H #deflne _DELTATYPEDEFS„H
r
' FPC2010 type definitions
7
typedef unsigned char u_char; typedef unsigned char bool; typedef unsigned char * addrB;
#endif r DELTATYPEDEFS H '/
T1MER.H
/* Timer library functions V
#tfndef_TIMER_H #define_TIMER_H
define START_TIMERO *TSTARTR = *TSTARTR | TIMERO_MASK; // Start timer 0 ■ -#define STOPJ1MERQ "TSTARTR = *TSTARTR & ~T!MERO_MASK; // Stop timer 0
extern void timerQ_init(void);
#endif

RANDOM.H
/* Random library functions 7
#imdef_RANDOM_H #defme _RANDOM_H
// token
#define tempa 9102 // Offentlig nogle 1
#define tempo 12345678 // Offentlig negle 2
extern double token(double x);
I* linear congruential generator. Generator x[n+1] = a * x[n] mod m V
#define RAND_INT(l,h) (((int}(random() * ((double)(h)-(l)+1))) + (I)) extern double random (void); extern void rand^seed (unsigned int); #endif
PORT.H
I* Display library functions */
#ifndef_PORT_H
#define_PORr.H
extern void portjnit(void); #endlf

FPC2010REGISTERS.H

//
// Copyright (C) 2003 Fingerprint Cards AB. Ait Rights Reserved
//.
//
// The information contained herein is confidential property of
// Fingerprint Cards AB. The use, copying, transfer or disclosure of such
// information is prohibited exceptby express written agreement with
// Fingerprint Cards AB.
//
//.
// File: fpc2010registers.h
//
// Description: These registers are the software interface to the FPC2010
// hardware.
//
// Hardware platform: FPC6430
//
//
#ifndef_FPC2010REGISTERS__H #define _FPC2010REGISTERS__H
r*
* interrupt/Reset interface registers
((volatile addr8)FPC_BASE)
((volatile addr8)(FPC_BASE +1))
((volatile addr8)(FPC_BASE + 3))
V
#defirie InterruptMask #define Interrupt #define SwReset
r
* Sensor interface registers

*/

#define SensorCommand #define SensorParameter. #define SensorParameter_ #define WaitCycles #define StartCycles #define CloseCycles #define SensorReset #define FingerDetect #define ClockDevisor

{(volatile addr8)(FPC_BASE + 33))
LSB {{volatile addr8)(FPC_BASE + 34))
MSB ((volatile addr8)(FPC_BASE + 35))
({volatile addr8)(FPC_BASE + 36))
((volatile addr8)(FPC_BASE + 37))
{(volatile addr8)(FPC_BASE + 38))
((volatile addr8)(FPC_BASE + 39))
((volatile addr8)(FPC_BASE + 41))
((volatile addr8)(FPC_BASE + 42))



r
* Work RAM interface registers
#define WorkRAMAddrPointer #define WorkRAMWriteData #define WorkRAMReadData

((volatile addr8)(FPC_BASE + 64)) ((volatile addr8)(FPC_BASE + 65)) ((volatile addr8)(FPC_BASE + 66))

r
* Verification result RAM interace registers
V
#define VerResuItAddrPointer ((volatile addr8)(FPC_BASE + 67))
#define VerResuKWriteData {{volatile addr8)(FPC_BASE + 68))
#define VerResultReadData . {(volatile addr8)(FPC_BASE + 69))

* FPRAM control registers
*/
#define FP_RAM_Cmd #define FP_RAM_Range #define FP_RAM_Read #define FP RAM Write

((volatile addr8)(FPC_BASE +128)) ((volatile addr8)(FPC_BASE +130)) {(volatile addr8)(FPC_BASE +131)) ((volatile addr8)(FPC_BASE +132))

/'

* Parameter file registers
*;
#define ParameterFilePointer #define ParameterFileWrite #define ParameterFileRead

((volatile addr8)(FPC_BASE + 192)) ((volatile addr8)(FPC_BASE + 193)) ((volatile addr8)(FPC_BASE + 195))



r
* Algorithm Calculating Hardware (ACH) registers V
#define ACHCmd #define AccLlneOffset #define AccPointOffset #deflne TopLineLSB #define TopLineMSB

((volatile addr8)(FPC_BASE + 196)) ((volatile addr8)(FPC_BASE + 199)) ((volatile addr8)(FPC_BASE + 200)) ((volatile addr8)(FPC_BASE + 201)) ((volatile addr8)(FPC_BASE + 202))

r
* Flags for the interrupt register
V
#define IRQ_SENSOR_FINGER_DETECT (1«0)
#definelRQ_FPRAM_DATA_AVA!LABLE (1«1)
#define IRQ_FPRAM_ERROR (1«2)
#define IRCLSENSOR_COMPLETE (1«3)
#define IRQ_MANUAL_CAPTURE (1 «4)
#define !RG_ACH_COMPLETE (1«6)
r
* Sensor command register (ACHCmd)
*/
#define ACHCmd_ENROL 0x3B
#define ACHCmd VERIFY 0x5B

#define ACHCmd_ENROL_TEST 0x3F
#define ACHCmd_VERIFY_TEST Ox5F
#define ACHCmd DELTA XY 0x5B
r
* Commands for the sensor command register (SensorCommand)

7 #define READ_ALL_COL_BY_COL (0x88)
#define WRITE_DETECT (0x2E)
#define WRITE_DRIVE_C (OxAE)
#define WRITE__ADC_REF (0x6E)
#define READJNT_REGS (OxOA)
r
* Parameters for setting up the sensor.
V
#define WAIT_REG_VALUE 172
#define START_CYCLE_VALUE 80
#define CLOSE_CYCLE_VALUE 2
#define CLOCK DEVISOR 0
r
* Values for the FP RAM register (FP_RAM_Cmd)
V
#define PREPARE_MEM_LOW_HALF 0x01 #define PREPARE_MEM_HIGH_HALF 0x02 #define WRITE__MEM_LOW_HALF 0x04 #define WRITEJCMJHIGHJHALF 0x08 #define READ_MEM_LOWJHALF 0x10 #define READ MEM HIGH HALF 0x20

t
* Used as parameters to functions that deals with the FP_RAM in fpc2010. LOW_HALF means
* low memory half and HIGH_HALF means high memory half. 7
#define LOW_HALF 0 #define HIGH_HALF 1
/"
* Startup values for sensors registers.
7
#define DETECT_STARTUP_VAL 0xe8 //=0x17 on senson 07/4 //Startup value for the detect
register.
#defirte DRlVC_STARTUP_VAL 255 //Startup value for the drive register.
#define ADCREF__STARTUP_VAL 192 //Startup value for the adcref register.
r
* Definitions for memory area sizes and offsets.
V
#define NO_OFJ"OP_UNES_REMOVED 30 #define FPC2010_WORK_RAM_SIZE 2048 #define FPC2010_VER_RESULT_RAM_SIZE 1024
/**
* The size of a template
7 #define TEMPLATE_SIZE 676
#endif /* FPC201OREGISTERS H 7

FPC2010INTERFACE.H
//
// Copyright (C) 2003 Fingerprint Cards AB. All Rights Reserved
//
//
// The information contained herein is confidential property of
// Fingerprint Cards AB. The use, copying, transfer or disclosure of such
// information is prohibited exceptby express written agreement with
// Fingerprint Cards AB.
//
//.
// File: fpc2010interface.h
//
// Description: interface driver for the FPC2010 ASIC.
//
// Hardware platform: FPC6430
//
//
#ifndef _FPC2010INTERFACE__H #define FPC2010INTERFACE H
r
* Functions */
void UploadVerResultRAMContent{u_char 'buffer); void UploadEnrolResult(u_char *enrolResult); void DownloadVerData(u_char 'templateBuffer);

void Clear! RQReg(void);
void SetlRQMask(void);
void SWResetfvoid);
void SetUpLineSensorStartUp(int detect, int drive, int adcref);
void SetUpLineSensor(void);
void ResetLineSensor(void);
void SetUpLineSensorDETECT(int value);
void SetUpLineSensorDRiVC(int value);
void SetUpLineSensorADCREF(lnt value);
void PolllRQReg(unsigned charirq);
#endif
FPC2010BIOMAIN.H
//
// Copyright (C) 2003 Fingerprint Cards AB. All Rights Reserved
//.
//
II The information contained herein is confidential property of
// Fingerprint Cards AB. The use, copying, transfer or disclosure of such
// information is prohibited exceptby express written agreement with
// Fingerprint Cards AB.
//
// . :
//File:fpc201D.h
II -
// Description: Biometric functions for the FPC2010 ASIC
//
// Hardware platform:
//

#tfndef FPC2010 H
#define_FPC2010_H
r
* Functions
7
voidfpc2010On(void); voidfpc2010Off(void); voidfpc2010ln!t{vold); bool fpc2010Enrol(u_char *templateBijffer); bool fpc2010Verify(u_char *templateBuffer); void fpc2010LoadParameterFile(unsigned char 'parameters);
#endif/*FPC2010V
ENCAPSULATED_ALG.H
,/.
// Copyright (C) 2003 Fingerprint Cards AB. All Rights Reserved
//
//
// The information contained herein is confidential property of
// Fingerprint Cards AB. Trie use, copying, transfer or disclosure of such
// information is prohibited exceptby express written agreement with
// Fingerprint Cards AB.
// ■ ■ ■ ■ - - - ■ ■ -
//
// File: encapsu1ated_alg.h
//
// Description: Encapsulated algorithm interface.
//

// Hardware: Swipe sensor.
//
//.
#ifndef _FPC2010HOST_ALG_H #define FPC2010HOST ALG H
#define PARAMETER_FILE_LENGTH 72 // Length of the fpc2010 parameters in bytes. II These defines are used as arguments to the function get_fpc2010parameters(). #define ENROL_PARAMETERS 0 // Get enrol parameters. #define VERIFY_PARAMETERS 1 // Get verify parameters.
//Typedefs used for fpc2010host_alg
typedef short int XHostJnt16;
typedef int XHost_lnt32;
typedef unsigned char XHost_UChar8;
typedef signed char XHosLChar8;
typedef unsigned char XHost_Bool;
XHosLBool Create_Template(XHost_UChar8 "InputArray, XHost_UChar8 *TemplateBuffer, XHost_UChar8 PointOffset, XHostJnt16 SwipeLength);
XHost_Boo! Match_Data(XHost_UChar8 *VerResultArray, XHost_UChar8 TemplateBuffer, XHost_lnt16 PointOffset,
XHost_lnt16 SwipeLength);
XHost_Bool PreVerify(XHost_UChar8 *template__buffer, XHost_UChar8 *FPC2010_ver_data);

XHost_JJChar8 *getJpc2010_pararneters(XHost_UChar8 parameters_to_get);
#endif
DISPLAY.H
/* Display library functions 7
#ifndef_D!SPLAY_H #define_DlSPLAY_H
extern void itoa{int, char Q); extern void write(char *); extern void display_init(void); extern void display_test(void);
#define WRITE_DELAY 25000
#endif
BPG.H
r
* include/hardware, h
*/
#ifndef_BPG_H
#define_BPG_H
include "7092.hH

/* These must be defined through the compiler V /*#define_EVALUALTION_BOARD 1 V I* #define _RUN_WITH_EMULATOR 1 7 r #define __PICARD_BOARD_TEST 0 7
r
* Bus Controller setup for Hynlx HMS39C7092 Microcontroller
7
#define BCR0_PATTERN 0x102 // 8 bit bus width, 3 wait states #define BCR1_PATTERN 0x100 // 8 bit bus width, 1 wait state
/*
* Port map for Hynix HMS39C7092 Microcontroller
7
// Pin Mux settings
#define PAMR_PATTERN 0x3fff // PAO: GPIO - PowerJMBATTLO // PA1: GPIO - Power_STAT // PA2: GPIO - PowerJMCHAG // PA3: GPIO - not used
// PA4: GPIO - not used (DISP_DATASEG - eval) // PA5: GPIO - not used (DISP_NWRSEG - eval) // PA6: GPIO - not used (DlSP_NRDSEG - eval) // PA7: GPIO - not used (D1SP_NCSSEG - eval)
#define PBMR^PATTERN OxOff // PBO: GPIO - not used //PB1: GPIO -not used // PB2; GPIO - not used // PB3: GPIO - not used // PB4: TMS // PB5: TDO // PB6: TDI

// PB7: TCK
#define P1MR_PATTERN 0x00 // P10: address bit 0 //P11: address bit 1 //P12: address bit 2 //P13: address bit 3 //P14: address bit 4 //P15: address bit 5 //P16: address bit 6 //P17; address bit 7
#defme P2MR_PATTERN 0x00 // P20: address bit 8
// P21: address bit 9
//P22: address bit 10
//P23: address bit 11
0 IIP24: address bit 12
//P25: address bit 13 // P26: address bit 14 // P27: address bit 15 - not used
#define P3MRJ=ATTERN Oxff IIP30: GPIO - not used //P31:GPI0- not used // P32: GPIO - not used // P33: GPIO - not used //P34: GPIO-not used // P35: GPIO - not used // P36: GPIO - not used //P37: GPIO - not used r #define P4MR_PATTERN 0x00 // databus[7:0]
#ifdef _EVALUALTION_BOARD
#define P5MR_PATTERN 0x00 // P50: address bit 16 //P51: address bit 17 //P52: address bit 18 //P53: address bit 19
#eise

#define P5MR_PATTERN OxOf // P50: GPIO - DISP_DATASEG // P51: GPIO - DISPJWVRSEG // P52: GPIO - DiSP_NRDSEG // P53: GPIO - DlSP_NCSSEG
#endif
#define P6MR_PATTERN 0x01b // P60: GPIO - not used //P61: GPIO-not used // P62: GPIO - not used // P63: nAS - bus interface address strobe // P64: nRD - bus interface read //P65:nHWR-not used // P66: nLWR - bus interface write lower // P67: BCLK - bus interface clock - default io-pin
#defineFPC2010_CLOCK_MUX_MASK 0x20
#define P7MR__PATTERN Oxlff // P70: GPIO - not used
//P71: GPIO-not used
//P72: GPIO-not used
// P73; GPIO - not used
// P74: GPIO - not used
// P75: GPIO - not used
//P76: GPIO-not used
// P77: GPIO - not used #define P8MR_PATTERN 0x0b // P80: IRQ0 - SIRQ
//P81:IRQ1-NIRQ
//P82:IRQ2-NIRQSEG
//P83: nCS1 - Exteranl ram chip select
// P84: nCSO - FPC2010 chip select via OR-gate #define P9MR_PATTERN 0x154 //P90:TxD0,
//P91:RxD0
// P92: GPIO - FPC2010JFSEL
//P93:GPIO-FPC2010 RESET

// P94: GPIO - not used // P95: GPIO - not used // P96: Does not exist // P97: nTRST - JTAG reset
// Port A
#ifdef _EVALUALT!ON_BOARD
#define PADDR_PATTERN 0x00 // all outputs if enabled by pin mux
#define PADR_PATTERN OxOf // set PA0-PA3 to 0 and PA4-PA7 to 1 #else
#define PADDR_PATTERN 0x07 // bit 0, 1 and 2 are inputs, all others are outputs if
r enabled by pin mux
#define PADR_PATTERN 0x00 // all set to 0 #endif
#define POWERJJBATTLOJWASK 0x01 #define POWER_STAT_MASK 0x02 #define POWER_NCHAG_MASK 0x04
#ifdef _EVALUALTION_BOARD #define DISP_NCSSEG_MASK 0x10 #define DISP_NRDSEG_MASK 0x20 #define DISP_NWRSEG_MASK 0x40 f #define DISP_DATASEG_MASK 0x80 #endif
// Port B
#define PBDDR_PATTERN 0x00 // all outputs if enabled by pin mux
#defme PBDR PATTERN 0x00 // all set to 0
// Port 1

#defme P1 DDR_PATTERN 0x00 // all inputs if enabled by pin mux
#define P1 DR_PATTERN 0x00 // ail set to 0
// Port 2
#define P2DDR_PATTERN 0x00 // all outputs if enabled by pin mux
#define P2DR_PATTERN 0x00 // all set to 0
// Port 3
#define P3DDR_PATTERN 0x00 // all outputs if enabled by pin mux
#define P3DR_PATTERN 0x00 // all set to 0
// Port 4
#define P4DDR_PATTERN 0X00 // all outputs if enabled by pin mux
- #define P4DR_PATT£RN 0X00 // ail set to 0
// Port 5
#define P5DDR_PATTERN 0x0 // all outputs if enabled by pin mux
#defme P5DR_PATT£RN Oxf // all set to 1
#ifndef _EVALUALTlON_BOARD #define DISP_DATASEG_MASK 0x01 #define DISP_NWRSEG_MASK 0x02 #define DISP_NRDSEG_MASK 0x04 #define DISP_NCSS£G_MASK 0x08 #endif
f
II Port 6
#define P6DDR_PATTERN ■ - - 0x00 // all outputs if enabled by pin mux
#define P6DR_PATT£RN 0X00 // all set to 0 #defineFPC2010 CLOCK_MASK 0x80 //
// Port 7
#defme P7DDR_PATTERN 0x00 // ail outputs

#define P7DR_PATTERN 0x00 //all set to 0
#define EVAL_LED_MASK 0x20 // evaluation board : P75 controls LED D1
// Port 8
#define P8DDR_PATTERN 0x07 II bit 3 and 4 are outputs, all other are inputs if
enabled by pin mux
#define P8DR_PATTERN 0x00 // all set to 0
#defineFPC1030_SIRQ_MASK 0x01
#defineFPC2010_NIRQ_MASK 0x02
#define DISP_NIRQSEG_MASK 0x04
// Port 9
#define P9DDR_PATTERN 0x00 // all outputs
#define P9DR_PATTERN 0x00 // all outputs set to 0
#define P90JV1ASK 0x01
#define P91 JvlASK 0x02
#defineFPC2010JFSEL_MASK 0x04 //0: EBI, 1: Uart
#defineFPC2010_RESET_MASK 0x08
//Display
#define DISP_RAM_SIZE 8 // Size of display register bank to use
#ifdef_EVALUALTION_BOARD
#defme DISP_DR PADR
#e!se
#define DISP_DR P5DR
#endif
//Display Commands
#define DISP_SYS_DIS 0x001 // 0b100000000000 inverted to 0b000000000001 #define DISP_SYS_EN 0x401 // 0b100000000010 inverted to 0b010000000001 #define DISP_LCD_OFF 0x201 // 0b100000000100 inverted to ObOOIOOOOOOOOl #defineDISP LCD ON 0x601 //0b100000000110 inverted to0b011000000001

#define DISP_B1 AS_.COM 0x4a1 //0b100001010010 inverted to Ob010010100001
//Timers
#define TIMER0_CONTROL 0x98 // default value
#define TIMER0JO_CONTROL 0x88 //default value
#define TIMER0JNT_CONTROL 0xf8 // default value, ail interrupts disabled
#define TIMER0_COUNTER 0x0000 // default vaiue, inital counter register value
#define TIMER0_MASK 0x01 // Used to start and stop timerO
//Finger print base address
#define FPC_BASE (CSO_base+0x300O0) // The flash Is remap to address 0 - 0x2ffff
#endif
7092.H
#ifndef__7092JH define _7092_H
#define SYSTEM CLOCK 33000000
constants

#define " Mode_Bits
#define Mode_FlQ
#define ModeJRQ
#defne Mode_SVC
#defina Mode_USR

0x1 F 0x11 0x12
0x13 0x10

#define !_Bit 0x80
#define F_Bit 0x40
#define SM 0
//
// MCU Base Address Map
//.
// 0x09001000 - Ox09001FFF Peripherals (APB bridge)
// 0x09001800 - 0x09001FFF Reserved
// 0x09001900 - 0X090019FF ADC register
// 0x09001800 - 0x090018FF ADC register
// 0x09001600 - 0x090017FF PIO register
// 0x09001600 - 0x090016FF SSI register
// 0x09001500 - 0x090015FF UART1 register
// 0x09001400 - 0x090014FF UARTO register
// 0x09001300 - 0x090013FF TIMER register
// 0x09001200 - 0x090012FF INTC register
// 0x09001100 - 0x090011FF WDT register
// 0x09001000 - Ox090010FF PMU register
// 0x09000000 - Ox09000FFF ASB Register
//0x09000400 - 0x09000FFF Reserved
// 0x09000300 - Ox090003FF ARM7TDMI Test register
// 0x09000200 - 0x090002FF FMI register
// 0x09000100 - 0x090001 FF SMI register
// 0x09000000 - 0xO9OO0OFF MCUC register
// 0x08050000 - Ox08FFFFFF Reserved
// 0x08040000 - OX0804FFFF On-Chip Boot ROM
// 0x08030000 - Ox0803FFFF On-Chip SRAM(4KB)
// 0x08000000 - 0XO802FFFF FLASH(192KB)
// 0x00000000 - 0x07FFFFFF Static Memory Area
//
//MODE0,1,2,3(SM=0)

// 0x07000000 - 0X07FFFFFF nCS7
// 0x06000000 - 0XO6FFFFFF nCS6
// 0x05000000 - OX05FFFFFF nCS5
// 0x04000000 - 0X04FFFFFF nCS4
// 0x03000000 - 0x03FFFFFF nCS3
// 0x02000000 - 0x02FFFFFF nCS2
// 0x01000000 - 0x01 FFFFFF nCS1
// 0x00000000 - OxOOFFFFFF nCSO (Remap=0)
// 0x00000000 - OxOOOOOFFF On-Chip SRAM(4KB) (Remap=1)
//
//MODE0,1,2,3(SM=1)
// 0x00700000 - 0X007FFFFF nCS7
// 0x00600000 - Ox006FFFFF nCS6
// 0x00500000 - 0x005FFFFF nCS5
// 0x00400000 - 0x004FFFFF nCS4
// 0x00300000 - 0xO03FFFFF nCS3
// 0x00200000 - Ox002FFFFF nCS2
// 0x00100000 - OxOOIFFFFF nCS1
// 0x00000000 - OxOOOFFFFF nCSO (Remap=0)
// 0x00000000 - OxOOOOOFFF On Chip SRAM(4KB) (Remap=1)
//
//MODE4,5{SM=0)
// 0x07000000 - 0x07FFFFFF nCS7
Si 0x06000000 - 0X06FFFFFF nCS6
// 0X05000000 - 0X05FFFFFF nCS5
// 0x04000000 - Ox04FFFFFF nCS4
// 0x03000000 - 0X03FFFFFF nCS3
// 0X02000000 - 0x02FFFFFF nCS2 - - . -
// 0x01000000 - 0x01 FFFFFF nCS1
// 0x00000000 - OxOOFFFFFF nCSO {Remap=0)
// 0x00000000 - OxOO02FFFF FLASH(192KB)
// 0x00000000 - OxOOOOOFFF On Chip SRAM(4KB) (Remap=1)
//

//MODE4,5(SM=1)
// 0x00700000 - 0X007FFFFF nCS7
// 0x00600000 - 0x006FFFFF nCS6
// 0x00500000 - 0x005FFFFF nCS5
// 0x00400000 - OX004FFFFF nCS4
// 0x00300000 - 0X003FFFFF nCS3
// 0x00200000 - 0X002FFFFF nCS2
// 0x00100000 - OxOOIFFFFF nCS1
// 0x00000000 - OxOOOFFFFF nCSO (Remap=0)
// 0x00000000 - OX0002FFFF FLAH{192KB)
// 0x00000000 - OxOOOOOFFF On-Chip SRAM(4KB) (Remap=1)
//
// MODE6.7 (SM=0)
// 0x07000000 - Ox07FFFFFF nCS7
I! 0X06000000 - OX06FFFFFF nCS6
// 0x05000000 - 0X05FFFFFF nCS5
// 0x04000000 - 0xD4FFFFFF nCS4
// 0x03000000 - 0x03FFFFFF nCS3
// 0x02000000 - 0x02FFFFFF nCS2
// 0x01000000 - 0X01FFFFFF nCS1
// 0x00000000 - OxOOFFFFFF nCSO (Remap=0)
// OxOOOOOOOO - OxOOOOOOFF On-Chip Boot ROM(256Byte) (default)
// 0x00000000 - 0x0002FFFF FLASH // 0x00000000 - OxOOOOOFFF On-Chip SRAM(4KB) (Remap=1)
//
//MODE6,7(SM=1)
// 0x00700000 - 0x007FFFFF nCS7
// 0x00600000 - 0X006FFFFF nCS6 ■-
// 0x00500000 - Ox005FFFFF nCS5
// 0x00400000 - OX004FFFFF nCS4
// 0x00300000 - Ox003FFFFF nCS3
// 0x00200000 - Ox002FFFFF nCS2
//0x00100000 - OxOOIFFFFF nCS1

// 0x00000000 - OXOOOFFFFF nCSO (Remap=0)
// 0x00000000 - OxOOOOOOFF On-Chip Boot ROM(256Byte) (default)
// 0x00001000 - OX0002FFFF FLAH(192KB) (FLASH=1)
// OxOOOOOOOO - OxOOOOOFFF On-Chip SRAM(4KB) (Remap=1)
//
#define ADC_base 0x09001700
#defme GPlO_base 0x09001600
#define UART1_base 0x09001500
^define UARTO_base 0x09001400
#defme TIMER_base0x09001300
#define INTC_base 0x09001200
#define WDT_base 0x09001100
#define PMU_base 0x09001000
#define PERI_base 0x09001000
#define ARM Jest 0x09000300
#define FMI_ctrl 0x09000200
#define BUS_ctrl 0x09000100
#define MCU_ctr! 0x09000000
#define BOOTROM_base 0x08040000
#define ISRAM„base 0x08030000
#define FLASH.base 0x08000000
#define EXCS__base 0x00000000
#ifSM==0
II—
// Static Memory Interface Map(16M) (OxOOOOOOOO - 0x07FFFFFF)
// SM=0
//.
#denne CS7J>ase 0x07000000
#defme CS6_base 0x06000000
define CS5_base 0x05000000
#define CS4_base 0x04000000

#define CS3_base 0x03000000
#define CS2_base 0x02000000
#define CSIjbase 0x01000000
#derlne CSO_base 0x00000000
#else
//.

// Static Memory interface Map(1M) // SM=1

(0x00000000 - 0x007FFFFF)

//-

#define CS7_base 0x00700000
#define CS6_base 0x00600000
#define CS5_base 0x00500000
#define CS4_base 0x00400000
#define CS3_base 0x00300000
#define CS2_base 0x00200000
#define CS1_base 0x00100000
#define CSO_base 0x00000000
#endif
ti-
ll ASB Register Memory Map (0x09000000 - 0x09000FFF)
ti¬ll-

IIMCU control Map
//

(0x09000000 - OX090000FF)




#define PAMR
#define PBMR
#define P1MR-
#define P2MR
#define P3MR
#define P4MR
#define P5MR
#define P6MR

((volatile unsigned int*)(MCU_ctrl+0x00)) ((volatile unsigned int*)(MCU_ctrl+0x04)) ((volatile unsigned int*)(MCU__ctrl+0x08}) ((volatile unsigned int*)(MCLLctrl+OxOC)) ((volatile unsigned lnt*)(MCU_ctrl+0x10)) ((volatile unsigned int")(MCU_ctrl+0x14)) ((volatile unsigned int")(MCU__ctrl+0x18)) ((volatile unsigned int*)(MCU__ctrH-0x1C))

#deflne P7MR ((volatile unsigned int*)(MCU_ctri+0x20))
#defme P9MR ((volatile unsigned int*)(MCU_ctri+0x24))
#define P9MR ((volatile unsigned int*)(MCU_ctrl+0x28))
#define DCR ((volatile unsigned int*)(MCU_ctrl+0x2C))
fi-

ll SMI Register Map (0x09000100 - 0x090001FF)
//.
//31 30 29 28 27 26 24 23 22-20 19-16 //15 14 13 12 11 10 8 7 6-4 3-0 // RDON CSCNTL Falsh ExpCLK MemWidth BurstEn BurstWait NorWait
// led CSON
// CSON
#define BCR0
#define BCR1
#defme BCR2
#define BCR3
#define BCR4
#define BCR5
#define BCR6
#define BCR7
LCD Wait (21-16)
((volatile unsigned int*)(BUS_ctrl+0x00)) ({volatile unsigned int*)(BUS„ctri+0x04)) ((volatile unsigned int*)(BUS„ctri+0x08)) ((volatile unsigned int*)(BUS_ctrl+0x0C)) ((volatile unsigned int*)(BUS_ctrl+0x10)) ((volatile unsigned int*)(BUS_ctrl+0x14)) ((volatile unsigned int*)(BUS_ctrl+0x18)) ((volatile unsigned int*)(BUS_ctrl+0x1C))

ti-
ll FMI Register Map (0x09000200 - Ox090002FF)
//__
II FSTATPWRR {HVEEI, LVEEI, LVCC_RST, VEEIOPT[1:0], VPPDOPT[1:0], VPPIOPT[1:0]}
// S S S P P P
II S: status(Read only); P ■: Power option register(Read/Write)
#define FMWR ((volatile unsigned int*XFMI_ctrl+0x00)) // RAV : Bus wait
control register
#define FMAR ((volatile unsigned int*)(FMt_ctrl+0x04)) // WRITE : ADDRR,
DATAR address, READ : ADDRR

#define FMDR
DATAR(read only register)
#define FMCR
control register
#define FEBR
block register
#define FMPR
status power option register.
#define FMTR
register

{{volatile unsigned int*)(FMI_ctrl+0x08)) // READ
((volatile unsigned int*){FMI_ctrl+0x0C)) // R/W : flash
((volatile unsigned int*)(FMI_ctrl+OxlO)) // R/W : flash erase
((volatile unsigned inf)(FMI_ctri+0x14)) //
((volatile unsigned int*)(FMI_ctrl+0x18)) // R/W : flash test

li-

lt Peripherals (APB bridge) Map (0x09001000 - 0x09001 FFF)
ti¬ll-
//PMU Map
//-
(0x09001000 -0X090010FF)
#define PMUST ((volatile unsigned int*)ase+0x00))
// PMU operation mode control register
#define PMUCR ((volatile unsigned int*}(PMU_base+0x00))
// PMU operation mode control register
#define MEMCR ((volatile unsigned int*)(PMU_base+0x10))
// Remap Control Register
#define RSTCR ((volatile unsigned int*)(PMU_base+0x30))
// Soft Reset Control Register
#define PCKCR ((volatile unsigned int*)(PMU_base+0x08))
// PCLK control register
ti-

ll Watch-Dog Timer (WDT) Map
//.
#define WTCR
// Timer/Reset Control Register(R/W)

(0x09001100-0x090011FF)
((volatile unsigned int*)(WDT_base+0x00))

#define WTSR
// Reset Status Register(R) tfdefine WTCNT
// Timer Counter Register(R/W)

((volatile unsigned int*)(WDT_base+0x04)) ((volatile unsigned int')(WDT_base+0xQ8))

ti-
ll Intmipt Controller (INTC) Map
//
(0x09001200 - 0x090012FF)
#define GMR
// Global Mask Register
#define TMR
// Trigger Mode Register
#define TPR
II Trigger Polarity Register
#define IDR
// Interrupt Direction Register
#define FSR
// FIQ Status Register
#define ISR
//IRQ Status Register
#define FMR
// FIQ Mask Register
#define (MR
// IRQ Mask Register
#def?ne 1SCR
// Status Clear Register
#define 1BJRQ0 0x00001
#define IBJRQ1 0x00002
#deflne IBJRQ2 0x00004
#define IBJRQ3 0x00008
#define IBJRQ4 0x00010
#define IB IRQ5 0x00020
((volatile unsigned int*)(lNTCJ>ase+0x00)) ((volatile unsigned int*)(INTC_base+0x04» ((volatile unsigned int*)(INTC_base+0x08)) ((volatile unsigned int*)(INTC_base+0x0C)) ((volatile unsigned int*)(!NTC_base+Ox10)) ((volatile unsigned lnt*)(lNTCJ>ase+0x14)) ((volatile unsigned int*)(INTC_base+0x18)) ((volatile unsigned int*)(INTCJjase+0x1C)) ((volatile unsigned int*}(INTC_base+0x20)}

#define IBJRQ6 0x00040
#define IBJRQ7 0x00080
#deffne IB_COMTX 0x00100
#define IB_COMRX 0x00200
#define IB_WDT 0x00400
#defme IB_UARTO 0x00800
#define IB_UART1 0x01000
#define IB_ADC 0x02000
#define IB_TIMERO 0x04000
#define IB_T1MER1 0x08000
#define IB_TIMER2 0x10000
#define IB_TIMER3 0x20000
#define !B_TIMER4 0x40000
#define IB_TIMER5 0x80000
#defins 1B_SWI 0x100000
#define IB_EXIRQ OxOOOOff
#defme )B_TtMERjVLL OxOfcO
#define IDJRQO 0x00
#define IDJRQ1 0x01
#define IDJRQ2 0x02
#defme IDJRQ3 0x03
#define IDJRQ4 0x04
#define IDJRQ5 0x05
#define IDJRQ6 0x06
#deflne IDJRQ7 0x07
#deftne ID_COMTX 0x08
#deflne ID_COMRX 0x09
#define ID_WDT OxOA
#define ID_UART0 OxOB
#define IDJJART1 OxOC
#defme ID ADC OxOD

#define ID_TIMERO OxOE
#define IDJIMER1 OxOF
#define ID_TIMER2 0x10
#define ID_TIMER3 0x11
#define ID_TIMER4 0x12
#define ID_TIMER5 0x13
#define ID SWI

0x14

//-
II TIMER Register Map (OxFFFFFOOO - OxFFFFFFFF)
II
//«
// [ Timer register description ]
It TSTARTR: Timer start register
//TSYNCR : Timer sync register
// TPWMR : Timer PWM register
//
// Timer control register
// TCRx : [7],[4:3]: reserved (init vaule all 1)
// [6:5] : 00 ->free running
// 01 ->clear by GRA commatJPA input capture
// 10 ->clear by GRB commatJPB input capture
/; 11 ->cleared by other sync timer
II [2:0] : 000->intclk1 (BCLK/2),001->int_cl) // 010->int_c1k3(/8), 011->int_clk4(/16)
// 100->ext_clk1, 101 ->ext_clk2
// ■ 110->ext_clk3, 111->ext_clk4 -
//-
II I/O control register
//TIOCRx -.[71,131 -.reserved (init vaule all 1)
// [6:4] : 000->pin output disable at commat
// 001->0 GRB match,01O->1 GRB match

// // // // // //-■

[2:0]

011->toggleGRB match 100->GRB capture at rising 101->GRB capture at failing 110->GRB capture at both egde : Same as [6:4], for GRA

// Timer interrupt enable register
// //
//
12} [1] 10]
// TIERx ; [7:3] ; reserved (init vaule all 1)
interrupt from OVFI{V.enable,0:disable) interrupt from MCIB(1 :enable,0:disable),GRB interrupt from MCIA(1 ;enabte,D:disable),GRA

//TSRx:[7:3]
// [2]
// [1]
// [0]
//
//Timer status register
reserved (init vaule all 1) OVFI status MCIB status MCIA status
//TCOUNTx : Timer count (16bit) // GRAx,GRBx: General register (16bit)

//-
#define TSTARTR
//Timer Start Register #define TSYNCR
// Timer Synch Register #deftne TPWMR
// Timer PWM mode Register
#define TCRO
// Timer Control Register
#define TIOCRO
// Timer I/O Control Register

((volatile unsigned int*)(TIMER_base+0x00)) ((volatile unsigned int*)(TlMER_base+0x04)) ((volatile unsigned lnt*)(TlMER_base+0x08)}
((volatile unsigned int*)(TIMER_base+Ox20)) ((volatile unsigned int*)(TIMER_base+0x24))

#define TIERO
// Timer Interrupt Enable Register
#define TSRO
// Timer Status Register
#define TCNTO
// Timer Counter #define GRAO
// General Register A #define GRBO
// General Register B
#define TCR1
// Timer Control Register #define TIOCR1
// Timer I/O Control Register #define TIER1
// Timer Interrupt Enable Register #define TSR1
// Timer Status Register #define TCNT1
// Timer Counter #define GRA1
// General Register A #define GRB1
// General Register B
#define TCR2
// Timer Control Register
#define TIOCR2
// Timer I/O Control Register
#define TIER2
// Timer Interrupt Enable Register

((volatile unsigned int*)(TlMER_base+0x28)) ((volatile unsigned int*){TIMER_base+0x2C)) ((volatile unsigned int*}(TIMER_base+0x30)) ((volatile unsigned int*)(TIMER_base+0x34)) ((volatile unsigned int")(TlMER_base+0x38))
((volatile unsigned int*)(TIMER_base+0x40)) ((volatile unsigned int*}(TIMER_base+0x44)) ((volatile unsigned int*)(TlMER_base+0x48)) ((volatile unsigned int*)(TIMER_base+0x4C)) ((volatile unsigned int*)(TIMER_base+0x50)) ((volatile unsigned int*)(TIMER_base+0x54)) ((volatile unsigned int*)(TIMER_base+0x58))
((volatile unsigned int*)(TIMER_base+0x60)) ((volatile unsigned int*)(TIMER_base+0x64)) ((volatile unsigned int*)(TIMER_base+0x68))

#define TSR2
// Timer Status Register
#deftne TCNT2
// Timer Counter
#define GRA2
// General Register A
#define GRB2
// General Register B
#define TCR3
// Timer Control Register
#define TIOCR3
// Timer I/O Control Register
#define TIER3
// Timer Interrupt Enable Register
#define TSR3
// Timer Status Register
#define TCNT3
// Timer Counter
^define GRA3
//General Register A
#define GRB3
// General Register B
#define TCR4
// Timer Control Register
#define TIOCR4
//Timer I/O Control Register
#define TIER4
//Timer Interrupt Enable Register
#defins TSR4
// Timer Status Register

{(volatile unsigned int*)(TIMER_base+0x6C))
((volatile unsigned int*)(TIMER_base+0x70))
((volatile unsigned int*)(TIMER_base+0x74))
((volatile unsigned int*)(TIMERJ)ase+0x78))
((volatile unsigned int*)(TlMER_base+0x8u))
((volatile unsigned int*)(TlMER_base+0x84))
((volatile unsigned int*)(TIMER_base+0x88))
{(volatile unsigned int*)(TIMERJ>ase+0x8C))
((volatile unsigned int*)(TIMER_base+0x90))
((volatile unsigned int*)(TIMER_base+0x94))
((volatile unsigned int*)(TIMER_base+0x98)J
((volatile unsigned int*)(TIMER_base+OxAO))
((volatile unsigned int*)(TIMER_base+0xA4))
((volatile unsigned int*)(TIMER_base+0xA8))
((volatile unsigned int*)(TiMER_base+OxAC))

#define TCNT4
//Timer Counter
#define GRA4
// General Register A
#define GRB4
//General RegisterB
#define TCR5
// Timer Control Register
#define TIOCR5
// Timer I/O Control Register
#define TIER5
// Timer Interrupt Enable Register
#define TSR5
II Timer Status Register
#define TCNT5
// Timer Counter
#define GRA5
// General Register A
#define GRB5
// General Register B

({volatile unsigned int*)(TIMER_base+OxBO))
((volatile unsigned int*)(TIMER_base+0xB4))
((volatile unsigned int*)(TIMER_base+0xB8))
((volatile unsigned int*)(T!MER_base+OxDO))
((volatile unsigned int*)(TlMER_base+0xD4))
((volatile unsigned int*)(TlMER_base+0xD8))
((volatile unsigned int*)(TlMER_base+OxDC))
((volatile unsigned int*)(TIMER_base+OxEO))
((volatile unsigned int*)(TIMER_base+0xE4))
((volatile unsigned int*)(TIMER_base+0xE8))

//-

// UART Register Map

(0x09001400 - 0X090015FF)



//-
#define RBR
#define THR
#define DLL
0)


0X00 0x00 0X00
// Receiver Buffer Reg. (R DLAB =
// Transmitter Holding Reg. (W DLAB = 0) // Divisor Latch LS (R/W DLAB = 1)

#define IER 0X04
#define DLM 0x04 // Interrupt Enable
DLAB = 0)
// Divisor Latch MS (R/W DLAB - 1)
#define IIR 0x08
#define FCR 0x08 // Interrupt Ident Reg. (R)
// Divisor Latch MS (R/W DLAB = 1)
#define LCR 0x0c // Line Control Reg. (R/W)
#define LSR 0x14 // Line Status Reg. (R/W)
#define SCR 0x1 C // Scratch Reg.
#define CLKCR 0x20 // CLK generation Control Reg.
#define CLKDR 0x24 // CLK divisor Reg.
#define LSR_DR 0x01
tfdefine LSR_THRE 0x20
#define LSR_TEMPT0x40
#define 1ER_TIE 0x02
#define IER RIE 0x01
//-

//UARTO Register Map
//.

(0x09001400 - Ox090014FF)




#define UORBR
#define U0THR
#define U0DLL
#define UOIER
#define UODLM
#define UOIIR
#define UOFCR
#define UOLCR
#define UOMCR
#define UOLSR
#define UOMSR

((volatile unsigned ((volati)e unsigned ((volatile unsigned ((volatile unsigned ((volatile unsigned -((volatile unsigned ((volatile unsigned ((volatile unsigned ((volatile unsigned ((volatile unsigned ((volatile unsigned

int*)(UART0. int*)(UARTO. inrXUARTO. int*)(UART0. int*}(UART0. lnt*)(UART0. int*)(UART0. int*)(UART0. int*)(UART0_ int*)(UART0. int*)(UART0.

,base+RBR)) _base+THR)) _bas©+DLL)) .base+lER))
.base+DLM))
.base+IIR))
.base+FCR))
,base+LCR))
_base+MCR))
.base+LSR))
.base+MSR))



#define P1DR
// P1 Data Register
#define P1DDR
//P1 Data Direction Register
#define P2DR
// P2 Data Register
#define P2DDR
// P2 Data Direction Register #define P3DR
// P3 Data Register #define P3DDR
// P3 Data Direction Register
#define P4DR
IIP4 Data Register
#define P4DDR
// P4 Data Direction Register #define P5DR
// P5 Data Register #define P5DDR
// P5 Data Direction Register #define P6DR
// P6 Data Register #define P6DDR
// P6 Data Direction Register
#define P7DR
// P7 Data Register #defme P7DDR
// P7 Data Direction Register
#define P8DR
// P8 Data Register
#define P8DDR
// P8 Data Direction Register

((volatile unsigned irrt*)(GPlO_base+0x1G)) ((volatile unsigned inr)(GPIO_base+0x14)) ((volatile unsigned int*)(GPIO_base+0x18)) ((volatile unsigned int*)(GPIO_base+0x1C)) ((volatile unsigned int*)(GPIOJ)3se+0x20)) ((volatile unsigned int*)(GPIOJ)ase+0x24)) ((volatile unsigned int*)(GP!O_base+0x28)) ((volatile unsigned int*)(GPIO_base+0x2c)) ((volatile unsigned int*)(GPIO_base+0x30)} ((volatile unsigned int*)(GPIO_base+0x34)) ((volatile unsigned lnt*)(GPiO_base+0x38)) ((volatile unsigned int*)(GP!O_base+0x3C)) ((volatile unsigned int*)(GP!O_base+0x40)) {(volatile unsigned int*)(GPIO_base+0x44)) ((volatile unsigned int*)(GPlO_base+0x48)) ((volatile unsigned int*)(GPIO_base+0x4c})

#define P9DR
// P9 Data Register
#define P9DDR
It P9 Data Direction Register
//
// ADC Register Map
//.
#deflne ADCSR
//ADC Control & Status Register #define ADCCR
// ADC Control Register #define ADDRO
//ADC Data Register0 #define ADDR1
11 ADC Data Register 1 #define ADDR2
// ADC Data Register 2 #define ADDR3
//ADC Data Register3 #define ADDR4
//ADC Data Register4
#endif UTILITY.C
/*' Miscellaneous utilities */
include "bpg.h" #include "display, h"

((volatile unsigned int*)(GPiO_base+0x50)) {{volatile unsigned int*)(GPIO_base+0x54))
(00x09001700 - 0x090017FF) ((volatile unsigned int*)(ADC_base+0x00)) ((volatile unsigned int*)(ADC_base+0x04» {(volatile unsigned int*)(ADC_base+0x08)) ((volatile unsigned int*)(ADC_base+0x0c)) ((volatile unsigned int*)(ADC_base+0x1O)) {{volatile unsigned int*)(ADC_base+0x14)) ((volatile unsigned int*)(ADCJ>ase+0x18))

void delay(int count)

{
I* loop; asm {V
I* subs r0,r0,#1 V
/* bgt loop V
I* }7
while(count) { count = count -1;
/* count-; This constaiction does not work ? */ } >
void message(char * s)
{ writers);
delay(2*WRITEJ)El_AY); writef "); delay(WRlTE_DELAY); write(s);
delay(2*WRITE_DELAY); write(n "); delay[WRiTE_DELAY); write("reAdy"); delay(2*WRITE_DELAY);
}
unsigned int battery_check(void) {
unsigned int battery_status; unsigned int power__status;
power_status = *PADR & POWER_NCHAG_MASK; battery_status = *PADR & POWER_NBATTLO_MASK;

if (power_status) { if (battery_status) { return 0;
} else{
messageCBAtt Lo"); return 1;
>
>
return 0;
} TIMER.C
/* Timer utilities 7
#include "7092.h" #include "bpg,h" #include "timer.h"
void timerO_init{void) {
*TCR0 = TIMER0_CONTROL; // free running mode "TIOCR0 =TIMER0_IO_CONTROL; // dont care in free running mode *TIER0 = TIMER0JNT_CONTROL; //disable all interrupts *TCNT0 = TIMER0_COUNTER; // clear counter register
y - - -
RETARGET.C
r
** Copyright (C) ARM Limited, 2001. All rights reserved.

7
r
** This implements a 'retarget' layer for low-level 10. Typically, this ** would contain your own target-dependent implementations of fputcQ,
** ferror(), etc.
**
** This example provides implementations of userjnittal_stackheap().
**
*/
include #include
extern unsigned int bottom__of_heap;
valuejnjegs struct initial_stackheap USer_jnttial_stackheap(
unsigned RO, unsigned SP, unsigned R2, unsigned SL)
{
struct initial_stackheap config;
config.heap_base = (unsigned int)&bottom_pf_heap; // defined in heap.s
// placed by scatterfile config.stack_base = SP; // inherit SP from the execution environment
return config; }
r
Below is an equivalent example assembler version of userjnitiat_stackheap.
it will be entered with the value of the stackpointer in r1 (as set in inits),
this does not need to be changed and so can be passed unmodified out of the

function.
IMPORT bottom_ofJieap
EXPORT userJnttia(_stacKheap
user_initia!_stackheap
LDR rO,=bottom_of_heap MOV pejr
V
RANDOM.C
/* linear congruential generator. Generator x[n+1] ~ a * x[n] mod m 7
include "random.h" include "math.h"
static unsigned Int SEED = 93186752;
double random (void)
{
I* The following parameters are recommended settings based on research
uncomment the one you want. 7
static unsigned int a = 1588635695, m = 4294967291U, q - 2, r = 1117695901; r static unsigned int a = 1223106847, m = 4294967291U, q = 3, r = 625646750;*/ r static unsigned int a = 279470273, m = 4294967291U, q = 15, r - 102913196;*/ r static unsigned int a ~ 1583458089, m = 2-147483647, q = 1, r = 564025558; 7 r static unsigned int a = 784588716, m = 2147483647, q = 2, r = 578306215; 7 r static unsigned int a = 16807, m = 2147483647, q = 127773, r = 2836; 7 r static unsigned int a = 950706376, m - 2147483647, q - 2, r = 246070895; 7
SEED = a*{SEED % q) - r*{SEED / q);

return {(double)SEED / (doub]e)m); }
void rand_seed (unsigned int init) {if (init != 0) SEED = init;}
// token
double token(double x) {
double v = 100000000000LL; double d = 0; double g = 0;
x - (tempa*x) + tempo;
while(x>=1Q00){ d = x-(10*floor(x/10)); if(x g-(10*g)+d;
v=v/10;
} x=(x-d)/10;
}
return g; }
PORT.C
/* Display utilities */
#indudeN?092.h' include "bpg.h"

void port_init() {
//Port control
*PADR = PADR_PATTERN; *PADDR = PADDR__PATTERN; -PBDR = PBDR_PATTERN; *PBDDR = PBDDR_PATTERN; *P1DR = P1DR_PATTERN; *P1DDR = P1DDR_PATTERN; *P2DR = P2DR_PATTERN; *P2DDR = P2DDRJ=>ATTERN; *P3DR = P3DR_PATTERN; *P3DDR - P3DDR_PATTERN; *P4DR ~ P4DR_PATTERN; •P40DR= P4DDR_PATTERN; *P5DR = P5DR_PATTERN; *P5DDR = P5DDR_PATTERN; *P6DR » P6DR_PATTERN; *P6DDR = P6DDR_PATTERN; *P7DR = P7DR_PATTERN; *P7DDR = P7DDR_PATTERN; *P8DR = P8DR_PATTERN; *P8DDR = P8DDR_PATTERN; *P9DR = P9DR_PATTERN; *P9DDR = P9DDR_PATTERN;
//Mux control
*PAMR = PAMR.PATTERN; *PBMR = PBMR_PATTERN; *P1MR = P1MR_PATTERN; *P2MR = P2MR_PATTERN; *P3MR = P3MR_PATTERN; *P4MR ~ P4MR_PATTERN;

•P5MR = P5MR_PATTERN
*P6MR = P6MR_PATTERN; *P7MR = P7MRJ>ATTERN; *P8MR = P8MR_PATTERN; *P9MR = P9MR_PATTERN;
}
MAJN.C
/*
* Smart Card pin code generator with finger print access control
* Copyright (C) 2001 DELTA IC Design, All Rights Reserved.
* $Author: Ibm $ :
* $ld: print.asm,v 1.12 2002/11/21 14:29:14 Ibm Exp $ :
it
7
#include "typdefs.h" include "bpg.h" include "utffity.h" include "port.h" ffinclude "display.h" #include "timer.h" include "random.h" include "fpc2010biomain.h" #include "fpc2010interface.h' include "encapsulated^alg.h" include "fpc2010registers.h"

unsigned char disp_ram[DISP_RAM_SlZE]; unsigned char template[TEMPLATE_SIZEJ;
void waitJor_flnger_detected() {
while{!(*P8DR & FPC1030_SIRQ_MASK)) { } }
void test() {
char str[9];
unsigned int tok = 2674834;
unsigned int rand;
bool result;
port_init();
timerOJnitQ; START_TIMERO;
displayjnit();
writefreAdy");
deiay(2*WR)TE_DELAY);
#ifndef DEBUG
#ifndef_EVALUALTION_BOARD
battery_check(); #endif
STOP_TIMER0;

rand_seed(*TCNTO);
rand = RAND JNT(10000000,99999999);
tok = rand;
fpc2010lnit();
wait_for_finger_detected(); result = fpc2010Enrol(template);
If ((result) {
write("Errar"); }else{
write("Good");
} delay(2*WRITE_DELAY);
write("yyyyyyyy"); de!ay(2*WRITE_DELAY);
while{1){
tok = (unsigned int)token((double)tok);
itoa(tok, str);
write(str);
delay(2*WRITE_DELAY);
write("12345678");
delay{WRITE_DEiAY);
writeC'reAdy");
delay(2*WRITE_DELAY);
write("Good");
delay(2*WRITE_DELAY);
write("Good-1");
delay(2*WRITE_DELAY);

writeCGood-2");
delay(2*WRITE_DELAY);
writefError");
delay(2*WRITE_DELAY);
write{nrejectedM);
delay(3*WRITE_DELAY);
write("BAtt Lon);
delay(3*WRITE_DELAY);
wait_for_finger_detectedO; result = tpc2DlOVerify( template); if ((result) { write("reiected"); }
display_test();
#ifdef _EVALUALTION_BOARD *P7DR = *P7DR A EVALJ_ED_MASK; // Toggle evaluation board led
#endif
} #endif
}
void picard_app)ication() {
char str[9]; -
unsigned int tok = 2674834;
unsigned int rand;
bool result;
portjnitQ;

timerOJnitQ;
SrARTJTIMERO;
display_init(}; fpc2010lnit{);
if (!battery__checkO) {
write("reAd/'); de1ay(2*WRITE_DELAY); }
error:
// 1st step; create template
battery_check();
wait_for_finger_detected{);
result = fpc2010Enrol(template);
if ('result) { message("Error"); goto error;
}
wrftefGood");
delay(2*WRITE_DELAY);
// 2nd step: verify template the 1st time battery_check(); wait_for_finger_detected(); result = fpc2010Verify(template);
if (iresult) {
message("Error"); goto error;

>
write{nGood-1"); delay(2*WRITE_DELAY);
// 3nd step: verify template the 2nd time battery_check(); wa/t_for_finger_def.ected(); result = fpc2010Verify(template);
if ('result) {
message("Error"}; goto error;
}
writefGood-2");
delay(2*WRITE_DELAY);
// Now we have a useable template
// The first time a finger print can be verrfied successfully
// a random number is generated.
error_verify:
battery_check();
waitJwJingevjdetectedO; result = fpc2010Verify(template); if ((result) {
message("rejectedH);
goto errorj/erify;
>■
// Generate random number using seed from timer
STOP_TIMER0;
rand_seed(*TCNTO);
rand = RANDJNT(10000000,99999999);

tok = rand; itoaftok, str); write(str);
// Generate random numbers using SMI algorithms // each time a finger print is recognized while(1) {
battery_check();
waitJor_finger_detected ();
result = fpc2010Verify(temp)ate);
if ('result) { messagefrejected");
}
else{
tok = (unsigned int)token((double)tok); itoa(tok, str); write(str); } } }
int mafn(void)
{ *BCR0 = BCRO_PATTERNr'
// test(); picard_applic'ation();
}
INT HANDLER.C

/********»** it* ************************************ **********!*(
/* File: int_handler.c */
/* Purpose: IRQ interrupt handler code 7
/***** ********************** ****************************** *****/
include "7092.hn r to use with the Hynix HMS39C7092 7
extern intlntCTI; extern int lntCT2;
/* *t ********** * *« **** *********** *** ***** ** * ** **■** ** * ** ft****** *#* * * ** *** ***** **#
* IRQHandler
* *
* This function handles IRQ interrupts. In this example, these may come from *
* Timer 1 or Timer 2.
* *
* This handler simply clears the interrupt and sets corresponding flags. *
* These flags are then checked by the main application. *
* *
*******************************************************************************/
void irq IRQ_Handler(void)
{ unsigned status;
status = *1SR;
/* Deal with source of interrupt */
if (status &IB_TIMER1)
{ *ISCR = IB_TIMER1; /* clear the interrupt 7
}
else if (status &IB_TIMER2)
{

*1SCR = IB_TIMER2; /* clear the interrupt V } }
FPC2010INTERFACE.C
//.
// Copyright (C) 2003 Fingerprint Cards AB. Ail Rights Reserved
//
//
// The information contained herein is confidential property of
// Fingerprint Cards AB. The use, copying, transfer or disclosure of such
// information is prohibited exceptby express written agreement with
// Fingerprint Cards AB.
//
//.
II File: fpc2010interface.c
//
// Description: interface driver for the FPC2010 ASIC.
//
// Hardware platform: FPC6430
//
//.
include "bpg.h" include "typdefs.h" ffinciude "utility.h"
include "fpc201ubiomain.h" include nfpc2010interface.h" include "fpc2010registers.h" ffinciude "encapsulated_alg.h"

/************* ************************ ****************,,»********** »*
* Retrieves the content of the Result RAM in FPC2010.
*
* @param buffer - Memory area to fill with the Result RAM content
******** ************************************************ *************/
void UploadVerResultRAMContent(u_char 'buffer)
{
int current_byte;
*VerResultAddrPointer = 0;
for (currenLbyte = 0; current_byte { buffeitcurrent_byte] = 'VerResultReadData;
} } /* UploadVerResultRAMContent */
/************* *** * *** ***** ** ********* * ** *** ***** ** ******** * ***** *** *
*
* Loads FPC2010 with data to work with during verification.
* @param *tempiateBuffer - Memory area for the template data
*
*********************************************************** **********/ void DownloadVerData(u_char *templateBuffer)
{
u_charFPC2010_ver_dataEFPC2010_WORK_RAM_SIZE];
int currentjayte;
PreVerify(templateBuffer, FPC2010_ver_data);

*WorkRAMAddrPointer = 0;
for (current_byte = 0; current_byte •WorkRAMWriteData = FPC2010_ver_data[currenr_byte];
}
} I* DownloadVerData */
lie**** ****** *** *** *** ** ******** **.** * ** *** *** * ****** * ** *** ******** ** *
*
* Uploads the result from an enrolment from FPC2010.
*
* @param "enrolResult - Memory area to store the enrolment data.
*
♦MM*******************************************-*********************;
void UploadEnrolResult(u_char *enrolResult)
{
Int currentjjyte;
*WorkRAMAddrPointer = 0;
for (current_byte = 0; current_byte {
*enrolResult = *WorkRAMReadData;-
enrol Result++; }
} /* UploadEnrolResult V

i*** ************************* *********** ****************************
*
* Clears FPC2010 interrupt register.
********************************************************************** i
void ClearlRQReg(void)
{
int irq_reg_tmp = 0;
irq_reg_tmp = *(volatile addr8) Interrupt; //Read IRQ_REG in order to clear it irq_reg_tmp = '(volatile addr8) Interrupt;
}/*Clear1RQReg*/
/I*******************************************************************
*
* Enables all the interrupts in FPC2010.
*
***** * ** ** **** ** *** *** *** ** ****** **** **** *** * *** ** ****** * ** *** * *******/
void SetlRQMask{void)
{
int lrq_read;
'InterruptMask = OxFE; //Write IRQ mask FE = enable all
irqj-ead - *lnterruptMask; //Read back IRQ mask in order to verify.
JTSetlRQMask*/
J******* ****** **** ****** ** ******* ********* *** ** **** * * ** ******** *** ***
*

* Perform a software reset for FPC2010.
*
**** *# * *** ****** # ***** *** ** **** **** ******** * *■*** ******* * * *** ********** i
void SWResetfvoid)
{ int irqmask = 0;
irqmask = '(volatile addr8) InterruptMask;
*SwReset»1;
irqmask = '(volatile addr8) InterruptMask;
} r SWReset 7
(in* ***************** ****************************************** ****** *
* Sets up parameters for the line line sensor.
*
* @param detect - Value for the line sensors DETECT register.
* @param drive - Value for the line sensors DRIVC register.
' @param adcref - Value for the line sensors ADCREF register.
********************************************************************* I void SetUpLi'neSensorStartUp(int detect,int drivc,int adcref) {
ResetLineSensorQ; SetUpLineSensor{); ■ SetUpLineSensorDETECT(detect);
SetUpLineSensorDRIVC(drivc); SetUpLineSensorADCREF(adcref);
} r SetUpLineSensorStartUp 7

** **«*****«fc ****************** ************ **** ******* *************
* Sets up the parameters for the line sensor interface.
*
*********************************************************************
void SetUpLineSensor{void) {
•WaitCycles - WAIT_REG_VALUE; *StartCyc!es = START_CYCLE_VALUE; XloseCycies = CLOSE_CYCLE_VALUE; XlockDevisor= CLOCKJDEVISOR;
}/*SetUpLineSensor*/
J*****************************'************************************** *
* Reset the line sensor by writing to the Reset register.
it*******************************************************************/ void ResetLineSensor(void)
{
*SensorReset = 1;
// uncaLdelay(50); //Wait for reset to finish. delay(50); //Wait for reset to finish. } I* ResetLineSensor */
)**** ************* ********************* **********■**+* *******+* ******

* Sets up the line sensor detect value.
* @param value - The value for the detect register.
*
*** * ** * ****** ***** * ************ *** *** *+** * ** * A-**-** ****** ********* ****
void SetUpLineSensorDETECT(int value) {
*SensorParameterJ-SB = (unsigned char)value; *SensorCommand = WRITEJ3ETECT; PolllRQReg(IRQ_SENSOR_COMPLETE);
} /* SetUpLineSensorDETECT 7
* Sets up the line sensor drive_c value.
* @param value - The value for the drivjc register.
*
*********************************************************************** void SetUpLlneSensorDRIVC(int value) {
*SensorParameter_LSB = (unsigned char)value; *SensorCommand = WRITE_DRIVE_C; PolllRQReg(lRQ_SENSOR_COMPLETE);
} r SetUpLineSensorDRIVC 7
I*******************************************************************

* Sets up the line sensor adc_ref value.
it
* @param value - The value for the adc__ref register.
**** * * * **** ft* * ** ****** ***** ** ***** *** ** *** *** ** *** *** **** *********** *i
void SetUpLineSensorADCREFfint value) t
*SensorParameterJ-SB = (unsigned char)value; *SensorCommand = WR!TE_ADC__REF; Po!IIRQReg(IRQ_SENSOR_COMPLETE);
} I* SetUpLineSensorADCREF 7
* Polls the Interrupt flags for the FPC2010 and returns after the flag
* has been set.
*
* @param irq - One or more interrupt flags to poll (interrupt mask).
*
it*-************************************************************************/ void PolllRQReg(unsigned char irq)
{
unsigned char irq_regjmp;
irq_reg_imp = (unsigned char)( irq & *(volatile addrS) Interrupt);
//Wait for IRQ flag to be set while (irq_reg Jmp =- 0)
{

ircL-re3__tmp = (unsigned char){ irq & '(volatile addr8) Interrupt); i
irq_reg_tmp = '(volatile addr8) interrupt; } r PolllRQReg V FPC2010BIOMAIN.C
/*
* Smart Card pin code generator with finger print access control
* Control function for hardware FPC2010 with sensor FPC1030
* Copyright (C) 2001 DELTA IC Design, All Rights Reserved.
* SAuthor: Ibm $ :
*
* $ld: prlntasm.v 1.12 2002/11/21 14:29:14 Ibm Exp $ :
+
7
#inciude "bpg.h" #inciude "typdefs.h" include "utility.h"
#include "fpc2010biomain.h" #include "fpc2010interface.h" #include "encapsu!ated_alg.h" ffinclude "fpc2Q10registers.h"
*
* Turn on the MCK out dock. Starts the FPC2010.

********************************** **********************!***** **(
voidfpc2010On(void)
{ *P9DR = *P9DR | FPC2010_RESET_MASK; // De-assert reset pin *P6MR = *P6MR & -FPC2010_CLOCK_MUX_MASK; // Set pin as clock output
}/*fpc2010On*/
/**** **** ********** ***** ** ** ** **** ******** ** **** * ********** ***** *
*
* Turn off the MCK out clock. Stops the FPC2010.
****** **************************** ******************** ***********
voidfpc2010Off(void) {
*P6MR = *P6MR | FPC2010_CLOCK_MUX_MASK; // Set pin as io pin *P6DDR = *P6DDR & ~FPC2010_CLOCK_MASK; // Set io pin as output *P6DR = *P6DR & ~FPC2010_CLOCKJ/IASK; // Set data low
*P9DR = *P9DR & ~FPC2010_RESETJVIASK; // Assert reset pin
// This is done in order to set the LVDS IO in // FPC2010 in power down mode. The RESET_PIN // only resets FPC2010 if the clock is active.
>/*fpc2010OffV
t**± * * ** ****** ** * *** ************ **** ** **** * ** * ************ *******
*
* Initializes the FPC2010. Sets up the swipe sensor and
* uploads a register file necessary for the device's execution.

voidfpc2010lnit(void)
{
unsigned char mem_cmd=0;
fpc2010On();
ClearlRQRegO;
SWReset(); SetlRQMask();
SetUpLineSensorStartUp(DETECT_STARTUP_VAL, DRIVC_STARTUP_VAL,
ADCREF_STARTUP_VAL);
ClearlRQRegO; fpc2010LoadParameterFile(getJpc2010jDarameters(VERIFY_PARAMETERS));
// dummy write to FPC2010 *FP_RAM_Cmd = mem_cmd;
fpc20iooff();
}/*fpc2010lnitV
*
* Enrol a template into RAM. " ■ -
*
* @param templateBuffer - Memory area for the downloaded template data.
* @retum - TRUE: If enrolment succeeded.
FALSE: Otherwise.

**************** ************** *********** tit ******* ************ ********(
bool fpc2010Enrol(u_char "templateBuffer)
{
unsigned int swipeLength;
signed char pointOffset;
u_char enrolResult[FPC2010_WORK_RAM_SIZE];
boo! success;
fpc2010On();
CiearlRQReg();
fpc2010LoadParameterFile(get_fpc2010j3arameters(ENROL_PARAMETERS));
*ACHCmd = ACHCmd^ENROL; // enrol command to FPC2010
PolllRQReg(IRQ_ACH_COMPLETE); // wait until user has finished swiping finger
UploadEnro[Result(enrolResult); // get enrolment result from FPC2010
pointOffset = *AccPointOffset; // get x-translation
swipeLength = (TopLineLSB) + (TopLineMSB) * 256; // get swipe length
// create template from result data
success = Create_Jemplate(enrolResult, templateBuffer, pointOffset (short int)swipeLength);
fpc2010Off();
return success;
f/*fpc2010EnrolV

f**** **** ************************************************ ********** *********
* Verify a fingerprint against a template.
*
* @param templateBuffer - Pointer to the template memory.
* @return - TRUE: If verification succeeded.
FALSE: Otherwise.
*
it **** *** ***** * * ** **■* ***** *** ********* ** *** ****** ******* *** **** ******** *****{
bool fpc2010Verify{u_char *templateBuffer)
{
unsigned int swipeLength;
signed char pointOffset;
u_char verResult[FPC2010_VER_RESULT_RAM_SIZE];
bool success;
fpc2010On();
CleariRQRegO; fpc20lOLoadParameterFlle(geLfpc2010j3arameters(VERIFY_PARAMETERS));
DownloadVerData(templateBuffer); // download verification data to FPC2010
•ACHCrhd = ACHCmd_VERlFY;- // verify command to FPC2010
// enableFpcCounter();bysip
PolitRQReg(IRQ_ACH_COMPLETE); // wait until user has finished
swiping finger
// disableFpcCounterQ; by sip

upioaaverKesultKAMContentfverResult); // get result data from FPC2010
pointOffset = (signed char) *AccPointOffset; // get x-translation
swipeLength = (*TopLineLSB) + (TopLlneMSB) * 256; // get swipe length
// match template against result data
success = Match_Data(verResult, templateBuffer, pointOffset, {short int)swipeLength);
fpc2010Off();
return success;
}/*fpc2010VerlfyV
* Load register (parameter) file to FPC2010.
*
***** 4* ***** **4 *4 ************** **4* *********************** f
void fpc2010LoadParameterFile(unsigned char 'parameters)
{
intcurrent__byte;
' *ParameterFilePointer = 0;
for (current_byte = 0; currentlbyte {
*ParameterFileWrite = "(parameters + currentjayte);
>
} I* fpc2010LoadParameterFiie V

D1SPLAY.C
/* Display utilities 7
#indude "string.h" #include "7092.h" include "bpg.h"
#define DISP_DELAY 200
//define macroes
#define ENABLE_DISP_COM *DISP_DR = *DISP_DR & ~DISP_NCSSEG_MASK; // Enable display
com.
#define DISABLE_D1SP_C0M *DISP_DR = *DISP_DR | DISP_NCSSEG_MASK; // Disable display
com.
extern void delay(int count); extern unsigned char disp_ram[8];
static const char asciiQ = {
0x00, 0x00, OxOO, 0x00, 0x00, 0x00, 0x00, 0x00, // 0 - 7
0x00, 0x00, 0x00, 0x00, OxOO, 0x00, 0x00, 0x00, // 8 -15
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //16 - 23
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, OxOO, 0x00, //24 - 31
0x00, 0x00, 0x00, 0x00, 0x00, OxOO, 0x00, 0x00, // 32 - 39
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // 40 - 47
0x7d, 0x60, Ox3e, 0x7a, 0x63, 0x5b, 0x4f, 0x70, // 48 - 55
0x7f, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 56 - 63
0x00, 0x77, 0x7f, 0x1d, 0x7d, 0x1f, 0x17, 0x5f, // 64 - 71
0x67, 0x60, 0x78, 0x00, OxOd, 0x00, 0x00, 0x7d, // 72 - 79
0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 80 - 87
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 88 - 95

0x00, 0x00, 0x00, OxOe, Ox6e, Ox3f, 0x00, 0x00, // 96 -103
0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x4e, //104 -111
0x00, 0x00, 0x06, 0x00, OxOf, 0x00, 0x00, 0x00. //112 -119
0x00, 0x6b, 0x00, 0x00. 0x00, 0x00, 0x00, 0x00 //120 -127
};
I* reverse: reverse string s in place */ void reverse(char sQ) {
char c; int i, j;
for (i = 0, j = strlen(s)-1; i s[i] = s03; s[j] = c; } }
/* itoa: convert n to characters in s */ void itoa(int n, char sQ) { int i, sign;
if ((sign = n) n = -n;
1 = 0;
do { // Generate digits in recverse order
s[i++l = (char)(n % 10 + '0'); // Get next digit } while ((n /= 10) > 0); // Delete it

if (sign void atodispfchar sQ, unsigned char * data_ptr) {
unsigned int i,j;
j = strlen(s);
for(K);l void Send_Disp(unsigned int data; unsigned int length) {
unsigned int i; unsigned int bit;
for (i=0; i bit = data & 0x01; // mask out bit 0
if (bit) {
*DISP_DR = *DISPJ3R | DISP_DATASEG_MASK; // Setup data 1 } else { *DISPJ3R = *DISP_DR & ~DISP_DATASEG_MASK; // Setup data 0
}
delay(DISP_DELAY);

// write pulse
*DISP_DR = *DISP_DR & ~DISPJMWRSEG_MASK; // Neg. write edge delay(DISPJDELAY);
*DISP_DR - *DISP_DR | DISP_NWRSEG_MASK; // Pos. write edge data - data » 1; } }
void Disp_Write_Ram(unsigned char * data_ptr) {
unsigned Int i;
unsigned char data, temp;
ENABLE_DlSP_COM; // Enable display com.
data = 0x5;
Send_Disp(data, 3); // send 3 bit command
data = 0x0;
Send_Disp(data, 6); // send 6 bit address
for (i=0; i }
for (i=0; i temp = (unsigned char)data_ptr[7-i];
data = (unsigned char)(temp & OxfO);
data = (unsigned char)(data » 4);
temp = (unsigned char)(temp « 4);
data = (unsigned char)(data | (temp & OxfO));
Send_Disp((unsigned int)data, 8); // send 8 bit of display ram data

}
DISABLE_D1SP_C0M; // Disable display com. }
void Disp_Send_Command(unsigned int data) {
ENABLE_plSP_COM; // Enable display com Send_Disp(data, 12); // Send commando DISABLEJ)ISP_COM; // Disable display com }
void write(char * s) {
unsigned int i;
for (i - 0; i atodisp(s, disp_ram); // convert ascii to display symbols
Disp_Write_Ram(disp_ram); // write symbols to display ram
}
void displayjnit() {
disp__ram[0] = 0x00; disp_ram[1] = 0x00; disp_ram[2] - 0x00; disp_ram[3] = 0x00; dispj-am[4] = 0x00; disp_ram[5] = 0x00;

disp_/am[6] = 0x00; disp_ram[7] = OxOO;
Disp_Send_Command(DISP_SYSJ=N);
Disp_Send_Command(DISP_BIAS_COM); Disp_Send_Command(DISP_LCD__ON); }
void display_test() {
unsigned intj;
unsigned long long * disp_ram_ptr;
disp_ram_ptr = (unsigned long long *)&disp_ram;
disp_ram[0] = 0x01; disp_ram[1] = 0xO0; disp_ram[2]« 0x00; disp_ram[3] = 0x00; disp_ram[4] = 0x00; disp_ram[5] = 0x00; disp_ram[6] = 0x00; disp_ram[7] = 0x00;
j = 64; do{
Drsp_Wrte_Ram(disp_ram);
*disp_ram_ptr - *disp_ram_ptr«1;
} while 0-); }

VECTORS.S
;;; Copyright ARM Ltd 2001. All rights reserved.
AREA Vect, CODE, READONLY
; These are example exception vectors and exception handlers
; Where there is ROM fixed at 0x0 (build_b), these are hard-coded at 0x0.
; Where ROM/RAM remapping occurs (build_c), these are copied from ROM to RAM.
; The copying is done automatically by the C library code inside __main.
; This version puts a branch to an Interrupt Handler (IRQ_Handler in int_handler.c) ; in its exception vector table.
, ***************** ; Exception Vectors
; Note; LDR PC instructions are used here, though branch (B) instructions ; could also be used, unless the ROM is at an address >32MB.
ENTRY
LDR PC, Reset_Addr
LDR PC, Undefined_Addr
LDR PC, SWI_Addr "
LDR PC, PrefetchJWdr
LDR PC, AborLAddr
NOP ; Reserved vector
LDR PC, IRQ_Addr
LDR PC, FIQ_Addr



END
STACK.S
;;; Copyright ARM Ltd 2001. All rights reserved.
AREA Stacks, DATA, NOINIT
EXPORT top_of_stacks ; Create dummy variable used to locals stacks in memory top_of_stacks SPACE 1
END
INIT.S
;; Copyright ARM Ltd 2001. Ail rights reserved.
This module performs ROM/RAM remapping (if required), initializes stack
pointers and interrupts for each mode, and finally branches to main in
the C library (which eventually calls main()).
On reset, the ARM core starts up in Supervisor (SVC) mode, in ARM state, with IRQ and FIQ disabled.
AREA Init, CODE, READONLY
; — Set up if ROM/RAM remapping required

GBLL ROM_RAM_REMAP ;ROM_RAM_REMAP SETL {TRUE}; change to {FALSE} if remapping not required
; — ensure no functions that use semihosting SWIs are linked in from the C library
;; IMPORT use_no_semihosting_swi
; — Standard definitions of mode bits and interrupt (I & F) flags in PSRs
ModeJJSR EQU 0x10
Mode_FIQ EQU 0x11
ModeJRQ EQU 0x12
Mode_SVC EQU 0x13
Mode_ABT EQU 0x17
ModeJJND EQU 0x1B
Mode_SYS EQU 0x1 F; available on ARM Arch 4 and later
l_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled
; — System memory locations
MEMCR EQU 0x09001010 ; Address of Core Module Control Register (write
only)
MEMSR EQU 0x0900100c ; Address of Core Module Control Register (read
only)
Remap_bit EQU 0x01 ; Bit 0 is remap bit of CM_ctl
BCR1 EQU 0x09000104 ; Address of Bus Controller register for CS1
MEMWlDTH_bit EQU 0x100 ; Bit 8 is external bus width
WAITSTATES bit EQU 0x2 ; Number of wait states is WAITSTATES bit+1

; — Amount of memory (in bytes) allocated for stacks
;Len_FIQ_Stack EQU 8192
;LenJRQ_Stack EQU 8192
;Len_ABT_Stack EQU 8192
;Len_UND_Stack EQU 8192
;Len_SVC_Stack EQU 8192
;Len_USR_Stack EQU 8192
Len_FIQ_Stack EQU 0
Len_IRQ_Stack EQU 256
Len_ABT_Stack EQU 0
Len_UND_Stack EQU 0
Len_SVC_Stack EQU 256
Len_USR_Stack EQU 256
Add lengths >0 for FlQ_Stack, ABT_Stack, UND_Stack if you need them. Offsets will be loaded as immediate values. Offsets must be 8 byte aligned.


Offset_FiQ_Stack EQU
Offset_IRQ_Stack EQU
Offset_ABT_Stack EQU
Offset_UND_Stack EQU
Offset_SVC_Stack EQU
Offset USR Stack EQU

0
Offset_FlQ_Stack + Len_FIQ_Stack 0ffs6t_lRQ_Stack + LenJRG_Stack Offset_ABT_Stack + Len_ABT_Stack Offeet_UND_Stack + Len_UND_Stack Offset SVC Stack + Len SVC Stack

ENTRY

; — Perform ROM/RAM remapping, if required IF :DEF: ROM_RAM_REMAP
; On reset, an aliased copy of ROM is at 0x0. ; Continue execution from 'real' ROM rather than aliased copy LDR pc, =lnstruct_2
Instruct^
; Remap by setting Remap bit of the MEMCR/MEMSR register
; LDR r1,=MEMSR
; LDR rO, [ri]
; ORR rO, rO, #Remap_bit
; LDR r1,=MEMCR
; STR rO, [r1]
; RAM is now at OxO.
; The exception vectors (in vectors.s) must be copied from ROM to the RAM
; The copying is done later by the C library code inside main
; Set external bus width for CS1 to 8-bit LDR r1,=BCR1 LDR rO, [r1]
ORR rO, rO, #MEMWIDTH_bit ORR rO, rO, #WAITSTATES_bit STR rO, [r1]
ENDIF * "" "
EXPORT ResetJHandler
Reset Handler

Initialize stack pointer registers
; Enter each mode in turn and set up the stack pointer
IMPORT top_of_stacks ; defined in stack.s and located by scatter file LDR rO, =top_of_stacks
; MSR CPSR_c, #Mode_FIQ:OR:l_Bit:OR:F_Bit; No interrupts ; SUB sp, rO, #Offset_FIQ_Stack
MSR CPSR_c, #Mode_IRQ:OR:l_Bit;OR:F_Bit; No interrupts SUB sp, rO, #OffsetJRQ_Stack
; MSR CPSR_c, #Mode_,ABT:OR:l_Bit:OR:F_Bit; No interrupts SUB sp, rO, #Offset,ABT_Stack
; MSR CPSR_c, #Mode_UND:OR:LBit:OR:F_Bit; No interrupts ; SUB sp, rO, #OffseLUND_Stack
MSR CPSR_c, #Mode_SVC:OR:l_Bit:OR:F_Bit; No interrupts SUB sp, rO, #Offset_SVC_Stack
; — Initialize critical 10 devices
; — Now change to User mode and set up User mode stack, if needed
MSR CPSR_c, #Mode_USR:OR:F_Bit ; IRQs now enabled
SUB sp, rO, #Offset_USR_Stack '
IMPORT main
; — Now enter the C code
B main ; note use B not BL, because an application will never return this way



WE CLAIM :
1. A computer system for identifying a specific individual relative to said system using a biometric characteristic of said specific individual, comprising: i) at least one apparatus comprising :
- a housing defining an outer surface,
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual, said biometric sensor being mounted in said housing and being exposed at said outer surface,
- a controller means mounted in said housing and comprising a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,
- a first communication means mounted in said housing and electrically connected to and controlled by said controller means for establishing communication between said apparatus and said computer system,
- a power supply means electrically connected to said biometric sensor means, said controller means, and said first communication means for the supply of electric power thereto,
ii) said computer system comprising a first database containing said dynamic binary code conversion algorithm, and a second communication means for establishing communication between said computer system and said apparatus,
2. The computer system as claimed in claim 1, said apparatus comprising a display means mounted in said housing and being exposed at said outer surface, said display means being electrically connected to said power supply means and said controller means and being controlled by said controller means, and being powered by said power supply means, said display means displaying said first binary code converted into an alphanumeric number, preferably a decimal number constituting a Pin code after verification of identity between said code and said first code.

3. A computer system for identifying a specific individual relative to said system
using a biometric characteristic of said specific individual, comprising:
i) at least one apparatus comprising :
- a housing defining an outer surface,
- a biometric sensor means for generating a first code in response to the detection of said biometric characteristic of said specific individual, said biometric sensor being mounted in said housing and being exposed at said outer surface,
- a controller means mounted in said housing and comprising a memory for storing said first code and a dynamic binary code conversion algorithm, said controller means being electrically connected to said biometric sensor means,
- a display means mounted in said housing and being exposed at said outer surface, said display means being electrically connected to and being controlled by said controller means,
- a power supply means electrically connected to said biometric sensor means, said controller means, and said display means for the supply of electric power thereto,
said computer system comprising a first database containing said dynamic binary code conversion algorithm, and a code input means, said controller means performing,
4. The computer system as claimed in claim 3, said apparatus comprising a first
communication means mounted in said housing and electrically connected to and
controlled by said controller means for establishing communication between said
apparatus and said computer system, and said computer system comprising a second
communication means for establishing communication between said computer system
and said apparatus.

5. The computer system as claimed in any of the claims 1-4, said computer system comprising a second database comprising a sequence of binary codes generated sequentially by means of said dynamic binary code conversion algorithm, and said computer system comparing said first binary code with said sequence of binary codes contained in said second database for verifying the identity of said specific individual provided said first binary code is not matching said second binary code.
6. The computer system as claimed in any of the claims 1-5, said biometric sensor means being an iris scanner, a blood scanner, a DNA scanner, a voice identification scanner, a face recognition scanner, an array scanner for scanning the palm of said individual, an array scanner for scanning one hole finger or preferably a finger print scanner.
7. The computer system as claimed in any of the claims 1-6, said apparatus being a stand alone apparatus implemented as a credit card having the dimensions of a credit card conforming to the ISO standard (International Organisation of Standardisation), and said code being a Pin code.
8. The computer system as claimed in any of the claims 1-7, comprising encryption and decryption means controlled by said controller means for performing said communication from said controller means to and from said external computer system in encrypted state according to e. g. DES encryption or other public or non¬public encryption keys.
9. The computer system as claimed in any of the claims 1-8, said first and second communication means being a parallel communication interface, a serial communication interface, an SPI, an 12C, an USB, a wireless communication interface such as blue tooth, an infra red or RF communication.

10. A method of identifying a specific individual relative to a system using a
biometric characteristic of said specific individual, the method comprising:
- receiving a code from said biometric sensor means
performing a comparison of said code with said first code stored in said memory and provided said comparison verifies the identity between said code and said first code,
generating a first binary code by means of said dynamic binary code conversion algorithm;
outputting said first binary code from said apparatus by means of said first communication means to said computer system,
in the said computer system,
receiving said first binary code from said apparatus by means of said second communication means;
generating a second binary code by means of said dynamic binary code conversion algorithm and
verifying the identity of said specific individual provided said second binary code matches said first binary code.
11. A method of identifying a specific individual relative to said system using a
biometric characteristic of said specific individual, the method comprising; -
receiving a code from said biometric sensor means;
performing a comparison of said code with said first code stored in said memory;
provided said comparison verifies the identity between said code and said first code generating a first binary code by means of said dynamic binary code conversion algorithm;
displaying said first binary code converted into a an alphanumeric number, preferably a decimal number constituting a Pin code on said display means;
when receiving said first Pin code input by means of said code input means, generating a second binary code by means of said binary code conversion algorithm and

verifying the identity of said specific individual provided said second binary code matches said first binary code reconverted from said Pin code.
12. The method according to any of the claims 14 or 15, said biometric
characteristic being detached by means of an iris scanner, a blood scanner, a DNA
scanner, a voice identification scanner, and array scanner for scanning the palm of
said individual, an array scanner for scanning one hole finger or preferably a finger
print scanner.
13. The method according to any of the claims 14-16, comprising encrypting said
communication between said controller means and said external computer system
according to e. g. DES encryption or other public or non-public encryption keys.



Documents:

2203-chenp-2005 abstract-duplicate.pdf

2203-chenp-2005 abstract.pdf

2203-chenp-2005 claims-duplicate.pdf

2203-chenp-2005 claims.pdf

2203-chenp-2005 correspondences others.pdf

2203-chenp-2005 correspondences po.pdf

2203-chenp-2005 descripition(completed)-duplicate.pdf

2203-chenp-2005 descripition(completed).pdf

2203-chenp-2005 drawings-duplicate.pdf

2203-chenp-2005 drawings.pdf

2203-chenp-2005 form-1.pdf

2203-chenp-2005 form-18.pdf

2203-chenp-2005 form-26.pdf

2203-chenp-2005 form-3.pdf

2203-chenp-2005 form-5.pdf

2203-chenp-2005 pct.pdf


Patent Number 230733
Indian Patent Application Number 2243/CHENP/2005
PG Journal Number 13/2009
Publication Date 27-Mar-2009
Grant Date 27-Feb-2009
Date of Filing 13-Sep-2005
Name of Patentee QUARD TECHNOLOGY ApS
Applicant Address ALGADE 44, DK-4000 ROSKILDE,
Inventors:
# Inventor's Name Inventor's Address
1 CLEMMENSEN, UFFE BROVEJ 4E, DK-4000 ROSKILDE,
2 JENSEN, SOREN, HALD VODSKOV BYVEJ 15, DK-9310 VODSKOV,
3 SERUP, LEIF MJELS BROVEJ 11, DK-9230 SVENSTRUP,
PCT International Classification Number G06F1/00
PCT International Application Number PCT/DK04/00171
PCT International Filing date 2004-03-15
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 PA2003 00384 2003-03-13 Denmark